File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 16
16
<project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
17
17
<maven .compiler.source>11</maven .compiler.source>
18
18
<maven .compiler.target>11</maven .compiler.target>
19
+ <antlr4 .visitor>true</antlr4 .visitor>
20
+ <antlr4 .listener>true</antlr4 .listener>
19
21
</properties >
20
22
21
23
<build >
58
60
<groupId >org.antlr</groupId >
59
61
<artifactId >antlr4-maven-plugin</artifactId >
60
62
<version >4.7.1</version >
63
+ <configuration >
64
+ <visitor >true</visitor >
65
+ </configuration >
61
66
<executions >
62
67
<execution >
63
68
<goals >
Original file line number Diff line number Diff line change 5
5
import org .antlr .v4 .runtime .CharStream ;
6
6
import org .antlr .v4 .runtime .CommonTokenStream ;
7
7
8
+ import main .antlr4 .TinyXLexer ;
9
+ import main .antlr4 .TinyXParser ;
10
+
8
11
public class Main {
9
12
10
13
public static void main (String [] args ) {
Original file line number Diff line number Diff line change 1
1
import java .util .HashMap ;
2
2
3
+ import main .antlr4 .TinyXBaseListener ;
4
+ import main .antlr4 .TinyXParser ;
5
+
3
6
/**
4
7
*
5
8
* @author Shalitha Suranga
@@ -29,7 +32,6 @@ public void exitLet(TinyXParser.LetContext ctx) {
29
32
}
30
33
else
31
34
{
32
-
33
35
this .variableMap .put (variableName , Integer .parseInt (value ));
34
36
}
35
37
}
You can’t perform that action at this time.
0 commit comments