From 0e0689779297319653286761e85a108f16b18237 Mon Sep 17 00:00:00 2001 From: WinkPascal <46743303+WinkPascal@users.noreply.github.com> Date: Sun, 1 Dec 2019 18:14:18 +0100 Subject: [PATCH] Add files via upload --- RichRail/README.md | 58 +- RichRail/pom.xml | 55 ++ RichRail/src/main/antlr4/parser/RichRail.g4 | 17 + RichRail/src/main/java/Main.java | 28 + .../src/main/java/parser/RichRailCli.java | 5 + RichRail/target/classes/Main.class | Bin 0 -> 856 bytes RichRail/target/classes/RichRail.tokens | 23 + RichRail/target/classes/RichRailLexer.tokens | 23 + .../target/classes/parser/RichRail.interp | 46 ++ .../classes/parser/RichRailBaseListener.class | Bin 0 -> 4218 bytes .../classes/parser/RichRailBaseVisitor.class | Bin 0 -> 5815 bytes .../target/classes/parser/RichRailCli.class | Bin 0 -> 457 bytes .../target/classes/parser/RichRailLexer.class | Bin 0 -> 6272 bytes .../classes/parser/RichRailLexer.interp | 56 ++ .../classes/parser/RichRailListener.class | Bin 0 -> 2104 bytes .../RichRailParser$AddcommandContext.class | Bin 0 -> 7621 bytes .../RichRailParser$CommandContext.class | Bin 0 -> 8555 bytes .../RichRailParser$DelcommandContext.class | Bin 0 -> 7744 bytes .../RichRailParser$GetcommandContext.class | Bin 0 -> 7780 bytes .../RichRailParser$NewcommandContext.class | Bin 0 -> 7896 bytes ...ichRailParser$NewtraincommandContext.class | Bin 0 -> 7551 bytes ...ichRailParser$NewwagoncommandContext.class | Bin 0 -> 7583 bytes .../RichRailParser$RemcommandContext.class | Bin 0 -> 7377 bytes .../parser/RichRailParser$TypeContext.class | Bin 0 -> 7077 bytes .../classes/parser/RichRailParser.class | Bin 0 -> 11044 bytes .../classes/parser/RichRailVisitor.class | Bin 0 -> 2627 bytes .../generated-sources/antlr4/RichRail.tokens | 23 + .../antlr4/RichRailLexer.tokens | 23 + .../antlr4/parser/RichRail.interp | 46 ++ .../antlr4/parser/RichRailBaseListener.java | 147 +++++ .../antlr4/parser/RichRailBaseVisitor.java | 77 +++ .../antlr4/parser/RichRailLexer.interp | 56 ++ .../antlr4/parser/RichRailLexer.java | 135 ++++ .../antlr4/parser/RichRailListener.java | 100 +++ .../antlr4/parser/RichRailParser.java | 622 ++++++++++++++++++ .../antlr4/parser/RichRailVisitor.java | 67 ++ 36 files changed, 1606 insertions(+), 1 deletion(-) create mode 100644 RichRail/pom.xml create mode 100644 RichRail/src/main/antlr4/parser/RichRail.g4 create mode 100644 RichRail/src/main/java/Main.java create mode 100644 RichRail/src/main/java/parser/RichRailCli.java create mode 100644 RichRail/target/classes/Main.class create mode 100644 RichRail/target/classes/RichRail.tokens create mode 100644 RichRail/target/classes/RichRailLexer.tokens create mode 100644 RichRail/target/classes/parser/RichRail.interp create mode 100644 RichRail/target/classes/parser/RichRailBaseListener.class create mode 100644 RichRail/target/classes/parser/RichRailBaseVisitor.class create mode 100644 RichRail/target/classes/parser/RichRailCli.class create mode 100644 RichRail/target/classes/parser/RichRailLexer.class create mode 100644 RichRail/target/classes/parser/RichRailLexer.interp create mode 100644 RichRail/target/classes/parser/RichRailListener.class create mode 100644 RichRail/target/classes/parser/RichRailParser$AddcommandContext.class create mode 100644 RichRail/target/classes/parser/RichRailParser$CommandContext.class create mode 100644 RichRail/target/classes/parser/RichRailParser$DelcommandContext.class create mode 100644 RichRail/target/classes/parser/RichRailParser$GetcommandContext.class create mode 100644 RichRail/target/classes/parser/RichRailParser$NewcommandContext.class create mode 100644 RichRail/target/classes/parser/RichRailParser$NewtraincommandContext.class create mode 100644 RichRail/target/classes/parser/RichRailParser$NewwagoncommandContext.class create mode 100644 RichRail/target/classes/parser/RichRailParser$RemcommandContext.class create mode 100644 RichRail/target/classes/parser/RichRailParser$TypeContext.class create mode 100644 RichRail/target/classes/parser/RichRailParser.class create mode 100644 RichRail/target/classes/parser/RichRailVisitor.class create mode 100644 RichRail/target/generated-sources/antlr4/RichRail.tokens create mode 100644 RichRail/target/generated-sources/antlr4/RichRailLexer.tokens create mode 100644 RichRail/target/generated-sources/antlr4/parser/RichRail.interp create mode 100644 RichRail/target/generated-sources/antlr4/parser/RichRailBaseListener.java create mode 100644 RichRail/target/generated-sources/antlr4/parser/RichRailBaseVisitor.java create mode 100644 RichRail/target/generated-sources/antlr4/parser/RichRailLexer.interp create mode 100644 RichRail/target/generated-sources/antlr4/parser/RichRailLexer.java create mode 100644 RichRail/target/generated-sources/antlr4/parser/RichRailListener.java create mode 100644 RichRail/target/generated-sources/antlr4/parser/RichRailParser.java create mode 100644 RichRail/target/generated-sources/antlr4/parser/RichRailVisitor.java diff --git a/RichRail/README.md b/RichRail/README.md index 2c19902..8b35f4e 100644 --- a/RichRail/README.md +++ b/RichRail/README.md @@ -1 +1,57 @@ -RichRail +# ANTLR4 RichRail Starter +A starter project for the RichRail command line DSL. +This project is part of an assignment for +Patterns and Frameworks at the Hogeschool Utrecht. + +# How do I set this up? +* The project uses Java 11, but you can change this in `pom.xml` if need be +* Install packages using Maven (see `pom.xml`) +* This automatically generates + the required classes through ANTLR4 +* For manually updating/regenerating the required classes + based on the grammar, you can let Maven execute the + antlr4:antlr4 command + +# How to start? +`Main.java` is the entry point. This sets up +all the required components. +It requests input, tokenizes it, parses it +and walks over the ParseTree using our custom +`RichRailCli`, which is a Listener that *extends* +the `RichRailBaseListener` generated by ANTLR4. The +Listener listens to `enter` and `exit` events. + +To configure our own actions, we need to override +the relevant methods. + +# What is going on? +ANTLR4 generates Parser, Visitor and Listener +classes based on the `RichRail.g4` grammar +found in `src/main/antlr4/parser`. +These classes contain context and methods needed +for visiting the nodes in the parse tree or +for listening to events when entering or exiting +the nodes in a parse tree. +In this example, a Visitor approach has been used. + +The `RichRailCli` is a custom class that extends +the base listener generated by ANTLR4. In this custom class, +we can overwrite the steps taken when traversing each node +in a certain expression. + +# Where are all the classes? +ANTLR4 generates these class files +in the target directory. You can use the +maven commands defined in the `pom.xml`. + +The generated classes are output to +the `target/generated-sources/antlr4` directory +and reside in the project's `parser` package. +This is due to the standard configuration of ANTLR4, +matching the location of the grammar file (`src/antlr4/parser`). +No further configuration required. + +# Author +Alex Rothuis: [@arothuis](https://twitter.com/arothuis) + +[arothuis.nl](http://arothuis.nl) diff --git a/RichRail/pom.xml b/RichRail/pom.xml new file mode 100644 index 0000000..e75c4a7 --- /dev/null +++ b/RichRail/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + + + 11 + 11 + + + nl.arothuis + antlr4-richrail-starter + 1.0-SNAPSHOT + + + + + org.antlr + antlr4-runtime + 4.7.1 + + + + org.antlr + antlr4 + 4.7.1 + + + + + + + org.antlr + antlr4-maven-plugin + 4.7.1 + + + -listener + -visitor + + + + + antlr + + antlr4 + + + + + + + + \ No newline at end of file diff --git a/RichRail/src/main/antlr4/parser/RichRail.g4 b/RichRail/src/main/antlr4/parser/RichRail.g4 new file mode 100644 index 0000000..4a01ecf --- /dev/null +++ b/RichRail/src/main/antlr4/parser/RichRail.g4 @@ -0,0 +1,17 @@ +grammar RichRail; + +// Rules +command : newcommand | addcommand | getcommand | delcommand | remcommand; +newcommand : newtraincommand | newwagoncommand; +newtraincommand : 'new' 'train' ID; +newwagoncommand : 'new' 'wagon' ID ('numseats' NUMBER)?; +addcommand : 'add' ID 'to' ID; +getcommand : 'getnumseats' type id=ID; +delcommand : 'delete' type ID; +remcommand : 'remove' ID 'from' ID; +type : 'train' | 'wagon'; + +// Tokens +ID : ('a'..'z')('a'..'z'|'0'..'9')*; +NUMBER : ('0'..'9')+; +WHITESPACE : [ \t\r\n\u000C] -> skip; \ No newline at end of file diff --git a/RichRail/src/main/java/Main.java b/RichRail/src/main/java/Main.java new file mode 100644 index 0000000..085794a --- /dev/null +++ b/RichRail/src/main/java/Main.java @@ -0,0 +1,28 @@ +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.CharStreams; +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.ParseTreeWalker; +import parser.*; + +public class Main { + public static void main(String[] args) { + CharStream lineStream = CharStreams.fromString("new train tr1"); + + // Tokenize / Lexical analysis + Lexer lexer = new RichRailLexer(lineStream); + CommonTokenStream tokens = new CommonTokenStream(lexer); + + // Create Parse Tree + RichRailParser parser = new RichRailParser(tokens); + ParseTree tree = parser.command(); + + // Create ParseTreeWalker and Custom Listener + ParseTreeWalker walker = new ParseTreeWalker(); + RichRailListener listener = new RichRailCli(); + + // Walk over ParseTree using Custom Listener that listens to enter/exit events + walker.walk(listener, tree); + } +} diff --git a/RichRail/src/main/java/parser/RichRailCli.java b/RichRail/src/main/java/parser/RichRailCli.java new file mode 100644 index 0000000..fde7f9f --- /dev/null +++ b/RichRail/src/main/java/parser/RichRailCli.java @@ -0,0 +1,5 @@ +package parser; + +public class RichRailCli extends RichRailBaseListener { + // Override methods as desired... +} diff --git a/RichRail/target/classes/Main.class b/RichRail/target/classes/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..b15c28fe57ce5f00a50237ec2ef277c6b90c7a84 GIT binary patch literal 856 zcmb7CO-~y!5Pc4TunR3A6x!b0Tf%`HD;3lWqNnYLAWc>Eb}0AAx|3k`whd!=m)O@a1_I#>Nt*-8K7=!Ehh zu(YSG4sQh(y1gND_uZIMEFf9MB9;W!GHvO@nHiBEs8LA*oy_H`94fD4ep_sYLRYMo z#a_FtV>k+Ib-!h^o=3rJJK60GTUcl18F1je^UK%};`+1oRJrn;#xi$is!J8LvvTSk zH#5~6nI`*%@+?Kl$Xr?Lf*g^&I~AN%GJK!XePT6-nI;)ske`Fd`x?#|X9w<-?Em$A zB>$806%9Pm1NRsdBn^ea)pIe*j=Md1?46N;k@#MDsPp1b>9UseJdtDaReVci7+qC7 z{97jFZo=QrlRdb|X&N_aa(9(4syuygFppxVXk#-vYD-|VJI@jV>5)70Ila@-WJ&bV zPIL%ffz8Qw1{%C$Q}Wv4tj|$!T-?6I@{bx$d5tiTV1?J!e*}(C>e^GRaU~w!X35A) cf1&-g)49a6Kb$o%Q&_1L8eA24USlu*0ux5=;{X5v literal 0 HcmV?d00001 diff --git a/RichRail/target/classes/RichRail.tokens b/RichRail/target/classes/RichRail.tokens new file mode 100644 index 0000000..90412bb --- /dev/null +++ b/RichRail/target/classes/RichRail.tokens @@ -0,0 +1,23 @@ +T__0=1 +T__1=2 +T__2=3 +T__3=4 +T__4=5 +T__5=6 +T__6=7 +T__7=8 +T__8=9 +T__9=10 +ID=11 +NUMBER=12 +WHITESPACE=13 +'new'=1 +'train'=2 +'wagon'=3 +'numseats'=4 +'add'=5 +'to'=6 +'getnumseats'=7 +'delete'=8 +'remove'=9 +'from'=10 diff --git a/RichRail/target/classes/RichRailLexer.tokens b/RichRail/target/classes/RichRailLexer.tokens new file mode 100644 index 0000000..90412bb --- /dev/null +++ b/RichRail/target/classes/RichRailLexer.tokens @@ -0,0 +1,23 @@ +T__0=1 +T__1=2 +T__2=3 +T__3=4 +T__4=5 +T__5=6 +T__6=7 +T__7=8 +T__8=9 +T__9=10 +ID=11 +NUMBER=12 +WHITESPACE=13 +'new'=1 +'train'=2 +'wagon'=3 +'numseats'=4 +'add'=5 +'to'=6 +'getnumseats'=7 +'delete'=8 +'remove'=9 +'from'=10 diff --git a/RichRail/target/classes/parser/RichRail.interp b/RichRail/target/classes/parser/RichRail.interp new file mode 100644 index 0000000..ef6017f --- /dev/null +++ b/RichRail/target/classes/parser/RichRail.interp @@ -0,0 +1,46 @@ +token literal names: +null +'new' +'train' +'wagon' +'numseats' +'add' +'to' +'getnumseats' +'delete' +'remove' +'from' +null +null +null + +token symbolic names: +null +null +null +null +null +null +null +null +null +null +null +ID +NUMBER +WHITESPACE + +rule names: +command +newcommand +newtraincommand +newwagoncommand +addcommand +getcommand +delcommand +remcommand +type + + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 15, 63, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9,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2, 43, 44, 7, 13, 2, 2, 44, 45, 7, 8, 2, 2, 45, 46, 7, 13, 2, 2, 46, 11, 3, 2, 2, 2, 47, 48, 7, 9, 2, 2, 48, 49, 5, 18, 10, 2, 49, 50, 7, 13, 2, 2, 50, 13, 3, 2, 2, 2, 51, 52, 7, 10, 2, 2, 52, 53, 5, 18, 10, 2, 53, 54, 7, 13, 2, 2, 54, 15, 3, 2, 2, 2, 55, 56, 7, 11, 2, 2, 56, 57, 7, 13, 2, 2, 57, 58, 7, 12, 2, 2, 58, 59, 7, 13, 2, 2, 59, 17, 3, 2, 2, 2, 60, 61, 9, 2, 2, 2, 61, 19, 3, 2, 2, 2, 5, 25, 29, 40] \ No newline at end of file diff --git a/RichRail/target/classes/parser/RichRailBaseListener.class b/RichRail/target/classes/parser/RichRailBaseListener.class new file mode 100644 index 0000000000000000000000000000000000000000..a106edadcc06d8e15da47168ee97f70e53a48e50 GIT binary patch literal 4218 zcmcJRTXWk)6vzJ?Ok}&cG)YMarBsEqb!bQk6aq~Pv~JoO)FgGBKq)ub-rC!dCC^Gp zn>U_#;(_7IFatC2&WB<+k}oUl^+gXn*vGqj_IHlX9{tyU|MUBw0JcywFu`!XX-l8W zjiRX3i?(p?*gm&}A8?mT11W~H&+HR>!?E4k#$NduuLK4r8J2psb+#}}-W09~K4Ew% zw|c~o%6nCA;0(j80_{lY$uy=J`{mG;-1nRlUNtLTqbVFa5T0u`rB`-%!@pr>Go?B= zMWgA-!1QEo-F5>dX!TDcst2c&4+KaQW_Wqs(Q=rek85x4eq&9NAKYktEJhv(nMZVti5J>%?!Haor^3-H{odE*6$d+Gwj*Xcx~C%9d$c9S1i z6Xg`gMm14O9pZf+j3z3lKB8Lc5bttlG*LPA5!F(MSmce-MCH^+R7(t*sE#EP2!<yX~^D_M_Tq0{AP2U+BU61C0>>tQJo}c;+Gk?+S z1m@^_l6-&^=IMJX`kloB&e4dv8H+K(1kJSwOB%w0mav?Fu&gD#hVx_Ra8XNmJptje zmT&=YjGe<5klf%zi!ZvPd3AZ$aUp0gjJ|%UYz-PEk7Pv#7&q@39 z*uj0W56Fh&FUUS5yGwST>?5)VWJ_d^$bL!oG1;%lena+Kvfq<^O1w1PB0r#v>c4?U B+k5~3 literal 0 HcmV?d00001 diff --git a/RichRail/target/classes/parser/RichRailBaseVisitor.class b/RichRail/target/classes/parser/RichRailBaseVisitor.class new file mode 100644 index 0000000000000000000000000000000000000000..8ba81086de9b16fa5cc44ccd8cd73830652997b9 GIT binary patch literal 5815 zcmcgwZFAd15Z+7OD0V~BhNP6XP^AQF)8Z5g1Y*~axJjGhro~Z1%lp~B*q4zd&*_rV zf4~egeBsA112gcQAH{Sf*_L9RHLBzB2YYqr-Dhtf-|p?{zyJUG2LM*#K!Yg)mpW89 zOsrISy;Y^$+@KEI;|`a$&>%(N+yOnJD<-v?E01aitS&W}CU9ZEs%t@Dy2vdqO9W13 zb9)3*WxK&NI747Az}XbS7Blb~Nj-gH3Fg@55o_pmyWQa?mE5-Uj<9PcYddRtCT+Bs z&f6VZNZl6AJhh}L^g6XHTk18Y_v|z2^_n9Et;@%5K!#wwFciwVv~{Y>7aiu~x0!6& z4gJWCyWHYtLoh4bW5mM~`Lf+^Q>#(7Ey;e7Ih{NDq19mf+``50+d`MPP#03~8HT7V z8l~i(cGzNw2N;41>x2O8XN(;2Cw z8a%|NTB%Inyh8mkfn}xoKtoI5?C}m)gWaLaiX<%hj?8I*eg2TRB83nEB6Au%8wwEV z<`5t!c| zCN$EZh5LWlZpJP7kUI|E&Ri1*mH=NO;pa5ItjeI&UJe!~W6VCpN zv!~!Zeov#0`#g`|v)*$CUWWx7EgqY>fFlBLz(tsXH}QE2F7>geaO`7WR$wnA#C{9j z?qgq7VCxF(%L%cs!8?8IWd-)T3hZkMv9Ck6kDXIszpuc~CB(i7AM~;F3hWgH_N|22 zAHqj{?Ar?Lj}_Rf39&!L*QLFE@|gnra|L!OA$9?Zee635?2-a|Ga>euu-?bsP+*r8 z*p)=sr(x5}nyqg3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@K`);d0hhs>YRX(>-DR4Whqk-h#(3_TXIyya+n}w27GF>m} zcMUctujPf&Yxebfy|My$fBpW$GgGIjX<=vv-XNBv6}YxNpN@s&rJ=q%hplEEn!}Ga z1ZS`>mBc$8uL7=D#`<##qy+g7A2C+i2Dp%xjcaSK4&cRJwtYt380-HPcby(L6!V!l z&9hyaH~%bm^ay?UbPnnI#w^N>L zXD8{cxO#8kGv3&EZ@Rz@v;CCVn;vGj-XWcWZ@6`j+sV_x$U(S zc=>NE=63Ur85KmM@E{8y<7q%EAWxQ#0vCAGOP;_Xnsnp;72I` za8U*e+qdF2Jj}CZy^deeviKIN!)ZV`{P1=Jjza)~$Q=h66wG@-g%H+;k!KJ=IqH#P zD91hWK9u)+Dd*B)jZO_bg zlyAUIELX8?1a9GczTf6H)(>NifO+WGFuHW$&M)EK*C;U8#iIM%{TLL$z#O24{}}F{ NBCJ3O)}Rd4e*vjUT5|vZ literal 0 HcmV?d00001 diff --git a/RichRail/target/classes/parser/RichRailLexer.interp b/RichRail/target/classes/parser/RichRailLexer.interp new file mode 100644 index 0000000..cb6db30 --- /dev/null +++ b/RichRail/target/classes/parser/RichRailLexer.interp @@ -0,0 +1,56 @@ +token literal names: +null +'new' +'train' +'wagon' +'numseats' +'add' +'to' +'getnumseats' +'delete' +'remove' +'from' +null +null +null + +token symbolic names: +null +null +null +null +null +null +null +null +null +null +null +ID +NUMBER +WHITESPACE + +rule names: +T__0 +T__1 +T__2 +T__3 +T__4 +T__5 +T__6 +T__7 +T__8 +T__9 +ID +NUMBER +WHITESPACE + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 15, 108, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9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 2, 2, 17, 73, 3, 2, 2, 2, 19, 80, 3, 2, 2, 2, 21, 87, 3, 2, 2, 2, 23, 92, 3, 2, 2, 2, 25, 100, 3, 2, 2, 2, 27, 104, 3, 2, 2, 2, 29, 30, 7, 112, 2, 2, 30, 31, 7, 103, 2, 2, 31, 32, 7, 121, 2, 2, 32, 4, 3, 2, 2, 2, 33, 34, 7, 118, 2, 2, 34, 35, 7, 116, 2, 2, 35, 36, 7, 99, 2, 2, 36, 37, 7, 107, 2, 2, 37, 38, 7, 112, 2, 2, 38, 6, 3, 2, 2, 2, 39, 40, 7, 121, 2, 2, 40, 41, 7, 99, 2, 2, 41, 42, 7, 105, 2, 2, 42, 43, 7, 113, 2, 2, 43, 44, 7, 112, 2, 2, 44, 8, 3, 2, 2, 2, 45, 46, 7, 112, 2, 2, 46, 47, 7, 119, 2, 2, 47, 48, 7, 111, 2, 2, 48, 49, 7, 117, 2, 2, 49, 50, 7, 103, 2, 2, 50, 51, 7, 99, 2, 2, 51, 52, 7, 118, 2, 2, 52, 53, 7, 117, 2, 2, 53, 10, 3, 2, 2, 2, 54, 55, 7, 99, 2, 2, 55, 56, 7, 102, 2, 2, 56, 57, 7, 102, 2, 2, 57, 12, 3, 2, 2, 2, 58, 59, 7, 118, 2, 2, 59, 60, 7, 113, 2, 2, 60, 14, 3, 2, 2, 2, 61, 62, 7, 105, 2, 2, 62, 63, 7, 103, 2, 2, 63, 64, 7, 118, 2, 2, 64, 65, 7, 112, 2, 2, 65, 66, 7, 119, 2, 2, 66, 67, 7, 111, 2, 2, 67, 68, 7, 117, 2, 2, 68, 69, 7, 103, 2, 2, 69, 70, 7, 99, 2, 2, 70, 71, 7, 118, 2, 2, 71, 72, 7, 117, 2, 2, 72, 16, 3, 2, 2, 2, 73, 74, 7, 102, 2, 2, 74, 75, 7, 103, 2, 2, 75, 76, 7, 110, 2, 2, 76, 77, 7, 103, 2, 2, 77, 78, 7, 118, 2, 2, 78, 79, 7, 103, 2, 2, 79, 18, 3, 2, 2, 2, 80, 81, 7, 116, 2, 2, 81, 82, 7, 103, 2, 2, 82, 83, 7, 111, 2, 2, 83, 84, 7, 113, 2, 2, 84, 85, 7, 120, 2, 2, 85, 86, 7, 103, 2, 2, 86, 20, 3, 2, 2, 2, 87, 88, 7, 104, 2, 2, 88, 89, 7, 116, 2, 2, 89, 90, 7, 113, 2, 2, 90, 91, 7, 111, 2, 2, 91, 22, 3, 2, 2, 2, 92, 96, 4, 99, 124, 2, 93, 95, 9, 2, 2, 2, 94, 93, 3, 2, 2, 2, 95, 98, 3, 2, 2, 2, 96, 94, 3, 2, 2, 2, 96, 97, 3, 2, 2, 2, 97, 24, 3, 2, 2, 2, 98, 96, 3, 2, 2, 2, 99, 101, 4, 50, 59, 2, 100, 99, 3, 2, 2, 2, 101, 102, 3, 2, 2, 2, 102, 100, 3, 2, 2, 2, 102, 103, 3, 2, 2, 2, 103, 26, 3, 2, 2, 2, 104, 105, 9, 3, 2, 2, 105, 106, 3, 2, 2, 2, 106, 107, 8, 14, 2, 2, 107, 28, 3, 2, 2, 2, 5, 2, 96, 102, 3, 8, 2, 2] \ No newline at end of file diff --git a/RichRail/target/classes/parser/RichRailListener.class b/RichRail/target/classes/parser/RichRailListener.class new file mode 100644 index 0000000000000000000000000000000000000000..f1741051c6bd8b40506e444410cd316c6760b3bc GIT binary patch literal 2104 zcma)-X;afc7{~vMNZL{%Ne=az(lBtu4LFG=aj1lk$Ces-krT>D6r z%%WSVS~mAB*DB{mXcYIr#MeaDRZx)1E8=p#U1-0%< zA!=2|WSPEea??Mpic|^-TuY+^8HTpGudyh*iutR5BIKGfMw^HFwiD7Ise{KU+jdCc=$hnk$;;R|j#fjzDM`jdgLmbnt zoUtaFv2;=t*Ad`!h@rPe^d+~PI(F&;Y&0{r zsZ=k%>7MAMC|2!>4%LV&!oQrTlNyLRR3k15`*NaAY9Q)Rjkql;mlJhT15t+7! zsRtN_n;m};j#3iAnV*eG?YM`sD3-0D4f@W18YYAOA^#d(0moC{3x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o;XdmxJlHd+Qha} zyGn1;jxky>jJ-ZjEwINaE1i9!Pr;iKOiQryBTs5`^lFhO1#e0oEqP*9YE6U?vDRHVj@Xm8*I9fWdFWOXNot z@?_CRvpYKNv`*a+Drlk%@G`g>Rruq3bZRu@;TnVQ_2@&M#orws4+eQW5TUE6*TKzT z%g*3t3`4ZApcC$%+oH8BraErnA7?zAwd0^*PPbET&%u|}5<9*f*^q;~N5Wyaqjg9Qz9tayJp^4o5x!4NreL{3jiY=Wef8M$ z6LgfR=lyYOC2!@!F7(;8SSQ^SYw zQB1?Y3L`^_$1(XN!=pDdu-F-zEPy3)2~R@F<6Eb W(t9two`qHT0`9<9@C{wh!18~X^!Y0Q literal 0 HcmV?d00001 diff --git a/RichRail/target/classes/parser/RichRailParser$CommandContext.class b/RichRail/target/classes/parser/RichRailParser$CommandContext.class new file mode 100644 index 0000000000000000000000000000000000000000..17b1738c51f3cbc4d82ac2d9dfe5378a170f64dd GIT binary patch literal 8555 zcmeHM>v9`46h2DRu5CivrZ?^^5L%m*1lmF&Hi6*W433*RCNnU@49Z$@)b7P-!&fvO{UWB!MeW=mA}@sasokwEKivl0eF3&#aJ=z+5_0 z)Pt4UR4u$LfyumAWdifBnH+&T*-D;o`~WE2sN+lPqjZK{rl zubzd7%0?p)vC8Z|L|kc8bwqsgEJRc`8i9y{Iemy&Zc}wceCI4gR5lu3#9QfN7(BZ| zQMQoTNx*G#{qK|GnSUJ6xKsCpG(Az9r>?YxX;Ihpq`Aw?<9HZGzVl8PszSrQDLs=m z<7+BeZn%;=Y?Dd4LM7Eu_d^pR9<(B9D!H<@tU>DDcT2D;w}K0$=BG2Jx2L-eO{d|bpB^wFc$J~Un&^>u zGc#ABdHqJ6iRK*|-q5LJN4^-AqnxY@iiwC=<2DQU85uj#U4j!kT5+TJ+YE1coBzbB z%azi|WI(JqT?TfUi z(a6~jvfk6s?{J?>bpDe=N10h(4HHBRIID*it2a~GlYcU(K~x2|LR-&lSPIJB)}7p< z9rzMdlIqi><09)-QJ^TayO*`59Phcr^GFl>{AulTsESCfEw0*~Wa zAF#wgAi)lKvrUEVB5DOy0BrPh@z5$IWHVhIq_EM3jh^H-uenq<1Tua;td2`a4p zBXpaBi-nnHua5Z!ppbX!+FqoR${Fw(!fJ^LTvf;kOh?_ufaRW>DUlfwl{EuadIBhU z0Rkv%2CVl4P|6AjpsX42RZjq=w}Al4ngN@*tT?d&kFe9*UT%4T0gsP~n}?^B(xDAE zx$k3-Gq|d;Z<#1DUv7B5gtq_#0k)X|QuyCRxP)H=XAf|d1gpP8;@g?juQ2r|&L-dr zeghhS@8Bwar$Q>2fonJ;a2;;oS4Fs~LHJ&a@DjYNMR-Mn@PiiNHF#Z%@P-D#(ju5m zy{J;WtwGq+B22?<7Y~7kLruP`LAanrxC7}fgpMsT8ic1>ggLm|g)q_P;e8E)qeWO4 z0O3b1!Uymndd)rDdjjsa{i4Im0}U??4bnyUxQX!)KEV;-Q~bM!p124(Sb`+VnS;-9 m`~t@>am?emisKrN8#oql{2IqH{w{&OU4#;B!8Xn&AonjJOa)E= literal 0 HcmV?d00001 diff --git a/RichRail/target/classes/parser/RichRailParser$DelcommandContext.class b/RichRail/target/classes/parser/RichRailParser$DelcommandContext.class new file mode 100644 index 0000000000000000000000000000000000000000..50045acbf5fbe44bc4140b0207232ce32d5cad38 GIT binary patch literal 7744 zcmeHMZEqVz5S}$@ZC^uQQkwG41=7~0B>@T);t(lH`eMm-Q^!Q&76$l9=5aI&@i4XiC#N645?|K)XT{~@s{2_PV%j~oBwlljkfBpN@F92{0Rnuz$IRA+6@kN`<=Hi3xM`&pVQ~IEV z46YQ4m1Lwk{lAM*BJwr2fmz5iIM>6vt(2>BaE8J6UrB|YYwuyhr1e|E=32PYY$W!DXbR74%LeWUNvrI*%G3nu zi(x)7H>L!`fE>I$4QJsTgVW1G3cbSMQlZk5Wm795o2B9wNm!v3s%>W*Rh<+23}z~> z#qBMwgg@?noYK3(V{n}QVoZ=0Gv#$M2C2M`$`O*=Rn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ail/target/classes/parser/RichRailParser$GetcommandContext.class b/RichRail/target/classes/parser/RichRailParser$GetcommandContext.class new file mode 100644 index 0000000000000000000000000000000000000000..fc2af5041f0830c237770788f4663becb78f7933 GIT binary patch literal 7780 zcmeHMZEqVz5S}$j&UOP$Q`+**g{G}dOHyc|5QjiW`eMm7!7-8exVf7+Tkgf$Tc-)X z0)d41fCPU6A%O(n`B8|uJ10K(E}y)Ls)ATqzVQ$-s4b-iGwWS6mY{IK$v<2l}p*uFS%V41WFEk?6VB4w^dA zX$p%g;W~O#x|1woh7}s2 z+OjuM);ZBO9a#p24L;C3KL8qD$rCMi$;+7k}?PmbY&%VK-f=bXPX! zxT7qYFlcDkXI(Ho??Wa;+-bW?KDT;rIRPm;?wUkX z82)l;FSiwLkYo2WaPFyI+8{69Y*}3HrJ#2N%XZW1TX>s z?UqM=x`R>*6Ukw9@<@t1=qOqeUaN^Rh!bJ_$>%!rOQGD&d@vuSZTWSGY^GX|1mIJYgE=IIiM<))L?z$#j&tAQHYLnd%^r!CXR&F-NKa<1Fy1`T-uy}CrK2v4Dd zNy)q`EBT+7Pb0q}JfSE8_s(B6G~5P#hEdkLyK7)G_*(4!%Fz|v&aa0?1tqy~j_4M# z;4*M@AcV)f;T{8#qiZn5MPrj6d8tZS2+^HDis(t0FJTFcY&b+4K4a!i2s9&eKd0u7 zeRYm3ooZ=+%W~RLIrgzWvRkU%POjD%+sV-PUf*@P+_9(h7`>76q&m;>nJ>LaLK3S; zW&W^2leUXWFD|A_^u;M92BwdaE|JQE!DJ(B90a=%1}_wf6+w@M+8x~R_ty-r zMmV%L>7`<%0}?ihs7sMs7Y&E2mL%f07V8UfnWZ??;`MsHv{Wk6F$>ojtPL=$zDfoR z^6PF(8t9i_8JvHj=i_&BsHIb;ZL{MAB@XpKpybln-XqT`J5=%r8cpbF@IFa4liFzv z&czI`!EFXJiQ==7E)|0_kt+@E5LV1?8hk`DOvxx?u zF&GaD;`HR9@I2~S`J+-FDqBTQJ#ak*GeB#DI){w@#$kefY4l5jEFE)nb(@|tI_Lj_ z{5R8+f51!s&{YPe={Vs(Vc)}f`aKy+!OL)guE>eu5*_0RuOuM+kccn^uSF1ijvuY;3j-PxVPy1A)P;``;+7gAHm140E@5$%XB9L GH~$ASxGp#V literal 0 HcmV?d00001 diff --git a/RichRail/target/classes/parser/RichRailParser$NewcommandContext.class b/RichRail/target/classes/parser/RichRailParser$NewcommandContext.class new file mode 100644 index 0000000000000000000000000000000000000000..f72b00de14271aef1a589a559432991f5825de94 GIT binary patch literal 7896 zcmeHMZFAd15Z+7E`i0P!l%`PLR9ae_2B*+MAr9$eoW6L*HNi2N;p0W#I9H^T=XA~s ze}jL)4}bw?3Lp5u@S_-3vJ+eAV#UO1GK@b&ilp^(&+YE*-R}PN_b)F1-~l{L!32Zb zEv|f2b2VXa*0^w1!pECc+_pW}<+4%oq{bbcf=LD!pYts~=WyAa`*Qs`+M2-yiQ8In zA-m!X?&k8913~*myU0ZblO?Z#Daa69Z-hrmc`6OBF!HG(xrQuA{1R znhAsHif40YjVlp6cVABGP2n>bpw%b|QfOe6ZQk?_X_bD_J*%YQ>M?2FFxm(-&){mV z((&Ft^B2qcwKQB~GnK(UfW~~tK3CDm$$qPQ}D6ewoiV#g-VGAlEYf$ zkrWM4YBI0iZlMZ8RwpWEGrjpGP>wQrqBv~>>alPz;4?Bh(NTgGJKE_+@mG-|sw2L` z#!|gHvN;e|k}d-~Qp88@CP>C2SAu+Weti+|zzr|DNemrvOOfNi&^zu@qj9nXo}fNi z0?X)}EP)!jBPMWkr!CVtYv;fPStv!EZrG3)(yJ@Pitsf`G;QXQ4JJ7I{ulW*;R{U> zc<}yJL)&Z8iI8@^M>{sQ!ZYmPpA4(uVddjdB*7rDykKk-onZDlDpyGER4K0uF*uXUm(%bLgYO5InfI#9(N@JV=UfajR1`!N6p0wj!Nq;W@t4H;^Pa63qQ8QkjQ(9NBT`Mw@Wr@2IZjLfQNO0L_A zh~HbN&&OpJ<4_BC>h4%jE{Zyd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2rt4X8N8l4M(3E5=Y2U+ z#PW-9cSiJ>y8D0X?$lLs>S?W~gFHkNm2+kkT}m#a%SG;UI&~M%Q*!#}<4H=rDZ#V^ zOO!9P+2Co&lggw1UF1orHzkjjJhA$9w5gXkkxrU* z(9fcm(CWcpmTHl~W)5>82Is1^W(nS4@ZI=o`e89WSs&6TQm4PPGbmF56lI_^gKJSo zAfD4xC!z%JF!)k$LP)mwyW^e0poIG(TrX;da5G5p8QhHN5Y-9lwOD^-*v+B#MR`;7 zT&@O^6klHH-b>4@rlD4Dcf0k~dX2tI@BxF399EsEYQdng=?$cbK?Rt>m19-GpwB}M zpC)DQt{+xe)FXkCOLO;t=+ktm>JkHsd#zw_aD zkw$muDWl)Yk5Kx0uJS$1{!F6+T#6(Ceuc~Qe|9JZb8v-5j2dIF()S@kfILLFnt^aG z6JZ`+iy@43cs&E*w@idL;jI`#;Yf$KGZ22yM7W*<;g3uNgI2Zx@6p@^c>icUM!MX{ u(B-cTr1Nky#P|@Z^b1gwa0?co44;ML8Tbg6;1gJe&uLtMTYm!--TgTL literal 0 HcmV?d00001 diff --git a/RichRail/target/classes/parser/RichRailParser$NewwagoncommandContext.class b/RichRail/target/classes/parser/RichRailParser$NewwagoncommandContext.class new file mode 100644 index 0000000000000000000000000000000000000000..f49bdd81f8c03078a77bee38329e177f2d819646 GIT binary patch literal 7583 zcmeHMZBH9V5T11jeksihX+qy~X(_b>HEq*2Rg93RA&Dj95aS^A<8n8cP4C6pTNCIn z=|8E|O6~XlsH$^kgMHk^%LNBo$shc(r@7f@W}cnhnf?2p-~R-F2k=7{G7OeFT>2=N zo5I|0a$#?U!}$ije97CMYkH2uU90N33J+BlrWjm*!4LSd&E59$)7=+nDh8R_Iz2Cz z>MfLxaJk*^EUYk?s?u*3@(ivGUfPh-lR0>sLH)Ta(f8~Fv<#Z4BW$jO=NcX9?b_%( zGz$4)g@(yp*HgwW8YizQ&)|kS>R_P&Ie2FVuEI42(<{OiYL&sQVtp|2wvxhaS4uks zr!HJ;{m}k>G=$Ufq%u6&E^}AeGQkhzsQ-ar&lL&qjX@am&91A2gPW-M zI#)bFx^M=Wp2mZII1BmpM{5b1hUeXqXbCgmUq4P&Zjw(&axVW`FYOT1cDpv0M;h$| z!J5;t&n!GH!GKZ@s(sHg+NfII&*(O|gMP7OczfZZGoo3;aJoM6^Z=z477}3t>e50+ zSJ5ihN3a!CoEN(g>d#dBYzR$OIQMv80unp z5rIi4iYI~51t!JfN+J5j!yP*xP9m+1bWmLAQf;KH)Sl8?R5A8X45>HY*a16DL+Q;Y z`WUL)AuX&5@*7s z@q>OAy@VDAgBfZt20KAm*f4mjSgPgVLk7Q&Zjm2%$fHdkeRXvHQyhalbv022pc&lm zxA}()b-HKB!5s$A^d^L48-90mP#EO!P=x-Xs|IccbvuKFAq@TEzfu~y{pj7*(B(va zTeMxSx{`q3Uuivz%dEy#tt_@$mDNg#zH_j^U@L`HXKF<-C~SLOX=2dUWpMLUt1r04 zq3fI)^#xo%Y@Mhl0wtH`{t?lq=29yq>@uRCg(Z^gBwcG!q>{_}EG#p)5sO0>zNUMv zlgE8SvT*-cIE;V)bdrVd2+8mPmWG?c_vz9pIK__tR|QH<IUJ8*;k&-A2V7H-mr!MiCm7>OFL!Y$Hs zj3L0*!*Dx}fiNavcn{tm(lD^%gSZAZpQzy@_;^S|<^;nh2^tm>H5e&0+)LDO7d|C_ ze@1g>VE)7(11z5>U@0ePx&mK>I*L%DUx0h`DUfvx7U4_C!}sBM3d-;md_!@6K;sN7 F{tM|g?@9mw literal 0 HcmV?d00001 diff --git a/RichRail/target/classes/parser/RichRailParser$RemcommandContext.class b/RichRail/target/classes/parser/RichRailParser$RemcommandContext.class new file mode 100644 index 0000000000000000000000000000000000000000..9933dceb388b27a0401907f45e6782d9ede9164a GIT binary patch literal 7377 zcmeHMTW=dh6h33p*j@rnQ`&Ivrj*vEB>@6Ls-s9z(u*b6RE~+n<79o}Oxc~aX2)s5 zA438O-uXB1gm|bpyWYmT-EGFM)21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/target/classes/parser/RichRailParser$TypeContext.class new file mode 100644 index 0000000000000000000000000000000000000000..a94157bfa6e237bc96df7e1fc091dca3de21e100 GIT binary patch literal 7077 zcmeHMZExE)5I%Zo{nBh{v$fg#)R(pP+9nt_U_c!N2%NqcaJ|CO0_@8GTDsWmB+8)Z zG}#{;umRim{itClS*hhpHIv$1vcVrLoAU8^ynA@$J^btM-~IrA@8EtB3Jk6fxC&8i zbcECIaN#|Ro44$v0X71u@lY3GiNWRP{D5zGT=q7;?>#|{|&*Bn{v#zbYO8ylhZ5Z&QNOM<5SdphijfA zeG-|G#sjVdCtp^|JCC+=G^NLVrqC5m6o4e~4epThv%a3W(_Y~4?$G1v$e?{J*z^b9 ziG}AS7-7#x-49%=huRK)M%m^*hSi!C?8nivCYO!n4@1J~0V*Y2B)~?{B_yNN6y9(+ zKo!L}QCcaF=Vvf^(vruD`#x8Xgolwmb2DdhlxQ{2ce<1McagB^iC@s&w%c=?1L-pP zGK%A_R>*yWWG1T_{1-ags z0NrU*UTmJN5L+VDC^2s{pV(lc^T?aX?}<=oT07JCuMRpvkB%|4>peVla1ftArgxd$ z!O3!eZC22V3ppb!GRfuC*?}~?;Jx527&5yD4G_&tet}YLSO_*MUr6q?>BMdj{Wrpw zvji3~oMQ~nS-5i&%_7|Y({N`_or_2tBOR42hOB(b;v+@yoVx7D9NXz^agMf+jCl)y z838uIbQlZAS-_Jixy~1OGUhG7V+7CJTl;1N3<8C*;571GszY;*|^ zMLYssLU1Rl+8NwV2`8n0y_TBu=+=U)EANV){Y0SR%IP1GYnqZMkC+X_un0FvGS{OFE~Rp8 z5pFZM5|>?RUlgHA7c(zkC$lcXSI5G!9}}{H#(pZokm4RGrdXER80sfMsNp(LkmyPX z2r7&|7wK7~*0=OFdSCe+Nfsa1d#dPXup|6Zo&a{RjjS74P|qIE|Dj{gga1!d(fZ literal 0 HcmV?d00001 diff --git a/RichRail/target/classes/parser/RichRailParser.class b/RichRail/target/classes/parser/RichRailParser.class new file mode 100644 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q$y8&Mkw=I3e9zS`wK(QvQk3l9qxI; zv+#)FZgQiHy|@;hP}xK=!`TG+Glro=c}o*!IGx{XmyIp9kZWrz_9oHXv6zMVwgqCR zfeOT87GAV15Nq62AQrQ*$S{_?dJ-peT>9WA4_J8JsZ>Ij+bfkYVBt;MWyQ`1Eh`qY zu*PsBd0CM&!f-OeEWD!|%X-TdfnLQ`>3Q^-_oZGp16^F``UCjagA?c`ZV?;VkN!aF zLto|_dVW##7|zhYuK|sp4I=)The default implementation does nothing.

