forked from runtimeverification/javamop
-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Owolabi Legunsen edited this page Jan 6, 2022
·
2 revisions
Notes on JavaMOP refactoring:
- Parsing is done using JavaCC (for specifying the grammar and generating the parser), and javaparser (for AST manipulation).
- A lot of old (pre 2010?) javaparser code was inlined in JavaMOP but has now been removed in favor of depending on the javaparser jar.
-
JavaMOPParser.parse
is the method that other classes call. For debugging, one can now invoke JavaParser directly (from the command line for example). - Parsing works as follows
JavaMOPMain
callsJavaMOPParser.parse
, which works as follows:-
JavaMOPParser.parse
uses a parser generated from the syntax defined in javamop.jj to parse the Java parts of the .mop file. - While parsing the .mop file, a parser generated from the syntax defined in aspectj.jj is used to parse the Java parts of the .mop file.
- (NEEDS-FIX) While parsing the .mop file, the
getFormula
method defined in javamop.jj is used to parse the logic formula. Perhaps it would be cleaner to do this step with the syntax of the various logics, which we have?
-