Skip to content

Commit 68b0d18

Browse files
mmazasmmazas
authored andcommitted
Clearer traces.
Signed-off-by: mmazas <[email protected]>
1 parent d98d8ad commit 68b0d18

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

issues/bas01/files/clc1.exp_err

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Read 1st char for any kind: `97 / 'a'´, @ 1:1 (tm)
1212
Cur char: `9 / '\t'´ (tm)
1313
Looking to move from state: <,>-2, for token: <10 / <Id>> (tm)
1414
Done with NFA, at pos: 2 (tm)
15-
Returning token: "aa" (tm)
15+
Found a MATCH ***; returning token: "aa" (tm)
1616
Read 1st char for any kind: `9 / '\t'´, @ 1:3 (tm)
1717
<DEFAULT>-0 Current input char: `9 / '\t'´, @ 1:3 (tm)
1818
Looking for string literal match of token: <2 / "\t"> (tm)
@@ -238,7 +238,7 @@ Read 1st char for any kind: `116 / 't'´, @ 2:1 (tm)
238238
Cur char: `32 / ' '´ (tm)
239239
Looking to move from state: <,>-2, for token: <10 / <Id>> (tm)
240240
Done with NFA, at pos: 3 (tm)
241-
Returning token: "ten" (tm)
241+
Found a MATCH ***; returning token: "ten" (tm)
242242
Read 1st char for any kind: `32 / ' '´, @ 2:4 (tm)
243243
<DEFAULT>-0 Current input char: `32 / ' '´, @ 2:4 (tm)
244244
Looking for string literal match of token: <1 / " "> (tm)
@@ -266,7 +266,7 @@ Read 1st char for any kind: `73 / 'I'´, @ 2:5 (tm)
266266
Cur char: `32 / ' '´ (tm)
267267
Looking to move from state: <,>-2, for token: <10 / <Id>> (tm)
268268
Done with NFA, at pos: 4 (tm)
269-
Returning token: "Int1" (tm)
269+
Found a MATCH ***; returning token: "Int1" (tm)
270270
Read 1st char for any kind: `32 / ' '´, @ 2:9 (tm)
271271
<DEFAULT>-0 Current input char: `32 / ' '´, @ 2:9 (tm)
272272
Looking for string literal match of token: <1 / " "> (tm)
@@ -309,7 +309,7 @@ Read 1st char for any kind: `111 / 'o'´, @ 2:10 (tm)
309309
Cur char: `13 / '\r'´ (tm)
310310
Looking to move from state: <,>-2, for token: <10 / <Id>> (tm)
311311
Done with NFA, at pos: 9 (tm)
312-
Returning token: "other-ten" (tm)
312+
Found a MATCH ***; returning token: "other-ten" (tm)
313313
Read 1st char for any kind: `13 / '\r'´, @ 2:19 (tm)
314314
<DEFAULT>-0 Current input char: `13 / '\r'´, @ 2:19 (tm)
315315
Looking for string literal match of token: <4 / "\r"> (tm)
@@ -359,7 +359,7 @@ Read 1st char for any kind: `111 / 'o'´, @ 3:1 (tm)
359359
Cur char: `32 / ' '´ (tm)
360360
Looking to move from state: <,>-2, for token: <10 / <Id>> (tm)
361361
Done with NFA, at pos: 9 (tm)
362-
Returning token: "other-ten" (tm)
362+
Found a MATCH ***; returning token: "other-ten" (tm)
363363
Read 1st char for any kind: `32 / ' '´, @ 3:10 (tm)
364364
<DEFAULT>-0 Current input char: `32 / ' '´, @ 3:10 (tm)
365365
Looking for string literal match of token: <1 / " "> (tm)
@@ -387,7 +387,7 @@ Read 1st char for any kind: `73 / 'I'´, @ 3:11 (tm)
387387
Cur char: `13 / '\r'´ (tm)
388388
Looking to move from state: <,>-2, for token: <10 / <Id>> (tm)
389389
Done with NFA, at pos: 4 (tm)
390-
Returning token: "Int2" (tm)
390+
Found a MATCH ***; returning token: "Int2" (tm)
391391
Read 1st char for any kind: `13 / '\r'´, @ 3:15 (tm)
392392
<DEFAULT>-0 Current input char: `13 / '\r'´, @ 3:15 (tm)
393393
Looking for string literal match of token: <4 / "\r"> (tm)

