-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split LexGenerator out of Main #428
Conversation
This is a minor refactoring to support refacotring jflex-de#214 In the future, LexGenerator.generate() will not be static and have internal state in order to support multithreading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the comment that needs a tweak, everything looks fine.
|
||
/** | ||
* This is the main class of JFlex controlling the scanner generation process. It is responsible for | ||
* parsing the commandline, getting input files, starting up the GUI if necessary, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment will need adjustment for the refactor, indicating which part is in which class in the new setting.
This reverts commit 5d7ae8c. Wrong branch
Initial commit c3ae263 Author: Régis Décamps <[email protected]> Date: Thu Oct 11 00:42:45 2018 +0200 Split LexGenerator out of Main (#428) * Split Main in Main and LexGenerator. This is a minor refactoring to support refacotring #214 In the future, LexGenerator.generate() will not be static and have internal state in order to support multithreading. * Update javadoc *Also Make Main non instanciable.
This is a minor refactoring to support multithreading #214
Split Main in 2 classes:
Main
the cli client that parses the command line optionsLexGenerator
that generates java codeThe later is used by the cli, the jflex-maven-plugin, the ant task and the GUI, i.e.
Main.generate(lexFile)
becomesLexGenerator().generate(lexFile)
In the future,
LexGenerator.generate()
will not be static and have internal state in order to support multithreading.