I was creating some own syntax schemes when I came across a functionality of JFlex that could be useful for you, too. As you know when generating own syntax schemes you have to adjust the generated .java file afterwards (delete two methods, do not initialize zzBuffer)
It is possible to pass a parameter to JFlex specifying an own skeleton file. The skeleton files JFlex usually uses can be found in its source directory.
You could create an own skeleton file that does those adjustments using the skeleton.default as template.
The call to jflex would then be something like
- Code: Select all
java -jar [path to jflex]\JFlex.jar -skel [path to skeleton]\skeleton.rsyntax XYZTokenMaker.flex
BTW which version of JFlex are you using? I used your SQL syntax as template and there was an assigment to zzPushbackPos that was not declared in JFLex 1.4.3