diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 3790ff1..157c73a 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -40,6 +40,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
+ fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
@@ -62,9 +63,7 @@ jobs:
- name: clone javacc-8-java
uses: actions/checkout@v4
with:
- repository: javacc/javacc-8-java.git
path: javacc-8-java
- ref: release
- name: Set up JDK 11
uses: actions/setup-java@v4
@@ -73,13 +72,6 @@ jobs:
java-version: '11'
cache: 'maven'
- - name: Cache Maven packages
- uses: actions/cache@v4
- with:
- path: ~/.m2
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: ${{ runner.os }}-m2
-
# -B: batch mode; -e: produce execution error messages;
# -X: debug mode; -N: non-recursive (don't build submodules)
@@ -88,6 +80,21 @@ jobs:
- name: Run install on javacc-8-core
run: mvn install -B --show-version --file javacc-8-core/pom.xml
-
- - name: Run install on javacc-8-java
+ - name: Run install on javacc-8-java (posix)
+ if: ${{ matrix.os != 'windows-latest' }}
+ run: USERPROFILE=$HOME mvn install -B --show-version --file javacc-8-java/pom.xml
+ - name: Run install on javacc-8-java (windows)
+ env:
+ MAVEN_OPTS: -Dfile.encoding=utf-8
+ if: ${{ matrix.os == 'windows-latest' }}
run: mvn install -B --show-version --file javacc-8-java/pom.xml
+
+ - name: Upload output files for review
+ uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: outputs-${{ matrix.os }}
+ path: |
+ **/*.out
+ **/*.err
+ **/build.log
\ No newline at end of file
diff --git a/examples/Gwt/pom.xml b/examples/Gwt/pom.xml
index 8ec94bc..613e79b 100644
--- a/examples/Gwt/pom.xml
+++ b/examples/Gwt/pom.xml
@@ -88,8 +88,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
GwtSimpleParser
- ${project.basedir}/simple/out
- ${project.basedir}/simple/err
+ ${project.basedir}/simple/compiler.out
+ ${project.basedir}/simple/compiler.err
@@ -102,8 +102,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
GwtUnicodeParser
- ${project.basedir}/unicode/out
- ${project.basedir}/unicode/err
+ ${project.basedir}/unicode/compiler.out
+ ${project.basedir}/unicode/compiler.err
@@ -122,18 +122,18 @@ THE POSSIBILITY OF SUCH DAMAGE.
-
+
-
+ message="${project.basedir}/simple/compiler.out does not exist!" />
+
+ message="${project.basedir}/simple/compiler.ref does not exist!" />
-
+
+ message="${project.basedir}/simple/compiler.out does not match ${project.basedir}/simple/compiler.ref!" />
@@ -145,18 +145,18 @@ THE POSSIBILITY OF SUCH DAMAGE.
-
+
-
+ message="${project.basedir}/unicode/compiler.out does not exist!" />
+
+ message="${project.basedir}/unicode/compiler.ref does not exist!" />
-
+
+ message="${project.basedir}/unicode/compiler.out does not match ${project.basedir}/unicode/compiler.ref!" />
diff --git a/examples/Gwt/simple/ref b/examples/Gwt/simple/compiler.ref
similarity index 100%
rename from examples/Gwt/simple/ref
rename to examples/Gwt/simple/compiler.ref
diff --git a/examples/Gwt/simple/err b/examples/Gwt/simple/err
deleted file mode 100644
index e69de29..0000000
diff --git a/examples/Gwt/simple/out b/examples/Gwt/simple/out
deleted file mode 100644
index ce01362..0000000
--- a/examples/Gwt/simple/out
+++ /dev/null
@@ -1 +0,0 @@
-hello
diff --git a/examples/Gwt/unicode/ref b/examples/Gwt/unicode/compiler.ref
similarity index 100%
rename from examples/Gwt/unicode/ref
rename to examples/Gwt/unicode/compiler.ref
diff --git a/examples/Gwt/unicode/err b/examples/Gwt/unicode/err
deleted file mode 100644
index e69de29..0000000
diff --git a/examples/Gwt/unicode/out b/examples/Gwt/unicode/out
deleted file mode 100644
index ce01362..0000000
--- a/examples/Gwt/unicode/out
+++ /dev/null
@@ -1 +0,0 @@
-hello
diff --git a/examples/Simple/idlist/in b/examples/Simple/idlist/compiler.in
similarity index 100%
rename from examples/Simple/idlist/in
rename to examples/Simple/idlist/compiler.in
diff --git a/examples/Simple/idlist/out b/examples/Simple/idlist/compiler.ref
similarity index 100%
rename from examples/Simple/idlist/out
rename to examples/Simple/idlist/compiler.ref
diff --git a/examples/Simple/idlist/err b/examples/Simple/idlist/err
deleted file mode 100644
index e69de29..0000000
diff --git a/examples/Simple/idlist/ref b/examples/Simple/idlist/ref
deleted file mode 100644
index 93720f3..0000000
--- a/examples/Simple/idlist/ref
+++ /dev/null
@@ -1,6 +0,0 @@
-abc
-xyz123
-A
-B
-C
-aaa
diff --git a/examples/Simple/pom.xml b/examples/Simple/pom.xml
index d058a32..dc93aa6 100644
--- a/examples/Simple/pom.xml
+++ b/examples/Simple/pom.xml
@@ -61,9 +61,9 @@ THE POSSIBILITY OF SUCH DAMAGE.
simple1.Simple1
- ${project.basedir}/simple1/in
- ${project.basedir}/simple1/out
- ${project.basedir}/simple1/err
+ ${project.basedir}/simple1/compiler.in
+ ${project.basedir}/simple1/compiler.out
+ ${project.basedir}/simple1/compiler.err
@@ -76,9 +76,9 @@ THE POSSIBILITY OF SUCH DAMAGE.
simple2.Simple2
- ${project.basedir}/simple2/in
- ${project.basedir}/simple2/out
- ${project.basedir}/simple2/err
+ ${project.basedir}/simple2/compiler.in
+ ${project.basedir}/simple2/compiler.out
+ ${project.basedir}/simple2/compiler.err
@@ -91,9 +91,9 @@ THE POSSIBILITY OF SUCH DAMAGE.
simple3.Simple3
- ${project.basedir}/simple3/in
- ${project.basedir}/simple3/out
- ${project.basedir}/simple3/err
+ ${project.basedir}/simple3/compiler.in
+ ${project.basedir}/simple3/compiler.out
+ ${project.basedir}/simple3/compiler.err
@@ -106,9 +106,9 @@ THE POSSIBILITY OF SUCH DAMAGE.
xlator.NL_Xlator
- ${project.basedir}/xlator/in
- ${project.basedir}/xlator/out
- ${project.basedir}/xlator/err
+ ${project.basedir}/xlator/compiler.in
+ ${project.basedir}/xlator/compiler.out
+ ${project.basedir}/xlator/compiler.err
@@ -121,9 +121,9 @@ THE POSSIBILITY OF SUCH DAMAGE.
idlist.IdList
- ${project.basedir}/idlist/in
- ${project.basedir}/idlist/out
- ${project.basedir}/idlist/err
+ ${project.basedir}/idlist/compiler.in
+ ${project.basedir}/idlist/compiler.out
+ ${project.basedir}/idlist/compiler.err
@@ -142,18 +142,18 @@ THE POSSIBILITY OF SUCH DAMAGE.
-
+
-
+ message="${project.basedir}/simple1/compiler.out does not exist!" />
+
+ message="${project.basedir}/simple1/compiler.ref does not exist!" />
-
+
+ message="${project.basedir}/simple1/compiler.out does not match ${project.basedir}/simple1/compiler.ref!" />
@@ -166,15 +166,15 @@ THE POSSIBILITY OF SUCH DAMAGE.
-
-
-
-
+
+
+
+
-
+
-
+
@@ -187,18 +187,18 @@ THE POSSIBILITY OF SUCH DAMAGE.
-
+
-
+ message="${project.basedir}/simple3/compiler.out does not exist!" />
+
+ message="${project.basedir}/simple3/compiler.ref does not exist!" />
-
+
+ message="${project.basedir}/simple3/compiler.out does not match ${project.basedir}/simple3/compiler.ref!" />
@@ -210,18 +210,18 @@ THE POSSIBILITY OF SUCH DAMAGE.
-
+
-
+ message="${project.basedir}/xlator/compiler.out does not exist!" />
+
+ message="${project.basedir}/xlator/compiler.ref does not exist!" />
-
+
+ message="${project.basedir}/xlator/compiler.out does not match ${project.basedir}/xlator/compiler.ref!" />
@@ -233,18 +233,18 @@ THE POSSIBILITY OF SUCH DAMAGE.
-
+
-
+ message="${project.basedir}/idlist/compiler.out does not exist!" />
+
+ message="${project.basedir}/idlist/compiler.ref does not exist!" />
-
+
+ message="${project.basedir}/idlist/compiler.out does not match ${project.basedir}/idlist/compiler.ref!" />
diff --git a/examples/Simple/simple1/in b/examples/Simple/simple1/compiler.in
similarity index 100%
rename from examples/Simple/simple1/in
rename to examples/Simple/simple1/compiler.in
diff --git a/examples/Simple/simple1/out b/examples/Simple/simple1/compiler.ref
similarity index 100%
rename from examples/Simple/simple1/out
rename to examples/Simple/simple1/compiler.ref
diff --git a/examples/Simple/simple1/err b/examples/Simple/simple1/err
deleted file mode 100644
index e69de29..0000000
diff --git a/examples/Simple/simple1/ref b/examples/Simple/simple1/ref
deleted file mode 100644
index e99f59e..0000000
--- a/examples/Simple/simple1/ref
+++ /dev/null
@@ -1 +0,0 @@
-matched
diff --git a/examples/Simple/simple2/in b/examples/Simple/simple2/compiler.in
similarity index 100%
rename from examples/Simple/simple2/in
rename to examples/Simple/simple2/compiler.in
diff --git a/examples/Simple/simple2/ref b/examples/Simple/simple2/compiler.ref
similarity index 100%
rename from examples/Simple/simple2/ref
rename to examples/Simple/simple2/compiler.ref
diff --git a/examples/Simple/simple2/err b/examples/Simple/simple2/err
deleted file mode 100644
index e69de29..0000000
diff --git a/examples/Simple/simple2/out b/examples/Simple/simple2/out
deleted file mode 100644
index 3c5bd8b..0000000
--- a/examples/Simple/simple2/out
+++ /dev/null
@@ -1,12 +0,0 @@
-Call: Input
- Call: MatchedBraces
- Consumed token: <5, "{"> at 1:1
- Call: MatchedBraces
- Consumed token: <5, "{"> at 1:2
- Consumed token: <6, "}"> at 1:5
- Return: MatchedBraces
- Consumed token: <6, "}"> at 2:1
- Return: MatchedBraces
- Consumed token: <0, > at 2:3
-Return: Input
-matched
diff --git a/examples/Simple/simple3/in b/examples/Simple/simple3/compiler.in
similarity index 100%
rename from examples/Simple/simple3/in
rename to examples/Simple/simple3/compiler.in
diff --git a/examples/Simple/simple3/out b/examples/Simple/simple3/compiler.ref
similarity index 100%
rename from examples/Simple/simple3/out
rename to examples/Simple/simple3/compiler.ref
diff --git a/examples/Simple/simple3/err b/examples/Simple/simple3/err
deleted file mode 100644
index e69de29..0000000
diff --git a/examples/Simple/simple3/ref b/examples/Simple/simple3/ref
deleted file mode 100644
index 75bedbb..0000000
--- a/examples/Simple/simple3/ref
+++ /dev/null
@@ -1,2 +0,0 @@
-The levels of nesting is 5
-matched
diff --git a/examples/Simple/xlator/in b/examples/Simple/xlator/compiler.in
similarity index 100%
rename from examples/Simple/xlator/in
rename to examples/Simple/xlator/compiler.in
diff --git a/examples/Simple/xlator/out b/examples/Simple/xlator/compiler.ref
similarity index 100%
rename from examples/Simple/xlator/out
rename to examples/Simple/xlator/compiler.ref
diff --git a/examples/Simple/xlator/err b/examples/Simple/xlator/err
deleted file mode 100644
index e69de29..0000000
diff --git a/examples/Simple/xlator/ref b/examples/Simple/xlator/ref
deleted file mode 100644
index 3d4f20b..0000000
--- a/examples/Simple/xlator/ref
+++ /dev/null
@@ -1,6 +0,0 @@
-Please type in an expression followed by a ";" or ^D to quit:
-
-AbCDE
-
-Please type in another expression followed by a ";" or ^D to quit:
-
diff --git a/examples/Transformer/src/main/java/Node.java b/examples/Transformer/src/main/java/Node.java
index dc1e51b..d076326 100644
--- a/examples/Transformer/src/main/java/Node.java
+++ b/examples/Transformer/src/main/java/Node.java
@@ -51,6 +51,10 @@ public int jjtGetNumChildren() {
return (children == null) ? 0 : children.length;
}
+ public Node[] jjtGetChildren() {
+ return children;
+ }
+
public void jjtSetValue(Object value) {
this.value = value;
}
diff --git a/examples/VTransformer/src/main/java/VTransformer/Node.java b/examples/VTransformer/src/main/java/VTransformer/Node.java
index 82a84e8..e6870f4 100644
--- a/examples/VTransformer/src/main/java/VTransformer/Node.java
+++ b/examples/VTransformer/src/main/java/VTransformer/Node.java
@@ -87,6 +87,10 @@ public int jjtGetNumChildren() {
return (children == null) ? 0 : children.length;
}
+ public Node[] jjtGetChildren() {
+ return children;
+ }
+
/** Accept the visitor. **/
public Object jjtAccept(JavaParserVisitor visitor, Object data) {
return visitor.visit(this, data);
diff --git a/grammars/ecma/src/main/jjtree/EcmaScript.jjt b/grammars/ecma/src/main/jjtree/EcmaScript.jjt
index a51f913..43e0181 100644
--- a/grammars/ecma/src/main/jjtree/EcmaScript.jjt
+++ b/grammars/ecma/src/main/jjtree/EcmaScript.jjt
@@ -2317,10 +2317,10 @@ TOKEN:
}
if(! foundLineSeparator){
- throw generateParseException();
+ throw generateParseException("Expected line separator");
}
} else {
- throw generateParseException();
+ throw generateParseException("Could not insert semicolon");
}
}
}
diff --git a/issues/bas01/files/clc1.exp_err b/issues/bas01/files/clc1.exp_err
index b2b437f..b23eece 100644
--- a/issues/bas01/files/clc1.exp_err
+++ b/issues/bas01/files/clc1.exp_err
@@ -212,18 +212,15 @@ Read 1st char for any kind: `32 / ' '´, @ 1:17 (tm)
Looking to move from state: <,>-5, for token: (tm)
Looking to move from state: <,>-3, for token: <9 / > (tm)
Found a match of kind: 9 using the first: 17 characters (tm)
- Cur char: `13 / '\r'´ (tm)
+ Cur char: `10 / '\n'´ (tm)
Looking to move from state: <,>-7, for token: (tm)
Looking to move from state: <,>-6, for token: <9 / > (tm)
Found a match of kind: 9 using the first: 18 characters (tm)
Looking to move from state: <,>-5, for token: (tm)
Looking to move from state: <,>-3, for token: <9 / > (tm)
- Cur char: `10 / '\n'´ (tm)
- Looking to move from state: <,>-4, for token: <9 / > (tm)
- Found a match of kind: 9 using the first: 19 characters (tm)
- Done with NFA, at pos: 19 (tm)
+ Done with NFA, at pos: 18 (tm)
Put back: 0 looked ahead chars (tm)
-Found a SPECIAL_TOKEN match: <9 / " Not yet supported\r\n"> at lexical state: 1; continuing (tm)
+Found a SPECIAL_TOKEN match: <9 / " Not yet supported\n"> at lexical state: 1; continuing (tm)
Read 1st char for any kind: `116 / 't'´, @ 2:1 (tm)
-0 Current input char: `116 / 't'´, @ 2:1 (tm)
No string literal start with char: `116 / 't'´ (tm)
@@ -311,20 +308,13 @@ Read 1st char for any kind: `111 / 'o'´, @ 2:10 (tm)
Cur char: `110 / 'n'´ (tm)
Looking to move from state: <,>-2, for token: <10 / > (tm)
Found a match of kind: 10 using the first: 8 characters (tm)
- Cur char: `13 / '\r'´ (tm)
+ Cur char: `10 / '\n'´ (tm)
Looking to move from state: <,>-2, for token: <10 / > (tm)
Done with NFA, at pos: 9 (tm)
Put back: 1 looked ahead chars (tm)
Found a TOKEN MATCH ***: <10 / / "other-ten"> at lexical state: 0; returning (tm)
-Read 1st char for any kind: `13 / '\r'´, @ 2:19 (tm)
--0 Current input char: `13 / '\r'´, @ 2:19 (tm)
- Looking for string literal match of token: <4 / "\r"> (tm)
- Cur char: `13 / '\r'´ (tm)
- Currently matched the first: 1 chars as token: <4 / "\r"> (tm)
-Put back: 0 looked ahead chars (tm)
-Found a SKIP match: <4> at lexical state: 0; continuing (tm)
-Read 1st char for any kind: `10 / '\n'´, @ 2:20 (tm)
--0 Current input char: `10 / '\n'´, @ 2:20 (tm)
+Read 1st char for any kind: `10 / '\n'´, @ 2:19 (tm)
+-0 Current input char: `10 / '\n'´, @ 2:19 (tm)
Looking for string literal match of token: <3 / "\n"> (tm)
Cur char: `10 / '\n'´ (tm)
Currently matched the first: 1 chars as token: <3 / "\n"> (tm)
@@ -391,38 +381,24 @@ Read 1st char for any kind: `73 / 'I'´, @ 3:11 (tm)
Cur char: `50 / '2'´ (tm)
Looking to move from state: <,>-2, for token: <10 / > (tm)
Found a match of kind: 10 using the first: 3 characters (tm)
- Cur char: `13 / '\r'´ (tm)
+ Cur char: `10 / '\n'´ (tm)
Looking to move from state: <,>-2, for token: <10 / > (tm)
Done with NFA, at pos: 4 (tm)
Put back: 1 looked ahead chars (tm)
Found a TOKEN MATCH ***: <10 / / "Int2"> at lexical state: 0; returning (tm)
-Read 1st char for any kind: `13 / '\r'´, @ 3:15 (tm)
--0 Current input char: `13 / '\r'´, @ 3:15 (tm)
- Looking for string literal match of token: <4 / "\r"> (tm)
- Cur char: `13 / '\r'´ (tm)
- Currently matched the first: 1 chars as token: <4 / "\r"> (tm)
-Put back: 0 looked ahead chars (tm)
-Found a SKIP match: <4> at lexical state: 0; continuing (tm)
-Read 1st char for any kind: `10 / '\n'´, @ 3:16 (tm)
--0 Current input char: `10 / '\n'´, @ 3:16 (tm)
+Read 1st char for any kind: `10 / '\n'´, @ 3:15 (tm)
+-0 Current input char: `10 / '\n'´, @ 3:15 (tm)
Looking for string literal match of token: <3 / "\n"> (tm)
Cur char: `10 / '\n'´ (tm)
Currently matched the first: 1 chars as token: <3 / "\n"> (tm)
Put back: 0 looked ahead chars (tm)
Found a SKIP match: <3> at lexical state: 0; continuing (tm)
-Read 1st char for any kind: `13 / '\r'´, @ 4:1 (tm)
--0 Current input char: `13 / '\r'´, @ 4:1 (tm)
- Looking for string literal match of token: <4 / "\r"> (tm)
- Cur char: `13 / '\r'´ (tm)
- Currently matched the first: 1 chars as token: <4 / "\r"> (tm)
-Put back: 0 looked ahead chars (tm)
-Found a SKIP match: <4> at lexical state: 0; continuing (tm)
-Read 1st char for any kind: `10 / '\n'´, @ 4:2 (tm)
--0 Current input char: `10 / '\n'´, @ 4:2 (tm)
+Read 1st char for any kind: `10 / '\n'´, @ 4:1 (tm)
+-0 Current input char: `10 / '\n'´, @ 4:1 (tm)
Looking for string literal match of token: <3 / "\n"> (tm)
Cur char: `10 / '\n'´ (tm)
Currently matched the first: 1 chars as token: <3 / "\n"> (tm)
Put back: 0 looked ahead chars (tm)
Found a SKIP match: <3> at lexical state: 0; continuing (tm)
--0 Reached EOF (1st), @ 4:2 (tm)
+-0 Reached EOF (1st), @ 4:1 (tm)
Input file parsed successfully
diff --git a/issues/bas01/files/clc2.exp_err b/issues/bas01/files/clc2.exp_err
index bc8fb0b..42afd32 100644
--- a/issues/bas01/files/clc2.exp_err
+++ b/issues/bas01/files/clc2.exp_err
@@ -95,20 +95,13 @@ Read 1st char for any kind: `98 / 'b'´, @ 1:14 (tm)
Cur char: `98 / 'b'´ (tm)
Looking to move from state: <,>-2, for token: <10 / > (tm)
Found a match of kind: 10 using the first: 1 characters (tm)
- Cur char: `13 / '\r'´ (tm)
+ Cur char: `10 / '\n'´ (tm)
Looking to move from state: <,>-2, for token: <10 / > (tm)
Done with NFA, at pos: 2 (tm)
Put back: 1 looked ahead chars (tm)
Found a TOKEN MATCH ***: <10 / / "bb"> at lexical state: 0; returning (tm)
-Read 1st char for any kind: `13 / '\r'´, @ 1:16 (tm)
--0 Current input char: `13 / '\r'´, @ 1:16 (tm)
- Looking for string literal match of token: <4 / "\r"> (tm)
- Cur char: `13 / '\r'´ (tm)
- Currently matched the first: 1 chars as token: <4 / "\r"> (tm)
-Put back: 0 looked ahead chars (tm)
-Found a SKIP match: <4> at lexical state: 0; continuing (tm)
-Read 1st char for any kind: `10 / '\n'´, @ 1:17 (tm)
--0 Current input char: `10 / '\n'´, @ 1:17 (tm)
+Read 1st char for any kind: `10 / '\n'´, @ 1:16 (tm)
+-0 Current input char: `10 / '\n'´, @ 1:16 (tm)
Looking for string literal match of token: <3 / "\n"> (tm)
Cur char: `10 / '\n'´ (tm)
Currently matched the first: 1 chars as token: <3 / "\n"> (tm)
@@ -125,7 +118,7 @@ Read 1st char for any kind: `52 / '4'´, @ 2:1 (tm)
Cur char: `53 / '5'´ (tm)
Looking to move from state: -0, for token: <7 / > (tm)
Found a match of kind: 7 using the first: 1 characters (tm)
- Cur char: `13 / '\r'´ (tm)
+ Cur char: `10 / '\n'´ (tm)
Looking to move from state: -0, for token: <7 / > (tm)
Done with NFA, at pos: 2 (tm)
Put back: 1 looked ahead chars (tm)
diff --git a/issues/bas01/files/clc3.exp_err b/issues/bas01/files/clc3.exp_err
index 6ae5b45..646c45e 100644
--- a/issues/bas01/files/clc3.exp_err
+++ b/issues/bas01/files/clc3.exp_err
@@ -95,20 +95,13 @@ Read 1st char for any kind: `98 / 'b'´, @ 1:14 (tm)
Cur char: `98 / 'b'´ (tm)
Looking to move from state: <,>-2, for token: <10 / > (tm)
Found a match of kind: 10 using the first: 1 characters (tm)
- Cur char: `13 / '\r'´ (tm)
+ Cur char: `10 / '\n'´ (tm)
Looking to move from state: <,>-2, for token: <10 / > (tm)
Done with NFA, at pos: 2 (tm)
Put back: 1 looked ahead chars (tm)
Found a TOKEN MATCH ***: <10 / / "bb"> at lexical state: 0; returning (tm)
-Read 1st char for any kind: `13 / '\r'´, @ 1:16 (tm)
--0 Current input char: `13 / '\r'´, @ 1:16 (tm)
- Looking for string literal match of token: <4 / "\r"> (tm)
- Cur char: `13 / '\r'´ (tm)
- Currently matched the first: 1 chars as token: <4 / "\r"> (tm)
-Put back: 0 looked ahead chars (tm)
-Found a SKIP match: <4> at lexical state: 0; continuing (tm)
-Read 1st char for any kind: `10 / '\n'´, @ 1:17 (tm)
--0 Current input char: `10 / '\n'´, @ 1:17 (tm)
+Read 1st char for any kind: `10 / '\n'´, @ 1:16 (tm)
+-0 Current input char: `10 / '\n'´, @ 1:16 (tm)
Looking for string literal match of token: <3 / "\n"> (tm)
Cur char: `10 / '\n'´ (tm)
Currently matched the first: 1 chars as token: <3 / "\n"> (tm)
@@ -145,18 +138,15 @@ Read 1st char for any kind: `32 / ' '´, @ 2:3 (tm)
Looking to move from state: <,>-5, for token: (tm)
Looking to move from state: <,>-3, for token: <9 / > (tm)
Found a match of kind: 9 using the first: 2 characters (tm)
- Cur char: `13 / '\r'´ (tm)
+ Cur char: `10 / '\n'´ (tm)
Looking to move from state: <,>-7, for token: (tm)
Looking to move from state: <,>-6, for token: <9 / > (tm)
Found a match of kind: 9 using the first: 3 characters (tm)
Looking to move from state: <,>-5, for token: (tm)
Looking to move from state: <,>-3, for token: <9 / > (tm)
- Cur char: `10 / '\n'´ (tm)
- Looking to move from state: <,>-4, for token: <9 / > (tm)
- Found a match of kind: 9 using the first: 4 characters (tm)
- Done with NFA, at pos: 4 (tm)
+ Done with NFA, at pos: 3 (tm)
Put back: 0 looked ahead chars (tm)
-Found a SPECIAL_TOKEN match: <9 / " kk\r\n"> at lexical state: 1; continuing (tm)
+Found a SPECIAL_TOKEN match: <9 / " kk\n"> at lexical state: 1; continuing (tm)
Read 1st char for any kind: `44 / ','´, @ 3:1 (tm)
-0 Current input char: `44 / ','´, @ 3:1 (tm)
No string literal start with char: `44 / ','´ (tm)
diff --git a/issues/bas01/pom.xml b/issues/bas01/pom.xml
index 2aefa5b..2a195f4 100644
--- a/issues/bas01/pom.xml
+++ b/issues/bas01/pom.xml
@@ -152,6 +152,18 @@ THE POSSIBILITY OF SUCH DAMAGE.
org.apache.maven.plugins
maven-antrun-plugin
+
+ crlf-test
+ compile
+
+
+
+
+
+
+ run
+
+
check-res-test-1
test
diff --git a/issues/bas02/files/bug1.exp_out b/issues/bas02/files/bug1.exp_out
index 8c5ba8e..3f3d343 100644
--- a/issues/bas02/files/bug1.exp_out
+++ b/issues/bas02/files/bug1.exp_out
@@ -1,13 +1,13 @@
Call: 0: EnumerationItem-140 (pa)
- Consumed token: <7 / / "{"> (in jj_consume_token()) (pa)
+ Consumed token: <7 / / "{">, @ 1:1 (in jj_consume_token()) (pa)
Call: 2: Entering LOOKAHEAD (2) (at 145:5 in EnumerationItem-140) (la)
Call: 4: NamedNumber-156: looking ahead (2)... (la)
- Visited token (la=1): <17 / / "c">; Expected token: <17 / > (la)
- Visited token (la=0): <8 / / "}">; Expected token: <9 / > (la)
+ Visited token (la=1): <17 / / "c">, @ 1:3; Expected token: <17 / > (la)
+ Visited token (la=0): <8 / / "}">, @ 1:5; Expected token: <9 / > (la)
Return: 4: NamedNumber-156: look ahead scan (0) FAILED (la)
Return: 2: Exiting FAILED LOOKAHEAD (2/0) (at 145:5 in EnumerationItem-140) (la)
Call: 2: identifier-167 (pa)
- Consumed token: <17 / / "c"> (in jj_consume_token()) (pa)
+ Consumed token: <17 / / "c">, @ 1:3 (in jj_consume_token()) (pa)
Return: 2: identifier-167 (pa)
- Consumed token: <8 / / "}"> (in jj_consume_token()) (pa)
+ Consumed token: <8 / / "}">, @ 1:5 (in jj_consume_token()) (pa)
Return: 0: EnumerationItem-140 (pa)
diff --git a/issues/bas02/files/bug2.exp_err b/issues/bas02/files/bug2.exp_err
index 1d77d3c..f9264b0 100644
--- a/issues/bas02/files/bug2.exp_err
+++ b/issues/bas02/files/bug2.exp_err
@@ -1,5 +1,5 @@
ParseException parsing input file
-Encountered: / "{".
+Encountered: / "{", at line 1, column 2.
Was expecting one of these terminals within expansion starting at 145:5:
(inside 145:5) ...
(inside 160:5) ...
diff --git a/issues/bas02/files/bug2.exp_out b/issues/bas02/files/bug2.exp_out
index 5d2923b..6d1271b 100644
--- a/issues/bas02/files/bug2.exp_out
+++ b/issues/bas02/files/bug2.exp_out
@@ -1,9 +1,9 @@
Call: 0: EnumerationItem-140 (pa)
- Consumed token: <7 / / "{"> (in jj_consume_token()) (pa)
+ Consumed token: <7 / / "{">, @ 1:1 (in jj_consume_token()) (pa)
Call: 2: Entering LOOKAHEAD (2) (at 145:5 in EnumerationItem-140) (la)
Call: 4: NamedNumber-156: looking ahead (2)... (la)
- Visited token (la=1): <7 / / "{">; Expected token: <17 / > (la)
- Visited token (la=1): <7 / / "{">; Expected token: <18 / > (la)
+ Visited token (la=1): <7 / / "{">, @ 1:2; Expected token: <17 / > (la)
+ Visited token (la=1): <7 / / "{">, @ 1:2; Expected token: <18 / > (la)
Return: 4: NamedNumber-156: look ahead scan (1) FAILED (la)
Return: 2: Exiting FAILED LOOKAHEAD (2/1) (at 145:5 in EnumerationItem-140) (la)
Return: 0: EnumerationItem-140 (pa)
diff --git a/issues/bas02/files/bug3.exp_out b/issues/bas02/files/bug3.exp_out
index 690a3fb..e0d9197 100644
--- a/issues/bas02/files/bug3.exp_out
+++ b/issues/bas02/files/bug3.exp_out
@@ -1,18 +1,18 @@
Call: 0: EnumerationItem-140 (pa)
- Consumed token: <7 / / "{"> (in jj_consume_token()) (pa)
+ Consumed token: <7 / / "{">, @ 1:1 (in jj_consume_token()) (pa)
Call: 2: Entering LOOKAHEAD (2) (at 145:5 in EnumerationItem-140) (la)
Call: 4: NamedNumber-156: looking ahead (2)... (la)
- Visited token (la=1): <17 / / "n">; Expected token: <17 / > (la)
- Visited token (la=0): <9 / / "(">; Expected token: <9 / > (la)
+ Visited token (la=1): <17 / / "n">, @ 1:3; Expected token: <17 / > (la)
+ Visited token (la=0): <9 / / "(">, @ 1:4; Expected token: <9 / > (la)
Return: 4: NamedNumber-156: look ahead SUCCESSFUL (la)
Return: 2: Caught SUCCESSFUL LOOKAHEAD (2/0) (at 145:5 in EnumerationItem-140) (la)
Call: 2: NamedNumber-156 (pa)
Call: 4: identifier-167 (pa)
- Consumed token: <17 / / "n"> (in jj_consume_token()) (pa)
+ Consumed token: <17 / / "n">, @ 1:3 (in jj_consume_token()) (pa)
Return: 4: identifier-167 (pa)
- Consumed token: <9 / / "("> (in jj_consume_token()) (pa)
- Consumed token: <14 / / "2"> (in jj_consume_token()) (pa)
- Consumed token: <10 / / ")"> (in jj_consume_token()) (pa)
+ Consumed token: <9 / / "(">, @ 1:4 (in jj_consume_token()) (pa)
+ Consumed token: <14 / / "2">, @ 1:5 (in jj_consume_token()) (pa)
+ Consumed token: <10 / / ")">, @ 1:6 (in jj_consume_token()) (pa)
Return: 2: NamedNumber-156 (pa)
- Consumed token: <8 / / "}"> (in jj_consume_token()) (pa)
+ Consumed token: <8 / / "}">, @ 1:8 (in jj_consume_token()) (pa)
Return: 0: EnumerationItem-140 (pa)
diff --git a/issues/bas02/src/main/javacc/Bug002.jj b/issues/bas02/src/main/javacc/Bug002.jj
index 0b15c8e..b2477ea 100644
--- a/issues/bas02/src/main/javacc/Bug002.jj
+++ b/issues/bas02/src/main/javacc/Bug002.jj
@@ -36,7 +36,7 @@ options
DEBUG_PARSER = true;
// DEBUG_TOKEN_MANAGER = true;
// JAVA_UNICODE_ESCAPE = true;
- KEEP_LINE_COLUMN = false;
+ KEEP_LINE_COLUMN = true;
NO_DFA = true;
// PARSER_INCLUDE = "stdio.h";
// TOKEN_INCLUDE = "";
diff --git a/pom.xml b/pom.xml
index e0febcc..aa8d667 100644
--- a/pom.xml
+++ b/pom.xml
@@ -122,6 +122,9 @@ THE POSSIBILITY OF SUCH DAMAGE.
${project.basedir}/it/settings.xml
true
+
+ !no_local_java_generator_version
+