+ */ + @Override public void enterCommand(RichRailParser.CommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCommand(RichRailParser.CommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNewcommand(RichRailParser.NewcommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNewcommand(RichRailParser.NewcommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNewtraincommand(RichRailParser.NewtraincommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNewtraincommand(RichRailParser.NewtraincommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNewwagoncommand(RichRailParser.NewwagoncommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNewwagoncommand(RichRailParser.NewwagoncommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAddcommand(RichRailParser.AddcommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAddcommand(RichRailParser.AddcommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGetcommand(RichRailParser.GetcommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGetcommand(RichRailParser.GetcommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDelcommand(RichRailParser.DelcommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDelcommand(RichRailParser.DelcommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRemcommand(RichRailParser.RemcommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRemcommand(RichRailParser.RemcommandContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterType(RichRailParser.TypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitType(RichRailParser.TypeContext ctx) { } + + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitTerminal(TerminalNode node) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitErrorNode(ErrorNode node) { } +} \ No newline at end of file diff --git a/RichRail/target/generated-sources/antlr4/parser/RichRailBaseVisitor.java b/RichRail/target/generated-sources/antlr4/parser/RichRailBaseVisitor.java new file mode 100644 index 0000000..252f5ad --- /dev/null +++ b/RichRail/target/generated-sources/antlr4/parser/RichRailBaseVisitor.java @@ -0,0 +1,77 @@ +// Generated from parser/RichRail.g4 by ANTLR 4.7.1 +package parser; +import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; + +/** + * This class provides an empty implementation of {@link RichRailVisitor}, + * which can be extended to create a visitor which only needs to handle a subset + * of the available methods. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +public class RichRailBaseVisitor extends AbstractParseTreeVisitor implements RichRailVisitor { + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCommand(RichRailParser.CommandContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitNewcommand(RichRailParser.NewcommandContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitNewtraincommand(RichRailParser.NewtraincommandContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitNewwagoncommand(RichRailParser.NewwagoncommandContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAddcommand(RichRailParser.AddcommandContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitGetcommand(RichRailParser.GetcommandContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitDelcommand(RichRailParser.DelcommandContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRemcommand(RichRailParser.RemcommandContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitType(RichRailParser.TypeContext ctx) { return visitChildren(ctx); } +} \ No newline at end of file diff --git a/RichRail/target/generated-sources/antlr4/parser/RichRailLexer.interp b/RichRail/target/generated-sources/antlr4/parser/RichRailLexer.interp new file mode 100644 index 0000000..cb6db30 --- /dev/null +++ b/RichRail/target/generated-sources/antlr4/parser/RichRailLexer.interp @@ -0,0 +1,56 @@ +token literal names: +null +'new' +'train' +'wagon' +'numseats' +'add' +'to' +'getnumseats' +'delete' +'remove' +'from' +null +null +null + +token symbolic names: +null +null +null +null +null +null +null +null +null +null +null +ID +NUMBER +WHITESPACE + +rule names: +T__0 +T__1 +T__2 +T__3 +T__4 +T__5 +T__6 +T__7 +T__8 +T__9 +ID +NUMBER +WHITESPACE + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 15, 108, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 7, 12, 95, 10, 12, 12, 12, 14, 12, 98, 11, 12, 3, 13, 6, 13, 101, 10, 13, 13, 13, 14, 13, 102, 3, 14, 3, 14, 3, 14, 3, 14, 2, 2, 15, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 3, 2, 4, 4, 2, 50, 59, 99, 124, 5, 2, 11, 12, 14, 15, 34, 34, 2, 109, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 3, 29, 3, 2, 2, 2, 5, 33, 3, 2, 2, 2, 7, 39, 3, 2, 2, 2, 9, 45, 3, 2, 2, 2, 11, 54, 3, 2, 2, 2, 13, 58, 3, 2, 2, 2, 15, 61, 3, 2, 2, 2, 17, 73, 3, 2, 2, 2, 19, 80, 3, 2, 2, 2, 21, 87, 3, 2, 2, 2, 23, 92, 3, 2, 2, 2, 25, 100, 3, 2, 2, 2, 27, 104, 3, 2, 2, 2, 29, 30, 7, 112, 2, 2, 30, 31, 7, 103, 2, 2, 31, 32, 7, 121, 2, 2, 32, 4, 3, 2, 2, 2, 33, 34, 7, 118, 2, 2, 34, 35, 7, 116, 2, 2, 35, 36, 7, 99, 2, 2, 36, 37, 7, 107, 2, 2, 37, 38, 7, 112, 2, 2, 38, 6, 3, 2, 2, 2, 39, 40, 7, 121, 2, 2, 40, 41, 7, 99, 2, 2, 41, 42, 7, 105, 2, 2, 42, 43, 7, 113, 2, 2, 43, 44, 7, 112, 2, 2, 44, 8, 3, 2, 2, 2, 45, 46, 7, 112, 2, 2, 46, 47, 7, 119, 2, 2, 47, 48, 7, 111, 2, 2, 48, 49, 7, 117, 2, 2, 49, 50, 7, 103, 2, 2, 50, 51, 7, 99, 2, 2, 51, 52, 7, 118, 2, 2, 52, 53, 7, 117, 2, 2, 53, 10, 3, 2, 2, 2, 54, 55, 7, 99, 2, 2, 55, 56, 7, 102, 2, 2, 56, 57, 7, 102, 2, 2, 57, 12, 3, 2, 2, 2, 58, 59, 7, 118, 2, 2, 59, 60, 7, 113, 2, 2, 60, 14, 3, 2, 2, 2, 61, 62, 7, 105, 2, 2, 62, 63, 7, 103, 2, 2, 63, 64, 7, 118, 2, 2, 64, 65, 7, 112, 2, 2, 65, 66, 7, 119, 2, 2, 66, 67, 7, 111, 2, 2, 67, 68, 7, 117, 2, 2, 68, 69, 7, 103, 2, 2, 69, 70, 7, 99, 2, 2, 70, 71, 7, 118, 2, 2, 71, 72, 7, 117, 2, 2, 72, 16, 3, 2, 2, 2, 73, 74, 7, 102, 2, 2, 74, 75, 7, 103, 2, 2, 75, 76, 7, 110, 2, 2, 76, 77, 7, 103, 2, 2, 77, 78, 7, 118, 2, 2, 78, 79, 7, 103, 2, 2, 79, 18, 3, 2, 2, 2, 80, 81, 7, 116, 2, 2, 81, 82, 7, 103, 2, 2, 82, 83, 7, 111, 2, 2, 83, 84, 7, 113, 2, 2, 84, 85, 7, 120, 2, 2, 85, 86, 7, 103, 2, 2, 86, 20, 3, 2, 2, 2, 87, 88, 7, 104, 2, 2, 88, 89, 7, 116, 2, 2, 89, 90, 7, 113, 2, 2, 90, 91, 7, 111, 2, 2, 91, 22, 3, 2, 2, 2, 92, 96, 4, 99, 124, 2, 93, 95, 9, 2, 2, 2, 94, 93, 3, 2, 2, 2, 95, 98, 3, 2, 2, 2, 96, 94, 3, 2, 2, 2, 96, 97, 3, 2, 2, 2, 97, 24, 3, 2, 2, 2, 98, 96, 3, 2, 2, 2, 99, 101, 4, 50, 59, 2, 100, 99, 3, 2, 2, 2, 101, 102, 3, 2, 2, 2, 102, 100, 3, 2, 2, 2, 102, 103, 3, 2, 2, 2, 103, 26, 3, 2, 2, 2, 104, 105, 9, 3, 2, 2, 105, 106, 3, 2, 2, 2, 106, 107, 8, 14, 2, 2, 107, 28, 3, 2, 2, 2, 5, 2, 96, 102, 3, 8, 2, 2] \ No newline at end of file diff --git a/RichRail/target/generated-sources/antlr4/parser/RichRailLexer.java b/RichRail/target/generated-sources/antlr4/parser/RichRailLexer.java new file mode 100644 index 0000000..69750dd --- /dev/null +++ b/RichRail/target/generated-sources/antlr4/parser/RichRailLexer.java @@ -0,0 +1,135 @@ +// Generated from parser/RichRail.g4 by ANTLR 4.7.1 +package parser; +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class RichRailLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.7.1", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, + T__9=10, ID=11, NUMBER=12, WHITESPACE=13; + public static String[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] ruleNames = { + "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", + "T__9", "ID", "NUMBER", "WHITESPACE" + }; + + private static final String[] _LITERAL_NAMES = { + null, "'new'", "'train'", "'wagon'", "'numseats'", "'add'", "'to'", "'getnumseats'", + "'delete'", "'remove'", "'from'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, null, null, null, null, null, null, null, null, null, null, "ID", + "NUMBER", "WHITESPACE" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public RichRailLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "RichRail.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getChannelNames() { return channelNames; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + public static final String _serializedATN = + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\17l\b\1\4\2\t\2\4"+ + "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ + "\13\4\f\t\f\4\r\t\r\4\16\t\16\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3"+ + "\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3"+ + "\6\3\6\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\t"+ + "\3\t\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3"+ + "\13\3\13\3\f\3\f\7\f_\n\f\f\f\16\fb\13\f\3\r\6\re\n\r\r\r\16\rf\3\16\3"+ + "\16\3\16\3\16\2\2\17\3\3\5\4\7\5\t\6\13\7\r\b\17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\2Z[\7o\2\2[\26\3\2\2\2\\`\4c|\2]_\t\2\2\2^]\3\2\2\2_b\3\2"+ + "\2\2`^\3\2\2\2`a\3\2\2\2a\30\3\2\2\2b`\3\2\2\2ce\4\62;\2dc\3\2\2\2ef\3"+ + "\2\2\2fd\3\2\2\2fg\3\2\2\2g\32\3\2\2\2hi\t\3\2\2ij\3\2\2\2jk\b\16\2\2"+ + "k\34\3\2\2\2\5\2`f\3\b\2\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/RichRail/target/generated-sources/antlr4/parser/RichRailListener.java b/RichRail/target/generated-sources/antlr4/parser/RichRailListener.java new file mode 100644 index 0000000..076d09d --- /dev/null +++ b/RichRail/target/generated-sources/antlr4/parser/RichRailListener.java @@ -0,0 +1,100 @@ +// Generated from parser/RichRail.g4 by ANTLR 4.7.1 +package parser; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link RichRailParser}. + */ +public interface RichRailListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link RichRailParser#command}. + * @param ctx the parse tree + */ + void enterCommand(RichRailParser.CommandContext ctx); + /** + * Exit a parse tree produced by {@link RichRailParser#command}. + * @param ctx the parse tree + */ + void exitCommand(RichRailParser.CommandContext ctx); + /** + * Enter a parse tree produced by {@link RichRailParser#newcommand}. + * @param ctx the parse tree + */ + void enterNewcommand(RichRailParser.NewcommandContext ctx); + /** + * Exit a parse tree produced by {@link RichRailParser#newcommand}. + * @param ctx the parse tree + */ + void exitNewcommand(RichRailParser.NewcommandContext ctx); + /** + * Enter a parse tree produced by {@link RichRailParser#newtraincommand}. + * @param ctx the parse tree + */ + void enterNewtraincommand(RichRailParser.NewtraincommandContext ctx); + /** + * Exit a parse tree produced by {@link RichRailParser#newtraincommand}. + * @param ctx the parse tree + */ + void exitNewtraincommand(RichRailParser.NewtraincommandContext ctx); + /** + * Enter a parse tree produced by {@link RichRailParser#newwagoncommand}. + * @param ctx the parse tree + */ + void enterNewwagoncommand(RichRailParser.NewwagoncommandContext ctx); + /** + * Exit a parse tree produced by {@link RichRailParser#newwagoncommand}. + * @param ctx the parse tree + */ + void exitNewwagoncommand(RichRailParser.NewwagoncommandContext ctx); + /** + * Enter a parse tree produced by {@link RichRailParser#addcommand}. + * @param ctx the parse tree + */ + void enterAddcommand(RichRailParser.AddcommandContext ctx); + /** + * Exit a parse tree produced by {@link RichRailParser#addcommand}. + * @param ctx the parse tree + */ + void exitAddcommand(RichRailParser.AddcommandContext ctx); + /** + * Enter a parse tree produced by {@link RichRailParser#getcommand}. + * @param ctx the parse tree + */ + void enterGetcommand(RichRailParser.GetcommandContext ctx); + /** + * Exit a parse tree produced by {@link RichRailParser#getcommand}. + * @param ctx the parse tree + */ + void exitGetcommand(RichRailParser.GetcommandContext ctx); + /** + * Enter a parse tree produced by {@link RichRailParser#delcommand}. + * @param ctx the parse tree + */ + void enterDelcommand(RichRailParser.DelcommandContext ctx); + /** + * Exit a parse tree produced by {@link RichRailParser#delcommand}. + * @param ctx the parse tree + */ + void exitDelcommand(RichRailParser.DelcommandContext ctx); + /** + * Enter a parse tree produced by {@link RichRailParser#remcommand}. + * @param ctx the parse tree + */ + void enterRemcommand(RichRailParser.RemcommandContext ctx); + /** + * Exit a parse tree produced by {@link RichRailParser#remcommand}. + * @param ctx the parse tree + */ + void exitRemcommand(RichRailParser.RemcommandContext ctx); + /** + * Enter a parse tree produced by {@link RichRailParser#type}. + * @param ctx the parse tree + */ + void enterType(RichRailParser.TypeContext ctx); + /** + * Exit a parse tree produced by {@link RichRailParser#type}. + * @param ctx the parse tree + */ + void exitType(RichRailParser.TypeContext ctx); +} \ No newline at end of file diff --git a/RichRail/target/generated-sources/antlr4/parser/RichRailParser.java b/RichRail/target/generated-sources/antlr4/parser/RichRailParser.java new file mode 100644 index 0000000..c4adf8f --- /dev/null +++ b/RichRail/target/generated-sources/antlr4/parser/RichRailParser.java @@ -0,0 +1,622 @@ +// Generated from parser/RichRail.g4 by ANTLR 4.7.1 +package parser; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class RichRailParser extends Parser { + static { RuntimeMetaData.checkVersion("4.7.1", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, + T__9=10, ID=11, NUMBER=12, WHITESPACE=13; + public static final int + RULE_command = 0, RULE_newcommand = 1, RULE_newtraincommand = 2, RULE_newwagoncommand = 3, + RULE_addcommand = 4, RULE_getcommand = 5, RULE_delcommand = 6, RULE_remcommand = 7, + RULE_type = 8; + public static final String[] ruleNames = { + "command", "newcommand", "newtraincommand", "newwagoncommand", "addcommand", + "getcommand", "delcommand", "remcommand", "type" + }; + + private static final String[] _LITERAL_NAMES = { + null, "'new'", "'train'", "'wagon'", "'numseats'", "'add'", "'to'", "'getnumseats'", + "'delete'", "'remove'", "'from'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, null, null, null, null, null, null, null, null, null, null, "ID", + "NUMBER", "WHITESPACE" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + @Override + public String getGrammarFileName() { return "RichRail.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public RichRailParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class CommandContext extends ParserRuleContext { + public NewcommandContext newcommand() { + return getRuleContext(NewcommandContext.class,0); + } + public AddcommandContext addcommand() { + return getRuleContext(AddcommandContext.class,0); + } + public GetcommandContext getcommand() { + return getRuleContext(GetcommandContext.class,0); + } + public DelcommandContext delcommand() { + return getRuleContext(DelcommandContext.class,0); + } + public RemcommandContext remcommand() { + return getRuleContext(RemcommandContext.class,0); + } + public CommandContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_command; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).enterCommand(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).exitCommand(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RichRailVisitor ) return ((RichRailVisitor)visitor).visitCommand(this); + else return visitor.visitChildren(this); + } + } + + public final CommandContext command() throws RecognitionException { + CommandContext _localctx = new CommandContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_command); + try { + setState(23); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__0: + enterOuterAlt(_localctx, 1); + { + setState(18); + newcommand(); + } + break; + case T__4: + enterOuterAlt(_localctx, 2); + { + setState(19); + addcommand(); + } + break; + case T__6: + enterOuterAlt(_localctx, 3); + { + setState(20); + getcommand(); + } + break; + case T__7: + enterOuterAlt(_localctx, 4); + { + setState(21); + delcommand(); + } + break; + case T__8: + enterOuterAlt(_localctx, 5); + { + setState(22); + remcommand(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NewcommandContext extends ParserRuleContext { + public NewtraincommandContext newtraincommand() { + return getRuleContext(NewtraincommandContext.class,0); + } + public NewwagoncommandContext newwagoncommand() { + return getRuleContext(NewwagoncommandContext.class,0); + } + public NewcommandContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_newcommand; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).enterNewcommand(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).exitNewcommand(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RichRailVisitor ) return ((RichRailVisitor)visitor).visitNewcommand(this); + else return visitor.visitChildren(this); + } + } + + public final NewcommandContext newcommand() throws RecognitionException { + NewcommandContext _localctx = new NewcommandContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_newcommand); + try { + setState(27); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(25); + newtraincommand(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(26); + newwagoncommand(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NewtraincommandContext extends ParserRuleContext { + public TerminalNode ID() { return getToken(RichRailParser.ID, 0); } + public NewtraincommandContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_newtraincommand; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).enterNewtraincommand(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).exitNewtraincommand(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RichRailVisitor ) return ((RichRailVisitor)visitor).visitNewtraincommand(this); + else return visitor.visitChildren(this); + } + } + + public final NewtraincommandContext newtraincommand() throws RecognitionException { + NewtraincommandContext _localctx = new NewtraincommandContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_newtraincommand); + try { + enterOuterAlt(_localctx, 1); + { + setState(29); + match(T__0); + setState(30); + match(T__1); + setState(31); + match(ID); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NewwagoncommandContext extends ParserRuleContext { + public TerminalNode ID() { return getToken(RichRailParser.ID, 0); } + public TerminalNode NUMBER() { return getToken(RichRailParser.NUMBER, 0); } + public NewwagoncommandContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_newwagoncommand; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).enterNewwagoncommand(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).exitNewwagoncommand(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RichRailVisitor ) return ((RichRailVisitor)visitor).visitNewwagoncommand(this); + else return visitor.visitChildren(this); + } + } + + public final NewwagoncommandContext newwagoncommand() throws RecognitionException { + NewwagoncommandContext _localctx = new NewwagoncommandContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_newwagoncommand); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(33); + match(T__0); + setState(34); + match(T__2); + setState(35); + match(ID); + setState(38); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==T__3) { + { + setState(36); + match(T__3); + setState(37); + match(NUMBER); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AddcommandContext extends ParserRuleContext { + public List ID() { return getTokens(RichRailParser.ID); } + public TerminalNode ID(int i) { + return getToken(RichRailParser.ID, i); + } + public AddcommandContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_addcommand; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).enterAddcommand(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).exitAddcommand(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RichRailVisitor ) return ((RichRailVisitor)visitor).visitAddcommand(this); + else return visitor.visitChildren(this); + } + } + + public final AddcommandContext addcommand() throws RecognitionException { + AddcommandContext _localctx = new AddcommandContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_addcommand); + try { + enterOuterAlt(_localctx, 1); + { + setState(40); + match(T__4); + setState(41); + match(ID); + setState(42); + match(T__5); + setState(43); + match(ID); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GetcommandContext extends ParserRuleContext { + public Token id; + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public TerminalNode ID() { return getToken(RichRailParser.ID, 0); } + public GetcommandContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_getcommand; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).enterGetcommand(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).exitGetcommand(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RichRailVisitor ) return ((RichRailVisitor)visitor).visitGetcommand(this); + else return visitor.visitChildren(this); + } + } + + public final GetcommandContext getcommand() throws RecognitionException { + GetcommandContext _localctx = new GetcommandContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_getcommand); + try { + enterOuterAlt(_localctx, 1); + { + setState(45); + match(T__6); + setState(46); + type(); + setState(47); + ((GetcommandContext)_localctx).id = match(ID); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DelcommandContext extends ParserRuleContext { + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public TerminalNode ID() { return getToken(RichRailParser.ID, 0); } + public DelcommandContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_delcommand; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).enterDelcommand(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).exitDelcommand(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RichRailVisitor ) return ((RichRailVisitor)visitor).visitDelcommand(this); + else return visitor.visitChildren(this); + } + } + + public final DelcommandContext delcommand() throws RecognitionException { + DelcommandContext _localctx = new DelcommandContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_delcommand); + try { + enterOuterAlt(_localctx, 1); + { + setState(49); + match(T__7); + setState(50); + type(); + setState(51); + match(ID); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RemcommandContext extends ParserRuleContext { + public List ID() { return getTokens(RichRailParser.ID); } + public TerminalNode ID(int i) { + return getToken(RichRailParser.ID, i); + } + public RemcommandContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_remcommand; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).enterRemcommand(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).exitRemcommand(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RichRailVisitor ) return ((RichRailVisitor)visitor).visitRemcommand(this); + else return visitor.visitChildren(this); + } + } + + public final RemcommandContext remcommand() throws RecognitionException { + RemcommandContext _localctx = new RemcommandContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_remcommand); + try { + enterOuterAlt(_localctx, 1); + { + setState(53); + match(T__8); + setState(54); + match(ID); + setState(55); + match(T__9); + setState(56); + match(ID); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeContext extends ParserRuleContext { + public TypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_type; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).enterType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof RichRailListener ) ((RichRailListener)listener).exitType(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RichRailVisitor ) return ((RichRailVisitor)visitor).visitType(this); + else return visitor.visitChildren(this); + } + } + + public final TypeContext type() throws RecognitionException { + TypeContext _localctx = new TypeContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_type); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(58); + _la = _input.LA(1); + if ( !(_la==T__1 || _la==T__2) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static final String _serializedATN = + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\17?\4\2\t\2\4\3\t"+ + "\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\3\2\3\2\3\2"+ + "\3\2\3\2\5\2\32\n\2\3\3\3\3\5\3\36\n\3\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5"+ + "\3\5\5\5)\n\5\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\t"+ + "\3\t\3\t\3\t\3\t\3\n\3\n\3\n\2\2\13\2\4\6\b\n\f\16\20\22\2\3\3\2\4\5\2"+ + ";\2\31\3\2\2\2\4\35\3\2\2\2\6\37\3\2\2\2\b#\3\2\2\2\n*\3\2\2\2\f/\3\2"+ + "\2\2\16\63\3\2\2\2\20\67\3\2\2\2\22<\3\2\2\2\24\32\5\4\3\2\25\32\5\n\6"+ + "\2\26\32\5\f\7\2\27\32\5\16\b\2\30\32\5\20\t\2\31\24\3\2\2\2\31\25\3\2"+ + "\2\2\31\26\3\2\2\2\31\27\3\2\2\2\31\30\3\2\2\2\32\3\3\2\2\2\33\36\5\6"+ + "\4\2\34\36\5\b\5\2\35\33\3\2\2\2\35\34\3\2\2\2\36\5\3\2\2\2\37 \7\3\2"+ + "\2 !\7\4\2\2!\"\7\r\2\2\"\7\3\2\2\2#$\7\3\2\2$%\7\5\2\2%(\7\r\2\2&\'\7"+ + "\6\2\2\')\7\16\2\2(&\3\2\2\2()\3\2\2\2)\t\3\2\2\2*+\7\7\2\2+,\7\r\2\2"+ + ",-\7\b\2\2-.\7\r\2\2.\13\3\2\2\2/\60\7\t\2\2\60\61\5\22\n\2\61\62\7\r"+ + "\2\2\62\r\3\2\2\2\63\64\7\n\2\2\64\65\5\22\n\2\65\66\7\r\2\2\66\17\3\2"+ + "\2\2\678\7\13\2\289\7\r\2\29:\7\f\2\2:;\7\r\2\2;\21\3\2\2\2<=\t\2\2\2"+ + "=\23\3\2\2\2\5\31\35("; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/RichRail/target/generated-sources/antlr4/parser/RichRailVisitor.java b/RichRail/target/generated-sources/antlr4/parser/RichRailVisitor.java new file mode 100644 index 0000000..40d2bbb --- /dev/null +++ b/RichRail/target/generated-sources/antlr4/parser/RichRailVisitor.java @@ -0,0 +1,67 @@ +// Generated from parser/RichRail.g4 by ANTLR 4.7.1 +package parser; +import org.antlr.v4.runtime.tree.ParseTreeVisitor; + +/** + * This interface defines a complete generic visitor for a parse tree produced + * by {@link RichRailParser}. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +public interface RichRailVisitor extends ParseTreeVisitor { + /** + * Visit a parse tree produced by {@link RichRailParser#command}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCommand(RichRailParser.CommandContext ctx); + /** + * Visit a parse tree produced by {@link RichRailParser#newcommand}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitNewcommand(RichRailParser.NewcommandContext ctx); + /** + * Visit a parse tree produced by {@link RichRailParser#newtraincommand}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitNewtraincommand(RichRailParser.NewtraincommandContext ctx); + /** + * Visit a parse tree produced by {@link RichRailParser#newwagoncommand}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitNewwagoncommand(RichRailParser.NewwagoncommandContext ctx); + /** + * Visit a parse tree produced by {@link RichRailParser#addcommand}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAddcommand(RichRailParser.AddcommandContext ctx); + /** + * Visit a parse tree produced by {@link RichRailParser#getcommand}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitGetcommand(RichRailParser.GetcommandContext ctx); + /** + * Visit a parse tree produced by {@link RichRailParser#delcommand}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitDelcommand(RichRailParser.DelcommandContext ctx); + /** + * Visit a parse tree produced by {@link RichRailParser#remcommand}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRemcommand(RichRailParser.RemcommandContext ctx); + /** + * Visit a parse tree produced by {@link RichRailParser#type}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitType(RichRailParser.TypeContext ctx); +} \ No newline at end of file