issues/bas01/files/clc2.exp_err

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Read 1st char for any kind: `97 / 'a'´, @ 1:1 (tm)
1212
Cur char: `32 / ' '´ (tm)
1313
Looking to move from state: <,>-2, for token: <10 / <Id>> (tm)
1414
Done with NFA, at pos: 2 (tm)
15-
Returning token: "aa" (tm)
15+
Found a MATCH ***; returning token: "aa" (tm)
1616
Read 1st char for any kind: `32 / ' '´, @ 1:3 (tm)
1717
<DEFAULT>-0 Current input char: `32 / ' '´, @ 1:3 (tm)
1818
Looking for string literal match of token: <1 / " "> (tm)
@@ -96,7 +96,7 @@ Read 1st char for any kind: `98 / 'b'´, @ 1:14 (tm)
9696
Cur char: `13 / '\r'´ (tm)
9797
Looking to move from state: <,>-2, for token: <10 / <Id>> (tm)
9898
Done with NFA, at pos: 2 (tm)
99-
Returning token: "bb" (tm)
99+
Found a MATCH ***; returning token: "bb" (tm)
100100
Read 1st char for any kind: `13 / '\r'´, @ 1:16 (tm)
101101
<DEFAULT>-0 Current input char: `13 / '\r'´, @ 1:16 (tm)
102102
Looking for string literal match of token: <4 / "\r"> (tm)
@@ -125,7 +125,7 @@ Read 1st char for any kind: `52 / '4'´, @ 2:1 (tm)
125125
Cur char: `13 / '\r'´ (tm)
126126
Looking to move from state: <DEFAULT>-0, for token: <7 / <INTEGER>> (tm)
127127
Done with NFA, at pos: 2 (tm)
128-
Returning token: "45" (tm)
128+
Found a MATCH ***; returning token: "45" (tm)
129129
ParseException parsing input file
130130
Encountered: <INTEGER> / "45", at line 2, column 1.
131131
Was expecting one of these terminals within expansion starting at 147:3:

issues/bas01/files/clc3.exp_err

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Read 1st char for any kind: `97 / 'a'´, @ 1:1 (tm)
1212
Cur char: `32 / ' '´ (tm)
1313
Looking to move from state: <,>-2, for token: <10 / <Id>> (tm)
1414
Done with NFA, at pos: 2 (tm)
15-
Returning token: "aa" (tm)
15+
Found a MATCH ***; returning token: "aa" (tm)
1616
Read 1st char for any kind: `32 / ' '´, @ 1:3 (tm)
1717
<DEFAULT>-0 Current input char: `32 / ' '´, @ 1:3 (tm)
1818
Looking for string literal match of token: <1 / " "> (tm)
@@ -96,7 +96,7 @@ Read 1st char for any kind: `98 / 'b'´, @ 1:14 (tm)
9696
Cur char: `13 / '\r'´ (tm)
9797
Looking to move from state: <,>-2, for token: <10 / <Id>> (tm)
9898
Done with NFA, at pos: 2 (tm)
99-
Returning token: "bb" (tm)
99+
Found a MATCH ***; returning token: "bb" (tm)
100100
Read 1st char for any kind: `13 / '\r'´, @ 1:16 (tm)
101101
<DEFAULT>-0 Current input char: `13 / '\r'´, @ 1:16 (tm)
102102
Looking for string literal match of token: <4 / "\r"> (tm)

it/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
123123
<library>
124124
<type>executable</type>
125125
<!-- just compile, link and package, do not run anything by default; runs will be
126-
through the maven-exec-plugin or this nar plugin (with overriden setting) -->
126+
through the exec-maven-plugin or this nar plugin (with overriden setting) -->
127127
<run>false</run>
128128
</library>
129129
</libraries>

src/main/resources/templates/cpp/TokenManagerDriver.cc.template

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Token * ${parserName}TokenManager::getNextToken() {
213213
#fi
214214
#if DEBUG_TOKEN_MANAGER
215215
if (trace_enabled()) {
216-
JJERR << JJWIDE(Returning token:) << JJSPACE
216+
JJERR << JJWIDE(Found a MATCH ***; returning token:) << JJSPACE
217217
<< JJDBQUOTE << addUnicodeEscapes(matchedToken->image()) << JJDBQUOTE
218218
<< JJSPACE << JJWIDE((tm)) << std::endl;
219219
}
@@ -479,16 +479,16 @@ int ${parserName}TokenManager::jjMoveNfa(int startState, int curPos) {
479479
moveIndex = 1;
480480
}
481481

482-
// We initialize the kind to MAX value so that when a match is found, we can
483-
// simply check if it's less than the current match and store it in that
484-
// case. This helps implement the 'first occurring' rule properly.
482+
// We initialize the kind to MAX value so that when a match is found, we can
483+
// simply check if it's less than the current match and store it in that case.
484+
// This helps implement the 'first occurring' rule properly.
485485
int cnt = 0;
486486
stateSet[cnt++] = startState;
487487
moved[startState] = moveIndex;
488488

489-
// Some NFA states have epsilon transitions (move on empty string). So we
490-
// just start with all of them. Note that the nextStates array already adds
491-
// the epsilon closure. Only the initial state needs to do this explicitly.
489+
// Some NFA states have epsilon transitions (move on empty string).
490+
// So we just start with all of them. Note that the nextStates array already adds
491+
// the epsilon closure. Only the initial state needs to do this explicitly.
492492
for (int s : jjcompositeState[startState]) {
493493
if (moved[s] != moveIndex) {
494494
stateSet[cnt++] = s;

0 commit comments

Comments
 (0)