[ronald@cheetah tools]$ /home/ronald/schedulix/tools/bin/jflex --version
This is JFlex 1.6.0
[ronald@cheetah tools]$ /home/ronald/schedulix/tools/bin/jflex --help
Usage: jflex <options> <input-files>
Where <options> can be one or more of
-d <directory> write generated file to <directory>
--skel <file> use external skeleton <file>
--pack set default code generation method (default)
--jlex strict JLex compatibility
--legacydot dot (.) metachar matches [^\n] instead of
[^\n\r\u000B\u000C\u0085\u2028\u2029]
--inputstreamctor include a scanner constructor taking InputStream (default)
--noinputstreamctor don't include a scanner constructor taking InputStream
--nomin skip minimization step
--nobak don't create backup files
--dump display transition tables
--dot write graphviz .dot files for the generated automata (alpha)
--verbose
-v display generation progress messages (default)
--quiet
-q display errors only
--time display generation time statistics
--version print the version number of this copy of jflex
--info print system + JDK information
--uniprops <ver> print all supported properties for Unicode version <ver>
--help
-h print this message
This is JFlex 1.6.0
Have a nice day!
[ronald@cheetah tools]$ /home/ronald/schedulix/tools/bin/jflex --inputstreamctor MiniParse.jlex
Reading "MiniParse.jlex"
Constructing NFA : 47 states in NFA
Converting NFA to DFA :
................
22 states before minimization, 15 states in minimized DFA
Old file "MiniParse.java" saved as "MiniParse.java~"
Writing code to "MiniParse.java"
Warning: Emitting deprecated InputStream constructor. The inputstreamctor option will cause this constructor to be emitted in JFlex 1.6; the version after 1.6 will never emit this constructor.
--inputstreamctor flag yields the default behaviour. But then a warning is issued and an extra constructor is generated in the java code.[ronald@cheetah src]$ git diff
diff --git a/src/Makefile.CommonRules b/src/Makefile.CommonRules
index 207d1fd..202bd48 100644
--- a/src/Makefile.CommonRules
+++ b/src/Makefile.CommonRules
@@ -72,7 +72,7 @@ commongensubdirs:
egrep -e "^//yy" < $@ | sed 's!//yy!!' > parser.tables
%.java: %.jlex
- $(JLEX) -d /tmp $<
+ $(JLEX) --inputstreamctor -d /tmp $<
$(SED) -e 's/zzCMapL\[zzInput\]/(((zzInput >= 0) \&\& (zzInput < zzCMapL.length)) ? zzCMapL\[zzInput\] : 0)/' /tmp/$@ >$@
rm -f /tmp/$@
diff --git a/src/shell/Makefile b/src/shell/Makefile
index a2472f9..058b2dd 100644
--- a/src/shell/Makefile
+++ b/src/shell/Makefile
@@ -44,7 +44,7 @@ syntax:
$(JAY) MiniParser.jay < /dev/null
MiniScanner.java: MiniScanner.jlex MiniParser.java
- $(JLEX) -d /tmp -skel skeleton.nested MiniScanner.jlex
+ $(JLEX) --inputstreamctor -d /tmp -skel skeleton.nested MiniScanner.jlex
$(SED) -e 's/zzCMapL\[zzInput\]/(((zzInput >= 0) \&\& (zzInput < zzCMapL.length)) ? zzCMapL\[zzInput\] : 0)/' /tmp/$@ >$@
rm -f /tmp/$@
diff --git a/src/tools/Makefile b/src/tools/Makefile
index 4525ef7..384afec 100644
--- a/src/tools/Makefile
+++ b/src/tools/Makefile
@@ -45,5 +45,5 @@ Scanner.java: Scanner.jlex
$(JLEX) Scanner.jlex
MiniParse.java: MiniParse.jlex
- $(JLEX) MiniParse.jlex
+ $(JLEX) --inputstreamctor MiniParse.jlex