YarnSpinnerParser.cs 110 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by a tool.
  4. // ANTLR Version: 4.7
  5. //
  6. // Changes to this file may cause incorrect behavior and will be lost if
  7. // the code is regenerated.
  8. // </auto-generated>
  9. //------------------------------------------------------------------------------
  10. // Generated from YarnSpinnerParser.g4 by ANTLR 4.7
  11. // Unreachable code detected
  12. #pragma warning disable 0162
  13. // The variable '...' is assigned but its value is never used
  14. #pragma warning disable 0219
  15. // Missing XML comment for publicly visible type or member '...'
  16. #pragma warning disable 1591
  17. // Ambiguous reference in cref attribute
  18. #pragma warning disable 419
  19. using System;
  20. using System.IO;
  21. using System.Text;
  22. using System.Diagnostics;
  23. using System.Collections.Generic;
  24. using Antlr4.Runtime;
  25. using Antlr4.Runtime.Atn;
  26. using Antlr4.Runtime.Misc;
  27. using Antlr4.Runtime.Tree;
  28. using DFA = Antlr4.Runtime.Dfa.DFA;
  29. [System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.7")]
  30. [System.CLSCompliant(false)]
  31. public partial class YarnSpinnerParser : Parser {
  32. protected static DFA[] decisionToDFA;
  33. protected static PredictionContextCache sharedContextCache = new PredictionContextCache();
  34. public const int
  35. BODY_ENTER=1, HEADER_TITLE=2, HEADER_TAGS=3, HEADER_NAME=4, HEADER_SEPARATOR=5,
  36. STRING=6, ID=7, NEWLINE=8, UNKNOWN=9, TITLE_WS=10, TITLE_TEXT=11, TAG_TEXT=12,
  37. HEADER_WS=13, HEADER_TEXT=14, WS_IN_BODY=15, COMMENT=16, BODY_CLOSE=17,
  38. TEXT_STRING=18, SHORTCUT_ENTER=19, INDENT=20, DEDENT=21, COMMAND_IF=22,
  39. COMMAND_ELSE=23, COMMAND_ELSE_IF=24, COMMAND_ENDIF=25, COMMAND_SET=26,
  40. COMMAND_FUNC=27, COMMAND_OPEN=28, OPTION_ENTER=29, HASHTAG=30, TEXT=31,
  41. SHORTCUT_TEXT=32, COMMAND_WS=33, COMMAND_CLOSE=34, COMMAND_STRING=35,
  42. KEYWORD_IF=36, KEYWORD_ELSE=37, KEYWORD_ELSE_IF=38, KEYWORD_SET=39, KEYWORD_TRUE=40,
  43. KEYWORD_FALSE=41, KEYWORD_NULL=42, KEYWORD_TO=43, OPERATOR_LOGICAL_LESS_THAN_EQUALS=44,
  44. OPERATOR_LOGICAL_GREATER_THAN_EQUALS=45, OPERATOR_LOGICAL_EQUALS=46, OPERATOR_LOGICAL_LESS=47,
  45. OPERATOR_LOGICAL_GREATER=48, OPERATOR_LOGICAL_NOT_EQUALS=49, OPERATOR_LOGICAL_AND=50,
  46. OPERATOR_LOGICAL_OR=51, OPERATOR_LOGICAL_XOR=52, OPERATOR_LOGICAL_NOT=53,
  47. OPERATOR_MATHS_ADDITION_EQUALS=54, OPERATOR_MATHS_SUBTRACTION_EQUALS=55,
  48. OPERATOR_MATHS_MULTIPLICATION_EQUALS=56, OPERATOR_MATHS_MODULUS_EQUALS=57,
  49. OPERATOR_MATHS_DIVISION_EQUALS=58, OPERATOR_MATHS_ADDITION=59, OPERATOR_MATHS_SUBTRACTION=60,
  50. OPERATOR_MATHS_MULTIPLICATION=61, OPERATOR_MATHS_DIVISION=62, OPERATOR_MATHS_MODULUS=63,
  51. LPAREN=64, RPAREN=65, COMMA=66, VAR_ID=67, BODY_NUMBER=68, FUNC_ID=69,
  52. COMMAND_UNKNOWN=70, ACTION=71, OPTION_SEPARATOR=72, OPTION_TEXT=73, OPTION_CLOSE=74,
  53. OPTION_LINK=75;
  54. public const int
  55. RULE_dialogue = 0, RULE_node = 1, RULE_header = 2, RULE_header_title = 3,
  56. RULE_header_tag = 4, RULE_header_line = 5, RULE_body = 6, RULE_statement = 7,
  57. RULE_shortcut_statement = 8, RULE_shortcut = 9, RULE_shortcut_conditional = 10,
  58. RULE_shortcut_text = 11, RULE_if_statement = 12, RULE_if_clause = 13,
  59. RULE_else_if_clause = 14, RULE_else_clause = 15, RULE_set_statement = 16,
  60. RULE_option_statement = 17, RULE_function = 18, RULE_function_statement = 19,
  61. RULE_action_statement = 20, RULE_text = 21, RULE_line_statement = 22,
  62. RULE_hashtag_block = 23, RULE_hashtag = 24, RULE_expression = 25, RULE_value = 26,
  63. RULE_variable = 27;
  64. public static readonly string[] ruleNames = {
  65. "dialogue", "node", "header", "header_title", "header_tag", "header_line",
  66. "body", "statement", "shortcut_statement", "shortcut", "shortcut_conditional",
  67. "shortcut_text", "if_statement", "if_clause", "else_if_clause", "else_clause",
  68. "set_statement", "option_statement", "function", "function_statement",
  69. "action_statement", "text", "line_statement", "hashtag_block", "hashtag",
  70. "expression", "value", "variable"
  71. };
  72. private static readonly string[] _LiteralNames = {
  73. null, "'---'", "'title:'", "'tags:'", null, "':'", null, null, null, null,
  74. null, null, null, null, null, null, null, "'==='", null, null, "'\u0007'",
  75. "'\u000B'", null, null, null, null, null, null, null, "'[['", null, null,
  76. null, null, null, null, null, null, null, null, null, null, null, null,
  77. null, null, null, null, null, null, null, null, null, null, "'+='", "'-='",
  78. "'*='", "'%='", "'/='", "'+'", "'-'", "'*'", "'/'", "'%'", "'('", "')'",
  79. "','", null, null, null, null, null, "'|'", null, "']]'"
  80. };
  81. private static readonly string[] _SymbolicNames = {
  82. null, "BODY_ENTER", "HEADER_TITLE", "HEADER_TAGS", "HEADER_NAME", "HEADER_SEPARATOR",
  83. "STRING", "ID", "NEWLINE", "UNKNOWN", "TITLE_WS", "TITLE_TEXT", "TAG_TEXT",
  84. "HEADER_WS", "HEADER_TEXT", "WS_IN_BODY", "COMMENT", "BODY_CLOSE", "TEXT_STRING",
  85. "SHORTCUT_ENTER", "INDENT", "DEDENT", "COMMAND_IF", "COMMAND_ELSE", "COMMAND_ELSE_IF",
  86. "COMMAND_ENDIF", "COMMAND_SET", "COMMAND_FUNC", "COMMAND_OPEN", "OPTION_ENTER",
  87. "HASHTAG", "TEXT", "SHORTCUT_TEXT", "COMMAND_WS", "COMMAND_CLOSE", "COMMAND_STRING",
  88. "KEYWORD_IF", "KEYWORD_ELSE", "KEYWORD_ELSE_IF", "KEYWORD_SET", "KEYWORD_TRUE",
  89. "KEYWORD_FALSE", "KEYWORD_NULL", "KEYWORD_TO", "OPERATOR_LOGICAL_LESS_THAN_EQUALS",
  90. "OPERATOR_LOGICAL_GREATER_THAN_EQUALS", "OPERATOR_LOGICAL_EQUALS", "OPERATOR_LOGICAL_LESS",
  91. "OPERATOR_LOGICAL_GREATER", "OPERATOR_LOGICAL_NOT_EQUALS", "OPERATOR_LOGICAL_AND",
  92. "OPERATOR_LOGICAL_OR", "OPERATOR_LOGICAL_XOR", "OPERATOR_LOGICAL_NOT",
  93. "OPERATOR_MATHS_ADDITION_EQUALS", "OPERATOR_MATHS_SUBTRACTION_EQUALS",
  94. "OPERATOR_MATHS_MULTIPLICATION_EQUALS", "OPERATOR_MATHS_MODULUS_EQUALS",
  95. "OPERATOR_MATHS_DIVISION_EQUALS", "OPERATOR_MATHS_ADDITION", "OPERATOR_MATHS_SUBTRACTION",
  96. "OPERATOR_MATHS_MULTIPLICATION", "OPERATOR_MATHS_DIVISION", "OPERATOR_MATHS_MODULUS",
  97. "LPAREN", "RPAREN", "COMMA", "VAR_ID", "BODY_NUMBER", "FUNC_ID", "COMMAND_UNKNOWN",
  98. "ACTION", "OPTION_SEPARATOR", "OPTION_TEXT", "OPTION_CLOSE", "OPTION_LINK"
  99. };
  100. public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames);
  101. [NotNull]
  102. public override IVocabulary Vocabulary
  103. {
  104. get
  105. {
  106. return DefaultVocabulary;
  107. }
  108. }
  109. public override string GrammarFileName { get { return "YarnSpinnerParser.g4"; } }
  110. public override string[] RuleNames { get { return ruleNames; } }
  111. public override string SerializedAtn { get { return new string(_serializedATN); } }
  112. static YarnSpinnerParser() {
  113. decisionToDFA = new DFA[_ATN.NumberOfDecisions];
  114. for (int i = 0; i < _ATN.NumberOfDecisions; i++) {
  115. decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i);
  116. }
  117. }
  118. public YarnSpinnerParser(ITokenStream input) : this(input, Console.Out, Console.Error) { }
  119. public YarnSpinnerParser(ITokenStream input, TextWriter output, TextWriter errorOutput)
  120. : base(input, output, errorOutput)
  121. {
  122. Interpreter = new ParserATNSimulator(this, _ATN, decisionToDFA, sharedContextCache);
  123. }
  124. public partial class DialogueContext : ParserRuleContext {
  125. public ITerminalNode Eof() { return GetToken(YarnSpinnerParser.Eof, 0); }
  126. public NodeContext[] node() {
  127. return GetRuleContexts<NodeContext>();
  128. }
  129. public NodeContext node(int i) {
  130. return GetRuleContext<NodeContext>(i);
  131. }
  132. public DialogueContext(ParserRuleContext parent, int invokingState)
  133. : base(parent, invokingState)
  134. {
  135. }
  136. public override int RuleIndex { get { return RULE_dialogue; } }
  137. public override void EnterRule(IParseTreeListener listener) {
  138. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  139. if (typedListener != null) typedListener.EnterDialogue(this);
  140. }
  141. public override void ExitRule(IParseTreeListener listener) {
  142. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  143. if (typedListener != null) typedListener.ExitDialogue(this);
  144. }
  145. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  146. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  147. if (typedVisitor != null) return typedVisitor.VisitDialogue(this);
  148. else return visitor.VisitChildren(this);
  149. }
  150. }
  151. [RuleVersion(0)]
  152. public DialogueContext dialogue() {
  153. DialogueContext _localctx = new DialogueContext(Context, State);
  154. EnterRule(_localctx, 0, RULE_dialogue);
  155. int _la;
  156. try {
  157. EnterOuterAlt(_localctx, 1);
  158. {
  159. State = 57;
  160. ErrorHandler.Sync(this);
  161. _la = TokenStream.LA(1);
  162. do {
  163. {
  164. {
  165. State = 56; node();
  166. }
  167. }
  168. State = 59;
  169. ErrorHandler.Sync(this);
  170. _la = TokenStream.LA(1);
  171. } while ( _la==HEADER_TITLE );
  172. State = 61; Match(Eof);
  173. }
  174. }
  175. catch (RecognitionException re) {
  176. _localctx.exception = re;
  177. ErrorHandler.ReportError(this, re);
  178. ErrorHandler.Recover(this, re);
  179. }
  180. finally {
  181. ExitRule();
  182. }
  183. return _localctx;
  184. }
  185. public partial class NodeContext : ParserRuleContext {
  186. public HeaderContext header() {
  187. return GetRuleContext<HeaderContext>(0);
  188. }
  189. public BodyContext body() {
  190. return GetRuleContext<BodyContext>(0);
  191. }
  192. public ITerminalNode[] NEWLINE() { return GetTokens(YarnSpinnerParser.NEWLINE); }
  193. public ITerminalNode NEWLINE(int i) {
  194. return GetToken(YarnSpinnerParser.NEWLINE, i);
  195. }
  196. public NodeContext(ParserRuleContext parent, int invokingState)
  197. : base(parent, invokingState)
  198. {
  199. }
  200. public override int RuleIndex { get { return RULE_node; } }
  201. public override void EnterRule(IParseTreeListener listener) {
  202. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  203. if (typedListener != null) typedListener.EnterNode(this);
  204. }
  205. public override void ExitRule(IParseTreeListener listener) {
  206. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  207. if (typedListener != null) typedListener.ExitNode(this);
  208. }
  209. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  210. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  211. if (typedVisitor != null) return typedVisitor.VisitNode(this);
  212. else return visitor.VisitChildren(this);
  213. }
  214. }
  215. [RuleVersion(0)]
  216. public NodeContext node() {
  217. NodeContext _localctx = new NodeContext(Context, State);
  218. EnterRule(_localctx, 2, RULE_node);
  219. int _la;
  220. try {
  221. EnterOuterAlt(_localctx, 1);
  222. {
  223. State = 63; header();
  224. State = 64; body();
  225. State = 68;
  226. ErrorHandler.Sync(this);
  227. _la = TokenStream.LA(1);
  228. while (_la==NEWLINE) {
  229. {
  230. {
  231. State = 65; Match(NEWLINE);
  232. }
  233. }
  234. State = 70;
  235. ErrorHandler.Sync(this);
  236. _la = TokenStream.LA(1);
  237. }
  238. }
  239. }
  240. catch (RecognitionException re) {
  241. _localctx.exception = re;
  242. ErrorHandler.ReportError(this, re);
  243. ErrorHandler.Recover(this, re);
  244. }
  245. finally {
  246. ExitRule();
  247. }
  248. return _localctx;
  249. }
  250. public partial class HeaderContext : ParserRuleContext {
  251. public Header_titleContext header_title() {
  252. return GetRuleContext<Header_titleContext>(0);
  253. }
  254. public Header_tagContext[] header_tag() {
  255. return GetRuleContexts<Header_tagContext>();
  256. }
  257. public Header_tagContext header_tag(int i) {
  258. return GetRuleContext<Header_tagContext>(i);
  259. }
  260. public Header_lineContext[] header_line() {
  261. return GetRuleContexts<Header_lineContext>();
  262. }
  263. public Header_lineContext header_line(int i) {
  264. return GetRuleContext<Header_lineContext>(i);
  265. }
  266. public HeaderContext(ParserRuleContext parent, int invokingState)
  267. : base(parent, invokingState)
  268. {
  269. }
  270. public override int RuleIndex { get { return RULE_header; } }
  271. public override void EnterRule(IParseTreeListener listener) {
  272. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  273. if (typedListener != null) typedListener.EnterHeader(this);
  274. }
  275. public override void ExitRule(IParseTreeListener listener) {
  276. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  277. if (typedListener != null) typedListener.ExitHeader(this);
  278. }
  279. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  280. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  281. if (typedVisitor != null) return typedVisitor.VisitHeader(this);
  282. else return visitor.VisitChildren(this);
  283. }
  284. }
  285. [RuleVersion(0)]
  286. public HeaderContext header() {
  287. HeaderContext _localctx = new HeaderContext(Context, State);
  288. EnterRule(_localctx, 4, RULE_header);
  289. int _la;
  290. try {
  291. EnterOuterAlt(_localctx, 1);
  292. {
  293. State = 71; header_title();
  294. State = 76;
  295. ErrorHandler.Sync(this);
  296. _la = TokenStream.LA(1);
  297. while (_la==HEADER_TAGS || _la==HEADER_NAME) {
  298. {
  299. State = 74;
  300. ErrorHandler.Sync(this);
  301. switch (TokenStream.LA(1)) {
  302. case HEADER_TAGS:
  303. {
  304. State = 72; header_tag();
  305. }
  306. break;
  307. case HEADER_NAME:
  308. {
  309. State = 73; header_line();
  310. }
  311. break;
  312. default:
  313. throw new NoViableAltException(this);
  314. }
  315. }
  316. State = 78;
  317. ErrorHandler.Sync(this);
  318. _la = TokenStream.LA(1);
  319. }
  320. }
  321. }
  322. catch (RecognitionException re) {
  323. _localctx.exception = re;
  324. ErrorHandler.ReportError(this, re);
  325. ErrorHandler.Recover(this, re);
  326. }
  327. finally {
  328. ExitRule();
  329. }
  330. return _localctx;
  331. }
  332. public partial class Header_titleContext : ParserRuleContext {
  333. public ITerminalNode HEADER_TITLE() { return GetToken(YarnSpinnerParser.HEADER_TITLE, 0); }
  334. public ITerminalNode TITLE_TEXT() { return GetToken(YarnSpinnerParser.TITLE_TEXT, 0); }
  335. public ITerminalNode NEWLINE() { return GetToken(YarnSpinnerParser.NEWLINE, 0); }
  336. public Header_titleContext(ParserRuleContext parent, int invokingState)
  337. : base(parent, invokingState)
  338. {
  339. }
  340. public override int RuleIndex { get { return RULE_header_title; } }
  341. public override void EnterRule(IParseTreeListener listener) {
  342. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  343. if (typedListener != null) typedListener.EnterHeader_title(this);
  344. }
  345. public override void ExitRule(IParseTreeListener listener) {
  346. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  347. if (typedListener != null) typedListener.ExitHeader_title(this);
  348. }
  349. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  350. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  351. if (typedVisitor != null) return typedVisitor.VisitHeader_title(this);
  352. else return visitor.VisitChildren(this);
  353. }
  354. }
  355. [RuleVersion(0)]
  356. public Header_titleContext header_title() {
  357. Header_titleContext _localctx = new Header_titleContext(Context, State);
  358. EnterRule(_localctx, 6, RULE_header_title);
  359. try {
  360. EnterOuterAlt(_localctx, 1);
  361. {
  362. State = 79; Match(HEADER_TITLE);
  363. State = 80; Match(TITLE_TEXT);
  364. State = 81; Match(NEWLINE);
  365. }
  366. }
  367. catch (RecognitionException re) {
  368. _localctx.exception = re;
  369. ErrorHandler.ReportError(this, re);
  370. ErrorHandler.Recover(this, re);
  371. }
  372. finally {
  373. ExitRule();
  374. }
  375. return _localctx;
  376. }
  377. public partial class Header_tagContext : ParserRuleContext {
  378. public ITerminalNode HEADER_TAGS() { return GetToken(YarnSpinnerParser.HEADER_TAGS, 0); }
  379. public ITerminalNode TAG_TEXT() { return GetToken(YarnSpinnerParser.TAG_TEXT, 0); }
  380. public ITerminalNode NEWLINE() { return GetToken(YarnSpinnerParser.NEWLINE, 0); }
  381. public Header_tagContext(ParserRuleContext parent, int invokingState)
  382. : base(parent, invokingState)
  383. {
  384. }
  385. public override int RuleIndex { get { return RULE_header_tag; } }
  386. public override void EnterRule(IParseTreeListener listener) {
  387. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  388. if (typedListener != null) typedListener.EnterHeader_tag(this);
  389. }
  390. public override void ExitRule(IParseTreeListener listener) {
  391. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  392. if (typedListener != null) typedListener.ExitHeader_tag(this);
  393. }
  394. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  395. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  396. if (typedVisitor != null) return typedVisitor.VisitHeader_tag(this);
  397. else return visitor.VisitChildren(this);
  398. }
  399. }
  400. [RuleVersion(0)]
  401. public Header_tagContext header_tag() {
  402. Header_tagContext _localctx = new Header_tagContext(Context, State);
  403. EnterRule(_localctx, 8, RULE_header_tag);
  404. try {
  405. EnterOuterAlt(_localctx, 1);
  406. {
  407. State = 83; Match(HEADER_TAGS);
  408. State = 84; Match(TAG_TEXT);
  409. State = 85; Match(NEWLINE);
  410. }
  411. }
  412. catch (RecognitionException re) {
  413. _localctx.exception = re;
  414. ErrorHandler.ReportError(this, re);
  415. ErrorHandler.Recover(this, re);
  416. }
  417. finally {
  418. ExitRule();
  419. }
  420. return _localctx;
  421. }
  422. public partial class Header_lineContext : ParserRuleContext {
  423. public ITerminalNode HEADER_NAME() { return GetToken(YarnSpinnerParser.HEADER_NAME, 0); }
  424. public ITerminalNode HEADER_TEXT() { return GetToken(YarnSpinnerParser.HEADER_TEXT, 0); }
  425. public ITerminalNode NEWLINE() { return GetToken(YarnSpinnerParser.NEWLINE, 0); }
  426. public Header_lineContext(ParserRuleContext parent, int invokingState)
  427. : base(parent, invokingState)
  428. {
  429. }
  430. public override int RuleIndex { get { return RULE_header_line; } }
  431. public override void EnterRule(IParseTreeListener listener) {
  432. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  433. if (typedListener != null) typedListener.EnterHeader_line(this);
  434. }
  435. public override void ExitRule(IParseTreeListener listener) {
  436. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  437. if (typedListener != null) typedListener.ExitHeader_line(this);
  438. }
  439. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  440. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  441. if (typedVisitor != null) return typedVisitor.VisitHeader_line(this);
  442. else return visitor.VisitChildren(this);
  443. }
  444. }
  445. [RuleVersion(0)]
  446. public Header_lineContext header_line() {
  447. Header_lineContext _localctx = new Header_lineContext(Context, State);
  448. EnterRule(_localctx, 10, RULE_header_line);
  449. try {
  450. EnterOuterAlt(_localctx, 1);
  451. {
  452. State = 87; Match(HEADER_NAME);
  453. State = 88; Match(HEADER_SEPARATOR);
  454. State = 89; Match(HEADER_TEXT);
  455. State = 90; Match(NEWLINE);
  456. }
  457. }
  458. catch (RecognitionException re) {
  459. _localctx.exception = re;
  460. ErrorHandler.ReportError(this, re);
  461. ErrorHandler.Recover(this, re);
  462. }
  463. finally {
  464. ExitRule();
  465. }
  466. return _localctx;
  467. }
  468. public partial class BodyContext : ParserRuleContext {
  469. public ITerminalNode BODY_ENTER() { return GetToken(YarnSpinnerParser.BODY_ENTER, 0); }
  470. public ITerminalNode BODY_CLOSE() { return GetToken(YarnSpinnerParser.BODY_CLOSE, 0); }
  471. public StatementContext[] statement() {
  472. return GetRuleContexts<StatementContext>();
  473. }
  474. public StatementContext statement(int i) {
  475. return GetRuleContext<StatementContext>(i);
  476. }
  477. public BodyContext(ParserRuleContext parent, int invokingState)
  478. : base(parent, invokingState)
  479. {
  480. }
  481. public override int RuleIndex { get { return RULE_body; } }
  482. public override void EnterRule(IParseTreeListener listener) {
  483. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  484. if (typedListener != null) typedListener.EnterBody(this);
  485. }
  486. public override void ExitRule(IParseTreeListener listener) {
  487. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  488. if (typedListener != null) typedListener.ExitBody(this);
  489. }
  490. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  491. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  492. if (typedVisitor != null) return typedVisitor.VisitBody(this);
  493. else return visitor.VisitChildren(this);
  494. }
  495. }
  496. [RuleVersion(0)]
  497. public BodyContext body() {
  498. BodyContext _localctx = new BodyContext(Context, State);
  499. EnterRule(_localctx, 12, RULE_body);
  500. int _la;
  501. try {
  502. EnterOuterAlt(_localctx, 1);
  503. {
  504. State = 92; Match(BODY_ENTER);
  505. State = 96;
  506. ErrorHandler.Sync(this);
  507. _la = TokenStream.LA(1);
  508. while (((((_la - 18)) & ~0x3f) == 0 && ((1L << (_la - 18)) & ((1L << (TEXT_STRING - 18)) | (1L << (SHORTCUT_ENTER - 18)) | (1L << (COMMAND_IF - 18)) | (1L << (COMMAND_SET - 18)) | (1L << (COMMAND_FUNC - 18)) | (1L << (OPTION_ENTER - 18)) | (1L << (TEXT - 18)) | (1L << (ACTION - 18)))) != 0)) {
  509. {
  510. {
  511. State = 93; statement();
  512. }
  513. }
  514. State = 98;
  515. ErrorHandler.Sync(this);
  516. _la = TokenStream.LA(1);
  517. }
  518. State = 99; Match(BODY_CLOSE);
  519. }
  520. }
  521. catch (RecognitionException re) {
  522. _localctx.exception = re;
  523. ErrorHandler.ReportError(this, re);
  524. ErrorHandler.Recover(this, re);
  525. }
  526. finally {
  527. ExitRule();
  528. }
  529. return _localctx;
  530. }
  531. public partial class StatementContext : ParserRuleContext {
  532. public Shortcut_statementContext shortcut_statement() {
  533. return GetRuleContext<Shortcut_statementContext>(0);
  534. }
  535. public If_statementContext if_statement() {
  536. return GetRuleContext<If_statementContext>(0);
  537. }
  538. public Set_statementContext set_statement() {
  539. return GetRuleContext<Set_statementContext>(0);
  540. }
  541. public Option_statementContext option_statement() {
  542. return GetRuleContext<Option_statementContext>(0);
  543. }
  544. public Function_statementContext function_statement() {
  545. return GetRuleContext<Function_statementContext>(0);
  546. }
  547. public Action_statementContext action_statement() {
  548. return GetRuleContext<Action_statementContext>(0);
  549. }
  550. public Line_statementContext line_statement() {
  551. return GetRuleContext<Line_statementContext>(0);
  552. }
  553. public StatementContext(ParserRuleContext parent, int invokingState)
  554. : base(parent, invokingState)
  555. {
  556. }
  557. public override int RuleIndex { get { return RULE_statement; } }
  558. public override void EnterRule(IParseTreeListener listener) {
  559. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  560. if (typedListener != null) typedListener.EnterStatement(this);
  561. }
  562. public override void ExitRule(IParseTreeListener listener) {
  563. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  564. if (typedListener != null) typedListener.ExitStatement(this);
  565. }
  566. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  567. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  568. if (typedVisitor != null) return typedVisitor.VisitStatement(this);
  569. else return visitor.VisitChildren(this);
  570. }
  571. }
  572. [RuleVersion(0)]
  573. public StatementContext statement() {
  574. StatementContext _localctx = new StatementContext(Context, State);
  575. EnterRule(_localctx, 14, RULE_statement);
  576. try {
  577. State = 108;
  578. ErrorHandler.Sync(this);
  579. switch (TokenStream.LA(1)) {
  580. case SHORTCUT_ENTER:
  581. EnterOuterAlt(_localctx, 1);
  582. {
  583. State = 101; shortcut_statement();
  584. }
  585. break;
  586. case COMMAND_IF:
  587. EnterOuterAlt(_localctx, 2);
  588. {
  589. State = 102; if_statement();
  590. }
  591. break;
  592. case COMMAND_SET:
  593. EnterOuterAlt(_localctx, 3);
  594. {
  595. State = 103; set_statement();
  596. }
  597. break;
  598. case OPTION_ENTER:
  599. EnterOuterAlt(_localctx, 4);
  600. {
  601. State = 104; option_statement();
  602. }
  603. break;
  604. case COMMAND_FUNC:
  605. EnterOuterAlt(_localctx, 5);
  606. {
  607. State = 105; function_statement();
  608. }
  609. break;
  610. case ACTION:
  611. EnterOuterAlt(_localctx, 6);
  612. {
  613. State = 106; action_statement();
  614. }
  615. break;
  616. case TEXT_STRING:
  617. case TEXT:
  618. EnterOuterAlt(_localctx, 7);
  619. {
  620. State = 107; line_statement();
  621. }
  622. break;
  623. default:
  624. throw new NoViableAltException(this);
  625. }
  626. }
  627. catch (RecognitionException re) {
  628. _localctx.exception = re;
  629. ErrorHandler.ReportError(this, re);
  630. ErrorHandler.Recover(this, re);
  631. }
  632. finally {
  633. ExitRule();
  634. }
  635. return _localctx;
  636. }
  637. public partial class Shortcut_statementContext : ParserRuleContext {
  638. public ShortcutContext[] shortcut() {
  639. return GetRuleContexts<ShortcutContext>();
  640. }
  641. public ShortcutContext shortcut(int i) {
  642. return GetRuleContext<ShortcutContext>(i);
  643. }
  644. public Shortcut_statementContext(ParserRuleContext parent, int invokingState)
  645. : base(parent, invokingState)
  646. {
  647. }
  648. public override int RuleIndex { get { return RULE_shortcut_statement; } }
  649. public override void EnterRule(IParseTreeListener listener) {
  650. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  651. if (typedListener != null) typedListener.EnterShortcut_statement(this);
  652. }
  653. public override void ExitRule(IParseTreeListener listener) {
  654. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  655. if (typedListener != null) typedListener.ExitShortcut_statement(this);
  656. }
  657. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  658. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  659. if (typedVisitor != null) return typedVisitor.VisitShortcut_statement(this);
  660. else return visitor.VisitChildren(this);
  661. }
  662. }
  663. [RuleVersion(0)]
  664. public Shortcut_statementContext shortcut_statement() {
  665. Shortcut_statementContext _localctx = new Shortcut_statementContext(Context, State);
  666. EnterRule(_localctx, 16, RULE_shortcut_statement);
  667. try {
  668. int _alt;
  669. EnterOuterAlt(_localctx, 1);
  670. {
  671. State = 111;
  672. ErrorHandler.Sync(this);
  673. _alt = 1;
  674. do {
  675. switch (_alt) {
  676. case 1:
  677. {
  678. {
  679. State = 110; shortcut();
  680. }
  681. }
  682. break;
  683. default:
  684. throw new NoViableAltException(this);
  685. }
  686. State = 113;
  687. ErrorHandler.Sync(this);
  688. _alt = Interpreter.AdaptivePredict(TokenStream,6,Context);
  689. } while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER );
  690. }
  691. }
  692. catch (RecognitionException re) {
  693. _localctx.exception = re;
  694. ErrorHandler.ReportError(this, re);
  695. ErrorHandler.Recover(this, re);
  696. }
  697. finally {
  698. ExitRule();
  699. }
  700. return _localctx;
  701. }
  702. public partial class ShortcutContext : ParserRuleContext {
  703. public ITerminalNode SHORTCUT_ENTER() { return GetToken(YarnSpinnerParser.SHORTCUT_ENTER, 0); }
  704. public Shortcut_textContext shortcut_text() {
  705. return GetRuleContext<Shortcut_textContext>(0);
  706. }
  707. public Shortcut_conditionalContext shortcut_conditional() {
  708. return GetRuleContext<Shortcut_conditionalContext>(0);
  709. }
  710. public Hashtag_blockContext hashtag_block() {
  711. return GetRuleContext<Hashtag_blockContext>(0);
  712. }
  713. public ITerminalNode INDENT() { return GetToken(YarnSpinnerParser.INDENT, 0); }
  714. public ITerminalNode DEDENT() { return GetToken(YarnSpinnerParser.DEDENT, 0); }
  715. public StatementContext[] statement() {
  716. return GetRuleContexts<StatementContext>();
  717. }
  718. public StatementContext statement(int i) {
  719. return GetRuleContext<StatementContext>(i);
  720. }
  721. public ShortcutContext(ParserRuleContext parent, int invokingState)
  722. : base(parent, invokingState)
  723. {
  724. }
  725. public override int RuleIndex { get { return RULE_shortcut; } }
  726. public override void EnterRule(IParseTreeListener listener) {
  727. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  728. if (typedListener != null) typedListener.EnterShortcut(this);
  729. }
  730. public override void ExitRule(IParseTreeListener listener) {
  731. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  732. if (typedListener != null) typedListener.ExitShortcut(this);
  733. }
  734. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  735. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  736. if (typedVisitor != null) return typedVisitor.VisitShortcut(this);
  737. else return visitor.VisitChildren(this);
  738. }
  739. }
  740. [RuleVersion(0)]
  741. public ShortcutContext shortcut() {
  742. ShortcutContext _localctx = new ShortcutContext(Context, State);
  743. EnterRule(_localctx, 18, RULE_shortcut);
  744. int _la;
  745. try {
  746. EnterOuterAlt(_localctx, 1);
  747. {
  748. State = 115; Match(SHORTCUT_ENTER);
  749. State = 116; shortcut_text();
  750. State = 118;
  751. ErrorHandler.Sync(this);
  752. switch ( Interpreter.AdaptivePredict(TokenStream,7,Context) ) {
  753. case 1:
  754. {
  755. State = 117; shortcut_conditional();
  756. }
  757. break;
  758. }
  759. State = 121;
  760. ErrorHandler.Sync(this);
  761. _la = TokenStream.LA(1);
  762. if (_la==HASHTAG) {
  763. {
  764. State = 120; hashtag_block();
  765. }
  766. }
  767. State = 131;
  768. ErrorHandler.Sync(this);
  769. _la = TokenStream.LA(1);
  770. if (_la==INDENT) {
  771. {
  772. State = 123; Match(INDENT);
  773. State = 127;
  774. ErrorHandler.Sync(this);
  775. _la = TokenStream.LA(1);
  776. while (((((_la - 18)) & ~0x3f) == 0 && ((1L << (_la - 18)) & ((1L << (TEXT_STRING - 18)) | (1L << (SHORTCUT_ENTER - 18)) | (1L << (COMMAND_IF - 18)) | (1L << (COMMAND_SET - 18)) | (1L << (COMMAND_FUNC - 18)) | (1L << (OPTION_ENTER - 18)) | (1L << (TEXT - 18)) | (1L << (ACTION - 18)))) != 0)) {
  777. {
  778. {
  779. State = 124; statement();
  780. }
  781. }
  782. State = 129;
  783. ErrorHandler.Sync(this);
  784. _la = TokenStream.LA(1);
  785. }
  786. State = 130; Match(DEDENT);
  787. }
  788. }
  789. }
  790. }
  791. catch (RecognitionException re) {
  792. _localctx.exception = re;
  793. ErrorHandler.ReportError(this, re);
  794. ErrorHandler.Recover(this, re);
  795. }
  796. finally {
  797. ExitRule();
  798. }
  799. return _localctx;
  800. }
  801. public partial class Shortcut_conditionalContext : ParserRuleContext {
  802. public ITerminalNode COMMAND_IF() { return GetToken(YarnSpinnerParser.COMMAND_IF, 0); }
  803. public ExpressionContext expression() {
  804. return GetRuleContext<ExpressionContext>(0);
  805. }
  806. public ITerminalNode COMMAND_CLOSE() { return GetToken(YarnSpinnerParser.COMMAND_CLOSE, 0); }
  807. public Shortcut_conditionalContext(ParserRuleContext parent, int invokingState)
  808. : base(parent, invokingState)
  809. {
  810. }
  811. public override int RuleIndex { get { return RULE_shortcut_conditional; } }
  812. public override void EnterRule(IParseTreeListener listener) {
  813. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  814. if (typedListener != null) typedListener.EnterShortcut_conditional(this);
  815. }
  816. public override void ExitRule(IParseTreeListener listener) {
  817. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  818. if (typedListener != null) typedListener.ExitShortcut_conditional(this);
  819. }
  820. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  821. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  822. if (typedVisitor != null) return typedVisitor.VisitShortcut_conditional(this);
  823. else return visitor.VisitChildren(this);
  824. }
  825. }
  826. [RuleVersion(0)]
  827. public Shortcut_conditionalContext shortcut_conditional() {
  828. Shortcut_conditionalContext _localctx = new Shortcut_conditionalContext(Context, State);
  829. EnterRule(_localctx, 20, RULE_shortcut_conditional);
  830. try {
  831. EnterOuterAlt(_localctx, 1);
  832. {
  833. State = 133; Match(COMMAND_IF);
  834. State = 134; expression(0);
  835. State = 135; Match(COMMAND_CLOSE);
  836. }
  837. }
  838. catch (RecognitionException re) {
  839. _localctx.exception = re;
  840. ErrorHandler.ReportError(this, re);
  841. ErrorHandler.Recover(this, re);
  842. }
  843. finally {
  844. ExitRule();
  845. }
  846. return _localctx;
  847. }
  848. public partial class Shortcut_textContext : ParserRuleContext {
  849. public ITerminalNode SHORTCUT_TEXT() { return GetToken(YarnSpinnerParser.SHORTCUT_TEXT, 0); }
  850. public Shortcut_textContext(ParserRuleContext parent, int invokingState)
  851. : base(parent, invokingState)
  852. {
  853. }
  854. public override int RuleIndex { get { return RULE_shortcut_text; } }
  855. public override void EnterRule(IParseTreeListener listener) {
  856. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  857. if (typedListener != null) typedListener.EnterShortcut_text(this);
  858. }
  859. public override void ExitRule(IParseTreeListener listener) {
  860. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  861. if (typedListener != null) typedListener.ExitShortcut_text(this);
  862. }
  863. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  864. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  865. if (typedVisitor != null) return typedVisitor.VisitShortcut_text(this);
  866. else return visitor.VisitChildren(this);
  867. }
  868. }
  869. [RuleVersion(0)]
  870. public Shortcut_textContext shortcut_text() {
  871. Shortcut_textContext _localctx = new Shortcut_textContext(Context, State);
  872. EnterRule(_localctx, 22, RULE_shortcut_text);
  873. try {
  874. EnterOuterAlt(_localctx, 1);
  875. {
  876. State = 137; Match(SHORTCUT_TEXT);
  877. }
  878. }
  879. catch (RecognitionException re) {
  880. _localctx.exception = re;
  881. ErrorHandler.ReportError(this, re);
  882. ErrorHandler.Recover(this, re);
  883. }
  884. finally {
  885. ExitRule();
  886. }
  887. return _localctx;
  888. }
  889. public partial class If_statementContext : ParserRuleContext {
  890. public If_clauseContext if_clause() {
  891. return GetRuleContext<If_clauseContext>(0);
  892. }
  893. public ITerminalNode COMMAND_ENDIF() { return GetToken(YarnSpinnerParser.COMMAND_ENDIF, 0); }
  894. public Else_if_clauseContext[] else_if_clause() {
  895. return GetRuleContexts<Else_if_clauseContext>();
  896. }
  897. public Else_if_clauseContext else_if_clause(int i) {
  898. return GetRuleContext<Else_if_clauseContext>(i);
  899. }
  900. public Else_clauseContext else_clause() {
  901. return GetRuleContext<Else_clauseContext>(0);
  902. }
  903. public Hashtag_blockContext hashtag_block() {
  904. return GetRuleContext<Hashtag_blockContext>(0);
  905. }
  906. public If_statementContext(ParserRuleContext parent, int invokingState)
  907. : base(parent, invokingState)
  908. {
  909. }
  910. public override int RuleIndex { get { return RULE_if_statement; } }
  911. public override void EnterRule(IParseTreeListener listener) {
  912. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  913. if (typedListener != null) typedListener.EnterIf_statement(this);
  914. }
  915. public override void ExitRule(IParseTreeListener listener) {
  916. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  917. if (typedListener != null) typedListener.ExitIf_statement(this);
  918. }
  919. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  920. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  921. if (typedVisitor != null) return typedVisitor.VisitIf_statement(this);
  922. else return visitor.VisitChildren(this);
  923. }
  924. }
  925. [RuleVersion(0)]
  926. public If_statementContext if_statement() {
  927. If_statementContext _localctx = new If_statementContext(Context, State);
  928. EnterRule(_localctx, 24, RULE_if_statement);
  929. int _la;
  930. try {
  931. EnterOuterAlt(_localctx, 1);
  932. {
  933. State = 139; if_clause();
  934. State = 143;
  935. ErrorHandler.Sync(this);
  936. _la = TokenStream.LA(1);
  937. while (_la==COMMAND_ELSE_IF) {
  938. {
  939. {
  940. State = 140; else_if_clause();
  941. }
  942. }
  943. State = 145;
  944. ErrorHandler.Sync(this);
  945. _la = TokenStream.LA(1);
  946. }
  947. State = 147;
  948. ErrorHandler.Sync(this);
  949. _la = TokenStream.LA(1);
  950. if (_la==COMMAND_ELSE) {
  951. {
  952. State = 146; else_clause();
  953. }
  954. }
  955. State = 149; Match(COMMAND_ENDIF);
  956. State = 151;
  957. ErrorHandler.Sync(this);
  958. _la = TokenStream.LA(1);
  959. if (_la==HASHTAG) {
  960. {
  961. State = 150; hashtag_block();
  962. }
  963. }
  964. }
  965. }
  966. catch (RecognitionException re) {
  967. _localctx.exception = re;
  968. ErrorHandler.ReportError(this, re);
  969. ErrorHandler.Recover(this, re);
  970. }
  971. finally {
  972. ExitRule();
  973. }
  974. return _localctx;
  975. }
  976. public partial class If_clauseContext : ParserRuleContext {
  977. public ITerminalNode COMMAND_IF() { return GetToken(YarnSpinnerParser.COMMAND_IF, 0); }
  978. public ExpressionContext expression() {
  979. return GetRuleContext<ExpressionContext>(0);
  980. }
  981. public ITerminalNode COMMAND_CLOSE() { return GetToken(YarnSpinnerParser.COMMAND_CLOSE, 0); }
  982. public StatementContext[] statement() {
  983. return GetRuleContexts<StatementContext>();
  984. }
  985. public StatementContext statement(int i) {
  986. return GetRuleContext<StatementContext>(i);
  987. }
  988. public If_clauseContext(ParserRuleContext parent, int invokingState)
  989. : base(parent, invokingState)
  990. {
  991. }
  992. public override int RuleIndex { get { return RULE_if_clause; } }
  993. public override void EnterRule(IParseTreeListener listener) {
  994. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  995. if (typedListener != null) typedListener.EnterIf_clause(this);
  996. }
  997. public override void ExitRule(IParseTreeListener listener) {
  998. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  999. if (typedListener != null) typedListener.ExitIf_clause(this);
  1000. }
  1001. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1002. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1003. if (typedVisitor != null) return typedVisitor.VisitIf_clause(this);
  1004. else return visitor.VisitChildren(this);
  1005. }
  1006. }
  1007. [RuleVersion(0)]
  1008. public If_clauseContext if_clause() {
  1009. If_clauseContext _localctx = new If_clauseContext(Context, State);
  1010. EnterRule(_localctx, 26, RULE_if_clause);
  1011. int _la;
  1012. try {
  1013. EnterOuterAlt(_localctx, 1);
  1014. {
  1015. State = 153; Match(COMMAND_IF);
  1016. State = 154; expression(0);
  1017. State = 155; Match(COMMAND_CLOSE);
  1018. State = 159;
  1019. ErrorHandler.Sync(this);
  1020. _la = TokenStream.LA(1);
  1021. while (((((_la - 18)) & ~0x3f) == 0 && ((1L << (_la - 18)) & ((1L << (TEXT_STRING - 18)) | (1L << (SHORTCUT_ENTER - 18)) | (1L << (COMMAND_IF - 18)) | (1L << (COMMAND_SET - 18)) | (1L << (COMMAND_FUNC - 18)) | (1L << (OPTION_ENTER - 18)) | (1L << (TEXT - 18)) | (1L << (ACTION - 18)))) != 0)) {
  1022. {
  1023. {
  1024. State = 156; statement();
  1025. }
  1026. }
  1027. State = 161;
  1028. ErrorHandler.Sync(this);
  1029. _la = TokenStream.LA(1);
  1030. }
  1031. }
  1032. }
  1033. catch (RecognitionException re) {
  1034. _localctx.exception = re;
  1035. ErrorHandler.ReportError(this, re);
  1036. ErrorHandler.Recover(this, re);
  1037. }
  1038. finally {
  1039. ExitRule();
  1040. }
  1041. return _localctx;
  1042. }
  1043. public partial class Else_if_clauseContext : ParserRuleContext {
  1044. public ITerminalNode COMMAND_ELSE_IF() { return GetToken(YarnSpinnerParser.COMMAND_ELSE_IF, 0); }
  1045. public ExpressionContext expression() {
  1046. return GetRuleContext<ExpressionContext>(0);
  1047. }
  1048. public ITerminalNode COMMAND_CLOSE() { return GetToken(YarnSpinnerParser.COMMAND_CLOSE, 0); }
  1049. public StatementContext[] statement() {
  1050. return GetRuleContexts<StatementContext>();
  1051. }
  1052. public StatementContext statement(int i) {
  1053. return GetRuleContext<StatementContext>(i);
  1054. }
  1055. public Else_if_clauseContext(ParserRuleContext parent, int invokingState)
  1056. : base(parent, invokingState)
  1057. {
  1058. }
  1059. public override int RuleIndex { get { return RULE_else_if_clause; } }
  1060. public override void EnterRule(IParseTreeListener listener) {
  1061. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1062. if (typedListener != null) typedListener.EnterElse_if_clause(this);
  1063. }
  1064. public override void ExitRule(IParseTreeListener listener) {
  1065. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1066. if (typedListener != null) typedListener.ExitElse_if_clause(this);
  1067. }
  1068. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1069. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1070. if (typedVisitor != null) return typedVisitor.VisitElse_if_clause(this);
  1071. else return visitor.VisitChildren(this);
  1072. }
  1073. }
  1074. [RuleVersion(0)]
  1075. public Else_if_clauseContext else_if_clause() {
  1076. Else_if_clauseContext _localctx = new Else_if_clauseContext(Context, State);
  1077. EnterRule(_localctx, 28, RULE_else_if_clause);
  1078. int _la;
  1079. try {
  1080. EnterOuterAlt(_localctx, 1);
  1081. {
  1082. State = 162; Match(COMMAND_ELSE_IF);
  1083. State = 163; expression(0);
  1084. State = 164; Match(COMMAND_CLOSE);
  1085. State = 168;
  1086. ErrorHandler.Sync(this);
  1087. _la = TokenStream.LA(1);
  1088. while (((((_la - 18)) & ~0x3f) == 0 && ((1L << (_la - 18)) & ((1L << (TEXT_STRING - 18)) | (1L << (SHORTCUT_ENTER - 18)) | (1L << (COMMAND_IF - 18)) | (1L << (COMMAND_SET - 18)) | (1L << (COMMAND_FUNC - 18)) | (1L << (OPTION_ENTER - 18)) | (1L << (TEXT - 18)) | (1L << (ACTION - 18)))) != 0)) {
  1089. {
  1090. {
  1091. State = 165; statement();
  1092. }
  1093. }
  1094. State = 170;
  1095. ErrorHandler.Sync(this);
  1096. _la = TokenStream.LA(1);
  1097. }
  1098. }
  1099. }
  1100. catch (RecognitionException re) {
  1101. _localctx.exception = re;
  1102. ErrorHandler.ReportError(this, re);
  1103. ErrorHandler.Recover(this, re);
  1104. }
  1105. finally {
  1106. ExitRule();
  1107. }
  1108. return _localctx;
  1109. }
  1110. public partial class Else_clauseContext : ParserRuleContext {
  1111. public ITerminalNode COMMAND_ELSE() { return GetToken(YarnSpinnerParser.COMMAND_ELSE, 0); }
  1112. public StatementContext[] statement() {
  1113. return GetRuleContexts<StatementContext>();
  1114. }
  1115. public StatementContext statement(int i) {
  1116. return GetRuleContext<StatementContext>(i);
  1117. }
  1118. public Else_clauseContext(ParserRuleContext parent, int invokingState)
  1119. : base(parent, invokingState)
  1120. {
  1121. }
  1122. public override int RuleIndex { get { return RULE_else_clause; } }
  1123. public override void EnterRule(IParseTreeListener listener) {
  1124. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1125. if (typedListener != null) typedListener.EnterElse_clause(this);
  1126. }
  1127. public override void ExitRule(IParseTreeListener listener) {
  1128. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1129. if (typedListener != null) typedListener.ExitElse_clause(this);
  1130. }
  1131. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1132. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1133. if (typedVisitor != null) return typedVisitor.VisitElse_clause(this);
  1134. else return visitor.VisitChildren(this);
  1135. }
  1136. }
  1137. [RuleVersion(0)]
  1138. public Else_clauseContext else_clause() {
  1139. Else_clauseContext _localctx = new Else_clauseContext(Context, State);
  1140. EnterRule(_localctx, 30, RULE_else_clause);
  1141. int _la;
  1142. try {
  1143. EnterOuterAlt(_localctx, 1);
  1144. {
  1145. State = 171; Match(COMMAND_ELSE);
  1146. State = 175;
  1147. ErrorHandler.Sync(this);
  1148. _la = TokenStream.LA(1);
  1149. while (((((_la - 18)) & ~0x3f) == 0 && ((1L << (_la - 18)) & ((1L << (TEXT_STRING - 18)) | (1L << (SHORTCUT_ENTER - 18)) | (1L << (COMMAND_IF - 18)) | (1L << (COMMAND_SET - 18)) | (1L << (COMMAND_FUNC - 18)) | (1L << (OPTION_ENTER - 18)) | (1L << (TEXT - 18)) | (1L << (ACTION - 18)))) != 0)) {
  1150. {
  1151. {
  1152. State = 172; statement();
  1153. }
  1154. }
  1155. State = 177;
  1156. ErrorHandler.Sync(this);
  1157. _la = TokenStream.LA(1);
  1158. }
  1159. }
  1160. }
  1161. catch (RecognitionException re) {
  1162. _localctx.exception = re;
  1163. ErrorHandler.ReportError(this, re);
  1164. ErrorHandler.Recover(this, re);
  1165. }
  1166. finally {
  1167. ExitRule();
  1168. }
  1169. return _localctx;
  1170. }
  1171. public partial class Set_statementContext : ParserRuleContext {
  1172. public ITerminalNode COMMAND_SET() { return GetToken(YarnSpinnerParser.COMMAND_SET, 0); }
  1173. public VariableContext variable() {
  1174. return GetRuleContext<VariableContext>(0);
  1175. }
  1176. public ExpressionContext expression() {
  1177. return GetRuleContext<ExpressionContext>(0);
  1178. }
  1179. public ITerminalNode COMMAND_CLOSE() { return GetToken(YarnSpinnerParser.COMMAND_CLOSE, 0); }
  1180. public ITerminalNode[] KEYWORD_TO() { return GetTokens(YarnSpinnerParser.KEYWORD_TO); }
  1181. public ITerminalNode KEYWORD_TO(int i) {
  1182. return GetToken(YarnSpinnerParser.KEYWORD_TO, i);
  1183. }
  1184. public Set_statementContext(ParserRuleContext parent, int invokingState)
  1185. : base(parent, invokingState)
  1186. {
  1187. }
  1188. public override int RuleIndex { get { return RULE_set_statement; } }
  1189. public override void EnterRule(IParseTreeListener listener) {
  1190. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1191. if (typedListener != null) typedListener.EnterSet_statement(this);
  1192. }
  1193. public override void ExitRule(IParseTreeListener listener) {
  1194. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1195. if (typedListener != null) typedListener.ExitSet_statement(this);
  1196. }
  1197. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1198. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1199. if (typedVisitor != null) return typedVisitor.VisitSet_statement(this);
  1200. else return visitor.VisitChildren(this);
  1201. }
  1202. }
  1203. [RuleVersion(0)]
  1204. public Set_statementContext set_statement() {
  1205. Set_statementContext _localctx = new Set_statementContext(Context, State);
  1206. EnterRule(_localctx, 32, RULE_set_statement);
  1207. int _la;
  1208. try {
  1209. State = 193;
  1210. ErrorHandler.Sync(this);
  1211. switch ( Interpreter.AdaptivePredict(TokenStream,18,Context) ) {
  1212. case 1:
  1213. EnterOuterAlt(_localctx, 1);
  1214. {
  1215. State = 178; Match(COMMAND_SET);
  1216. State = 179; variable();
  1217. State = 183;
  1218. ErrorHandler.Sync(this);
  1219. _la = TokenStream.LA(1);
  1220. while (_la==KEYWORD_TO) {
  1221. {
  1222. {
  1223. State = 180; Match(KEYWORD_TO);
  1224. }
  1225. }
  1226. State = 185;
  1227. ErrorHandler.Sync(this);
  1228. _la = TokenStream.LA(1);
  1229. }
  1230. State = 186; expression(0);
  1231. State = 187; Match(COMMAND_CLOSE);
  1232. }
  1233. break;
  1234. case 2:
  1235. EnterOuterAlt(_localctx, 2);
  1236. {
  1237. State = 189; Match(COMMAND_SET);
  1238. State = 190; expression(0);
  1239. State = 191; Match(COMMAND_CLOSE);
  1240. }
  1241. break;
  1242. }
  1243. }
  1244. catch (RecognitionException re) {
  1245. _localctx.exception = re;
  1246. ErrorHandler.ReportError(this, re);
  1247. ErrorHandler.Recover(this, re);
  1248. }
  1249. finally {
  1250. ExitRule();
  1251. }
  1252. return _localctx;
  1253. }
  1254. public partial class Option_statementContext : ParserRuleContext {
  1255. public ITerminalNode OPTION_TEXT() { return GetToken(YarnSpinnerParser.OPTION_TEXT, 0); }
  1256. public ITerminalNode OPTION_LINK() { return GetToken(YarnSpinnerParser.OPTION_LINK, 0); }
  1257. public Hashtag_blockContext hashtag_block() {
  1258. return GetRuleContext<Hashtag_blockContext>(0);
  1259. }
  1260. public Option_statementContext(ParserRuleContext parent, int invokingState)
  1261. : base(parent, invokingState)
  1262. {
  1263. }
  1264. public override int RuleIndex { get { return RULE_option_statement; } }
  1265. public override void EnterRule(IParseTreeListener listener) {
  1266. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1267. if (typedListener != null) typedListener.EnterOption_statement(this);
  1268. }
  1269. public override void ExitRule(IParseTreeListener listener) {
  1270. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1271. if (typedListener != null) typedListener.ExitOption_statement(this);
  1272. }
  1273. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1274. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1275. if (typedVisitor != null) return typedVisitor.VisitOption_statement(this);
  1276. else return visitor.VisitChildren(this);
  1277. }
  1278. }
  1279. [RuleVersion(0)]
  1280. public Option_statementContext option_statement() {
  1281. Option_statementContext _localctx = new Option_statementContext(Context, State);
  1282. EnterRule(_localctx, 34, RULE_option_statement);
  1283. int _la;
  1284. try {
  1285. EnterOuterAlt(_localctx, 1);
  1286. {
  1287. State = 203;
  1288. ErrorHandler.Sync(this);
  1289. switch ( Interpreter.AdaptivePredict(TokenStream,19,Context) ) {
  1290. case 1:
  1291. {
  1292. State = 195; Match(OPTION_ENTER);
  1293. State = 196; Match(OPTION_TEXT);
  1294. State = 197; Match(OPTION_SEPARATOR);
  1295. State = 198; Match(OPTION_LINK);
  1296. State = 199; Match(OPTION_CLOSE);
  1297. }
  1298. break;
  1299. case 2:
  1300. {
  1301. State = 200; Match(OPTION_ENTER);
  1302. State = 201; Match(OPTION_TEXT);
  1303. State = 202; Match(OPTION_CLOSE);
  1304. }
  1305. break;
  1306. }
  1307. State = 206;
  1308. ErrorHandler.Sync(this);
  1309. _la = TokenStream.LA(1);
  1310. if (_la==HASHTAG) {
  1311. {
  1312. State = 205; hashtag_block();
  1313. }
  1314. }
  1315. }
  1316. }
  1317. catch (RecognitionException re) {
  1318. _localctx.exception = re;
  1319. ErrorHandler.ReportError(this, re);
  1320. ErrorHandler.Recover(this, re);
  1321. }
  1322. finally {
  1323. ExitRule();
  1324. }
  1325. return _localctx;
  1326. }
  1327. public partial class FunctionContext : ParserRuleContext {
  1328. public ITerminalNode FUNC_ID() { return GetToken(YarnSpinnerParser.FUNC_ID, 0); }
  1329. public ExpressionContext[] expression() {
  1330. return GetRuleContexts<ExpressionContext>();
  1331. }
  1332. public ExpressionContext expression(int i) {
  1333. return GetRuleContext<ExpressionContext>(i);
  1334. }
  1335. public ITerminalNode[] COMMA() { return GetTokens(YarnSpinnerParser.COMMA); }
  1336. public ITerminalNode COMMA(int i) {
  1337. return GetToken(YarnSpinnerParser.COMMA, i);
  1338. }
  1339. public FunctionContext(ParserRuleContext parent, int invokingState)
  1340. : base(parent, invokingState)
  1341. {
  1342. }
  1343. public override int RuleIndex { get { return RULE_function; } }
  1344. public override void EnterRule(IParseTreeListener listener) {
  1345. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1346. if (typedListener != null) typedListener.EnterFunction(this);
  1347. }
  1348. public override void ExitRule(IParseTreeListener listener) {
  1349. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1350. if (typedListener != null) typedListener.ExitFunction(this);
  1351. }
  1352. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1353. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1354. if (typedVisitor != null) return typedVisitor.VisitFunction(this);
  1355. else return visitor.VisitChildren(this);
  1356. }
  1357. }
  1358. [RuleVersion(0)]
  1359. public FunctionContext function() {
  1360. FunctionContext _localctx = new FunctionContext(Context, State);
  1361. EnterRule(_localctx, 36, RULE_function);
  1362. int _la;
  1363. try {
  1364. EnterOuterAlt(_localctx, 1);
  1365. {
  1366. State = 208; Match(FUNC_ID);
  1367. State = 209; Match(LPAREN);
  1368. State = 211;
  1369. ErrorHandler.Sync(this);
  1370. _la = TokenStream.LA(1);
  1371. if (((((_la - 35)) & ~0x3f) == 0 && ((1L << (_la - 35)) & ((1L << (COMMAND_STRING - 35)) | (1L << (KEYWORD_TRUE - 35)) | (1L << (KEYWORD_FALSE - 35)) | (1L << (KEYWORD_NULL - 35)) | (1L << (OPERATOR_LOGICAL_NOT - 35)) | (1L << (OPERATOR_MATHS_SUBTRACTION - 35)) | (1L << (LPAREN - 35)) | (1L << (VAR_ID - 35)) | (1L << (BODY_NUMBER - 35)) | (1L << (FUNC_ID - 35)))) != 0)) {
  1372. {
  1373. State = 210; expression(0);
  1374. }
  1375. }
  1376. State = 217;
  1377. ErrorHandler.Sync(this);
  1378. _la = TokenStream.LA(1);
  1379. while (_la==COMMA) {
  1380. {
  1381. {
  1382. State = 213; Match(COMMA);
  1383. State = 214; expression(0);
  1384. }
  1385. }
  1386. State = 219;
  1387. ErrorHandler.Sync(this);
  1388. _la = TokenStream.LA(1);
  1389. }
  1390. State = 220; Match(RPAREN);
  1391. }
  1392. }
  1393. catch (RecognitionException re) {
  1394. _localctx.exception = re;
  1395. ErrorHandler.ReportError(this, re);
  1396. ErrorHandler.Recover(this, re);
  1397. }
  1398. finally {
  1399. ExitRule();
  1400. }
  1401. return _localctx;
  1402. }
  1403. public partial class Function_statementContext : ParserRuleContext {
  1404. public ITerminalNode COMMAND_FUNC() { return GetToken(YarnSpinnerParser.COMMAND_FUNC, 0); }
  1405. public ExpressionContext[] expression() {
  1406. return GetRuleContexts<ExpressionContext>();
  1407. }
  1408. public ExpressionContext expression(int i) {
  1409. return GetRuleContext<ExpressionContext>(i);
  1410. }
  1411. public ITerminalNode COMMAND_CLOSE() { return GetToken(YarnSpinnerParser.COMMAND_CLOSE, 0); }
  1412. public ITerminalNode[] COMMA() { return GetTokens(YarnSpinnerParser.COMMA); }
  1413. public ITerminalNode COMMA(int i) {
  1414. return GetToken(YarnSpinnerParser.COMMA, i);
  1415. }
  1416. public Function_statementContext(ParserRuleContext parent, int invokingState)
  1417. : base(parent, invokingState)
  1418. {
  1419. }
  1420. public override int RuleIndex { get { return RULE_function_statement; } }
  1421. public override void EnterRule(IParseTreeListener listener) {
  1422. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1423. if (typedListener != null) typedListener.EnterFunction_statement(this);
  1424. }
  1425. public override void ExitRule(IParseTreeListener listener) {
  1426. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1427. if (typedListener != null) typedListener.ExitFunction_statement(this);
  1428. }
  1429. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1430. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1431. if (typedVisitor != null) return typedVisitor.VisitFunction_statement(this);
  1432. else return visitor.VisitChildren(this);
  1433. }
  1434. }
  1435. [RuleVersion(0)]
  1436. public Function_statementContext function_statement() {
  1437. Function_statementContext _localctx = new Function_statementContext(Context, State);
  1438. EnterRule(_localctx, 38, RULE_function_statement);
  1439. int _la;
  1440. try {
  1441. EnterOuterAlt(_localctx, 1);
  1442. {
  1443. State = 222; Match(COMMAND_FUNC);
  1444. State = 223; expression(0);
  1445. State = 228;
  1446. ErrorHandler.Sync(this);
  1447. _la = TokenStream.LA(1);
  1448. while (_la==COMMA) {
  1449. {
  1450. {
  1451. State = 224; Match(COMMA);
  1452. State = 225; expression(0);
  1453. }
  1454. }
  1455. State = 230;
  1456. ErrorHandler.Sync(this);
  1457. _la = TokenStream.LA(1);
  1458. }
  1459. State = 231; Match(RPAREN);
  1460. State = 232; Match(COMMAND_CLOSE);
  1461. }
  1462. }
  1463. catch (RecognitionException re) {
  1464. _localctx.exception = re;
  1465. ErrorHandler.ReportError(this, re);
  1466. ErrorHandler.Recover(this, re);
  1467. }
  1468. finally {
  1469. ExitRule();
  1470. }
  1471. return _localctx;
  1472. }
  1473. public partial class Action_statementContext : ParserRuleContext {
  1474. public ITerminalNode ACTION() { return GetToken(YarnSpinnerParser.ACTION, 0); }
  1475. public Action_statementContext(ParserRuleContext parent, int invokingState)
  1476. : base(parent, invokingState)
  1477. {
  1478. }
  1479. public override int RuleIndex { get { return RULE_action_statement; } }
  1480. public override void EnterRule(IParseTreeListener listener) {
  1481. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1482. if (typedListener != null) typedListener.EnterAction_statement(this);
  1483. }
  1484. public override void ExitRule(IParseTreeListener listener) {
  1485. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1486. if (typedListener != null) typedListener.ExitAction_statement(this);
  1487. }
  1488. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1489. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1490. if (typedVisitor != null) return typedVisitor.VisitAction_statement(this);
  1491. else return visitor.VisitChildren(this);
  1492. }
  1493. }
  1494. [RuleVersion(0)]
  1495. public Action_statementContext action_statement() {
  1496. Action_statementContext _localctx = new Action_statementContext(Context, State);
  1497. EnterRule(_localctx, 40, RULE_action_statement);
  1498. try {
  1499. EnterOuterAlt(_localctx, 1);
  1500. {
  1501. State = 234; Match(ACTION);
  1502. }
  1503. }
  1504. catch (RecognitionException re) {
  1505. _localctx.exception = re;
  1506. ErrorHandler.ReportError(this, re);
  1507. ErrorHandler.Recover(this, re);
  1508. }
  1509. finally {
  1510. ExitRule();
  1511. }
  1512. return _localctx;
  1513. }
  1514. public partial class TextContext : ParserRuleContext {
  1515. public ITerminalNode TEXT() { return GetToken(YarnSpinnerParser.TEXT, 0); }
  1516. public ITerminalNode TEXT_STRING() { return GetToken(YarnSpinnerParser.TEXT_STRING, 0); }
  1517. public TextContext(ParserRuleContext parent, int invokingState)
  1518. : base(parent, invokingState)
  1519. {
  1520. }
  1521. public override int RuleIndex { get { return RULE_text; } }
  1522. public override void EnterRule(IParseTreeListener listener) {
  1523. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1524. if (typedListener != null) typedListener.EnterText(this);
  1525. }
  1526. public override void ExitRule(IParseTreeListener listener) {
  1527. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1528. if (typedListener != null) typedListener.ExitText(this);
  1529. }
  1530. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1531. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1532. if (typedVisitor != null) return typedVisitor.VisitText(this);
  1533. else return visitor.VisitChildren(this);
  1534. }
  1535. }
  1536. [RuleVersion(0)]
  1537. public TextContext text() {
  1538. TextContext _localctx = new TextContext(Context, State);
  1539. EnterRule(_localctx, 42, RULE_text);
  1540. int _la;
  1541. try {
  1542. EnterOuterAlt(_localctx, 1);
  1543. {
  1544. State = 236;
  1545. _la = TokenStream.LA(1);
  1546. if ( !(_la==TEXT_STRING || _la==TEXT) ) {
  1547. ErrorHandler.RecoverInline(this);
  1548. }
  1549. else {
  1550. ErrorHandler.ReportMatch(this);
  1551. Consume();
  1552. }
  1553. }
  1554. }
  1555. catch (RecognitionException re) {
  1556. _localctx.exception = re;
  1557. ErrorHandler.ReportError(this, re);
  1558. ErrorHandler.Recover(this, re);
  1559. }
  1560. finally {
  1561. ExitRule();
  1562. }
  1563. return _localctx;
  1564. }
  1565. public partial class Line_statementContext : ParserRuleContext {
  1566. public TextContext text() {
  1567. return GetRuleContext<TextContext>(0);
  1568. }
  1569. public Hashtag_blockContext hashtag_block() {
  1570. return GetRuleContext<Hashtag_blockContext>(0);
  1571. }
  1572. public Line_statementContext(ParserRuleContext parent, int invokingState)
  1573. : base(parent, invokingState)
  1574. {
  1575. }
  1576. public override int RuleIndex { get { return RULE_line_statement; } }
  1577. public override void EnterRule(IParseTreeListener listener) {
  1578. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1579. if (typedListener != null) typedListener.EnterLine_statement(this);
  1580. }
  1581. public override void ExitRule(IParseTreeListener listener) {
  1582. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1583. if (typedListener != null) typedListener.ExitLine_statement(this);
  1584. }
  1585. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1586. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1587. if (typedVisitor != null) return typedVisitor.VisitLine_statement(this);
  1588. else return visitor.VisitChildren(this);
  1589. }
  1590. }
  1591. [RuleVersion(0)]
  1592. public Line_statementContext line_statement() {
  1593. Line_statementContext _localctx = new Line_statementContext(Context, State);
  1594. EnterRule(_localctx, 44, RULE_line_statement);
  1595. int _la;
  1596. try {
  1597. EnterOuterAlt(_localctx, 1);
  1598. {
  1599. State = 238; text();
  1600. State = 240;
  1601. ErrorHandler.Sync(this);
  1602. _la = TokenStream.LA(1);
  1603. if (_la==HASHTAG) {
  1604. {
  1605. State = 239; hashtag_block();
  1606. }
  1607. }
  1608. }
  1609. }
  1610. catch (RecognitionException re) {
  1611. _localctx.exception = re;
  1612. ErrorHandler.ReportError(this, re);
  1613. ErrorHandler.Recover(this, re);
  1614. }
  1615. finally {
  1616. ExitRule();
  1617. }
  1618. return _localctx;
  1619. }
  1620. public partial class Hashtag_blockContext : ParserRuleContext {
  1621. public HashtagContext[] hashtag() {
  1622. return GetRuleContexts<HashtagContext>();
  1623. }
  1624. public HashtagContext hashtag(int i) {
  1625. return GetRuleContext<HashtagContext>(i);
  1626. }
  1627. public Hashtag_blockContext(ParserRuleContext parent, int invokingState)
  1628. : base(parent, invokingState)
  1629. {
  1630. }
  1631. public override int RuleIndex { get { return RULE_hashtag_block; } }
  1632. public override void EnterRule(IParseTreeListener listener) {
  1633. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1634. if (typedListener != null) typedListener.EnterHashtag_block(this);
  1635. }
  1636. public override void ExitRule(IParseTreeListener listener) {
  1637. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1638. if (typedListener != null) typedListener.ExitHashtag_block(this);
  1639. }
  1640. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1641. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1642. if (typedVisitor != null) return typedVisitor.VisitHashtag_block(this);
  1643. else return visitor.VisitChildren(this);
  1644. }
  1645. }
  1646. [RuleVersion(0)]
  1647. public Hashtag_blockContext hashtag_block() {
  1648. Hashtag_blockContext _localctx = new Hashtag_blockContext(Context, State);
  1649. EnterRule(_localctx, 46, RULE_hashtag_block);
  1650. int _la;
  1651. try {
  1652. EnterOuterAlt(_localctx, 1);
  1653. {
  1654. State = 243;
  1655. ErrorHandler.Sync(this);
  1656. _la = TokenStream.LA(1);
  1657. do {
  1658. {
  1659. {
  1660. State = 242; hashtag();
  1661. }
  1662. }
  1663. State = 245;
  1664. ErrorHandler.Sync(this);
  1665. _la = TokenStream.LA(1);
  1666. } while ( _la==HASHTAG );
  1667. }
  1668. }
  1669. catch (RecognitionException re) {
  1670. _localctx.exception = re;
  1671. ErrorHandler.ReportError(this, re);
  1672. ErrorHandler.Recover(this, re);
  1673. }
  1674. finally {
  1675. ExitRule();
  1676. }
  1677. return _localctx;
  1678. }
  1679. public partial class HashtagContext : ParserRuleContext {
  1680. public ITerminalNode HASHTAG() { return GetToken(YarnSpinnerParser.HASHTAG, 0); }
  1681. public HashtagContext(ParserRuleContext parent, int invokingState)
  1682. : base(parent, invokingState)
  1683. {
  1684. }
  1685. public override int RuleIndex { get { return RULE_hashtag; } }
  1686. public override void EnterRule(IParseTreeListener listener) {
  1687. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1688. if (typedListener != null) typedListener.EnterHashtag(this);
  1689. }
  1690. public override void ExitRule(IParseTreeListener listener) {
  1691. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1692. if (typedListener != null) typedListener.ExitHashtag(this);
  1693. }
  1694. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1695. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1696. if (typedVisitor != null) return typedVisitor.VisitHashtag(this);
  1697. else return visitor.VisitChildren(this);
  1698. }
  1699. }
  1700. [RuleVersion(0)]
  1701. public HashtagContext hashtag() {
  1702. HashtagContext _localctx = new HashtagContext(Context, State);
  1703. EnterRule(_localctx, 48, RULE_hashtag);
  1704. try {
  1705. EnterOuterAlt(_localctx, 1);
  1706. {
  1707. State = 247; Match(HASHTAG);
  1708. }
  1709. }
  1710. catch (RecognitionException re) {
  1711. _localctx.exception = re;
  1712. ErrorHandler.ReportError(this, re);
  1713. ErrorHandler.Recover(this, re);
  1714. }
  1715. finally {
  1716. ExitRule();
  1717. }
  1718. return _localctx;
  1719. }
  1720. public partial class ExpressionContext : ParserRuleContext {
  1721. public ExpressionContext(ParserRuleContext parent, int invokingState)
  1722. : base(parent, invokingState)
  1723. {
  1724. }
  1725. public override int RuleIndex { get { return RULE_expression; } }
  1726. public ExpressionContext() { }
  1727. public virtual void CopyFrom(ExpressionContext context) {
  1728. base.CopyFrom(context);
  1729. }
  1730. }
  1731. public partial class ExpParensContext : ExpressionContext {
  1732. public ExpressionContext expression() {
  1733. return GetRuleContext<ExpressionContext>(0);
  1734. }
  1735. public ExpParensContext(ExpressionContext context) { CopyFrom(context); }
  1736. public override void EnterRule(IParseTreeListener listener) {
  1737. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1738. if (typedListener != null) typedListener.EnterExpParens(this);
  1739. }
  1740. public override void ExitRule(IParseTreeListener listener) {
  1741. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1742. if (typedListener != null) typedListener.ExitExpParens(this);
  1743. }
  1744. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1745. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1746. if (typedVisitor != null) return typedVisitor.VisitExpParens(this);
  1747. else return visitor.VisitChildren(this);
  1748. }
  1749. }
  1750. public partial class ExpMultDivModContext : ExpressionContext {
  1751. public IToken op;
  1752. public ExpressionContext[] expression() {
  1753. return GetRuleContexts<ExpressionContext>();
  1754. }
  1755. public ExpressionContext expression(int i) {
  1756. return GetRuleContext<ExpressionContext>(i);
  1757. }
  1758. public ExpMultDivModContext(ExpressionContext context) { CopyFrom(context); }
  1759. public override void EnterRule(IParseTreeListener listener) {
  1760. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1761. if (typedListener != null) typedListener.EnterExpMultDivMod(this);
  1762. }
  1763. public override void ExitRule(IParseTreeListener listener) {
  1764. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1765. if (typedListener != null) typedListener.ExitExpMultDivMod(this);
  1766. }
  1767. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1768. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1769. if (typedVisitor != null) return typedVisitor.VisitExpMultDivMod(this);
  1770. else return visitor.VisitChildren(this);
  1771. }
  1772. }
  1773. public partial class ExpMultDivModEqualsContext : ExpressionContext {
  1774. public IToken op;
  1775. public VariableContext variable() {
  1776. return GetRuleContext<VariableContext>(0);
  1777. }
  1778. public ExpressionContext expression() {
  1779. return GetRuleContext<ExpressionContext>(0);
  1780. }
  1781. public ExpMultDivModEqualsContext(ExpressionContext context) { CopyFrom(context); }
  1782. public override void EnterRule(IParseTreeListener listener) {
  1783. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1784. if (typedListener != null) typedListener.EnterExpMultDivModEquals(this);
  1785. }
  1786. public override void ExitRule(IParseTreeListener listener) {
  1787. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1788. if (typedListener != null) typedListener.ExitExpMultDivModEquals(this);
  1789. }
  1790. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1791. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1792. if (typedVisitor != null) return typedVisitor.VisitExpMultDivModEquals(this);
  1793. else return visitor.VisitChildren(this);
  1794. }
  1795. }
  1796. public partial class ExpComparisonContext : ExpressionContext {
  1797. public IToken op;
  1798. public ExpressionContext[] expression() {
  1799. return GetRuleContexts<ExpressionContext>();
  1800. }
  1801. public ExpressionContext expression(int i) {
  1802. return GetRuleContext<ExpressionContext>(i);
  1803. }
  1804. public ITerminalNode OPERATOR_LOGICAL_LESS_THAN_EQUALS() { return GetToken(YarnSpinnerParser.OPERATOR_LOGICAL_LESS_THAN_EQUALS, 0); }
  1805. public ITerminalNode OPERATOR_LOGICAL_GREATER_THAN_EQUALS() { return GetToken(YarnSpinnerParser.OPERATOR_LOGICAL_GREATER_THAN_EQUALS, 0); }
  1806. public ITerminalNode OPERATOR_LOGICAL_LESS() { return GetToken(YarnSpinnerParser.OPERATOR_LOGICAL_LESS, 0); }
  1807. public ITerminalNode OPERATOR_LOGICAL_GREATER() { return GetToken(YarnSpinnerParser.OPERATOR_LOGICAL_GREATER, 0); }
  1808. public ExpComparisonContext(ExpressionContext context) { CopyFrom(context); }
  1809. public override void EnterRule(IParseTreeListener listener) {
  1810. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1811. if (typedListener != null) typedListener.EnterExpComparison(this);
  1812. }
  1813. public override void ExitRule(IParseTreeListener listener) {
  1814. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1815. if (typedListener != null) typedListener.ExitExpComparison(this);
  1816. }
  1817. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1818. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1819. if (typedVisitor != null) return typedVisitor.VisitExpComparison(this);
  1820. else return visitor.VisitChildren(this);
  1821. }
  1822. }
  1823. public partial class ExpNegativeContext : ExpressionContext {
  1824. public ExpressionContext expression() {
  1825. return GetRuleContext<ExpressionContext>(0);
  1826. }
  1827. public ExpNegativeContext(ExpressionContext context) { CopyFrom(context); }
  1828. public override void EnterRule(IParseTreeListener listener) {
  1829. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1830. if (typedListener != null) typedListener.EnterExpNegative(this);
  1831. }
  1832. public override void ExitRule(IParseTreeListener listener) {
  1833. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1834. if (typedListener != null) typedListener.ExitExpNegative(this);
  1835. }
  1836. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1837. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1838. if (typedVisitor != null) return typedVisitor.VisitExpNegative(this);
  1839. else return visitor.VisitChildren(this);
  1840. }
  1841. }
  1842. public partial class ExpAndOrXorContext : ExpressionContext {
  1843. public IToken op;
  1844. public ExpressionContext[] expression() {
  1845. return GetRuleContexts<ExpressionContext>();
  1846. }
  1847. public ExpressionContext expression(int i) {
  1848. return GetRuleContext<ExpressionContext>(i);
  1849. }
  1850. public ITerminalNode OPERATOR_LOGICAL_AND() { return GetToken(YarnSpinnerParser.OPERATOR_LOGICAL_AND, 0); }
  1851. public ITerminalNode OPERATOR_LOGICAL_OR() { return GetToken(YarnSpinnerParser.OPERATOR_LOGICAL_OR, 0); }
  1852. public ITerminalNode OPERATOR_LOGICAL_XOR() { return GetToken(YarnSpinnerParser.OPERATOR_LOGICAL_XOR, 0); }
  1853. public ExpAndOrXorContext(ExpressionContext context) { CopyFrom(context); }
  1854. public override void EnterRule(IParseTreeListener listener) {
  1855. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1856. if (typedListener != null) typedListener.EnterExpAndOrXor(this);
  1857. }
  1858. public override void ExitRule(IParseTreeListener listener) {
  1859. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1860. if (typedListener != null) typedListener.ExitExpAndOrXor(this);
  1861. }
  1862. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1863. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1864. if (typedVisitor != null) return typedVisitor.VisitExpAndOrXor(this);
  1865. else return visitor.VisitChildren(this);
  1866. }
  1867. }
  1868. public partial class ExpPlusMinusEqualsContext : ExpressionContext {
  1869. public IToken op;
  1870. public VariableContext variable() {
  1871. return GetRuleContext<VariableContext>(0);
  1872. }
  1873. public ExpressionContext expression() {
  1874. return GetRuleContext<ExpressionContext>(0);
  1875. }
  1876. public ExpPlusMinusEqualsContext(ExpressionContext context) { CopyFrom(context); }
  1877. public override void EnterRule(IParseTreeListener listener) {
  1878. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1879. if (typedListener != null) typedListener.EnterExpPlusMinusEquals(this);
  1880. }
  1881. public override void ExitRule(IParseTreeListener listener) {
  1882. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1883. if (typedListener != null) typedListener.ExitExpPlusMinusEquals(this);
  1884. }
  1885. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1886. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1887. if (typedVisitor != null) return typedVisitor.VisitExpPlusMinusEquals(this);
  1888. else return visitor.VisitChildren(this);
  1889. }
  1890. }
  1891. public partial class ExpAddSubContext : ExpressionContext {
  1892. public IToken op;
  1893. public ExpressionContext[] expression() {
  1894. return GetRuleContexts<ExpressionContext>();
  1895. }
  1896. public ExpressionContext expression(int i) {
  1897. return GetRuleContext<ExpressionContext>(i);
  1898. }
  1899. public ExpAddSubContext(ExpressionContext context) { CopyFrom(context); }
  1900. public override void EnterRule(IParseTreeListener listener) {
  1901. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1902. if (typedListener != null) typedListener.EnterExpAddSub(this);
  1903. }
  1904. public override void ExitRule(IParseTreeListener listener) {
  1905. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1906. if (typedListener != null) typedListener.ExitExpAddSub(this);
  1907. }
  1908. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1909. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1910. if (typedVisitor != null) return typedVisitor.VisitExpAddSub(this);
  1911. else return visitor.VisitChildren(this);
  1912. }
  1913. }
  1914. public partial class ExpNotContext : ExpressionContext {
  1915. public ITerminalNode OPERATOR_LOGICAL_NOT() { return GetToken(YarnSpinnerParser.OPERATOR_LOGICAL_NOT, 0); }
  1916. public ExpressionContext expression() {
  1917. return GetRuleContext<ExpressionContext>(0);
  1918. }
  1919. public ExpNotContext(ExpressionContext context) { CopyFrom(context); }
  1920. public override void EnterRule(IParseTreeListener listener) {
  1921. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1922. if (typedListener != null) typedListener.EnterExpNot(this);
  1923. }
  1924. public override void ExitRule(IParseTreeListener listener) {
  1925. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1926. if (typedListener != null) typedListener.ExitExpNot(this);
  1927. }
  1928. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1929. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1930. if (typedVisitor != null) return typedVisitor.VisitExpNot(this);
  1931. else return visitor.VisitChildren(this);
  1932. }
  1933. }
  1934. public partial class ExpValueContext : ExpressionContext {
  1935. public ValueContext value() {
  1936. return GetRuleContext<ValueContext>(0);
  1937. }
  1938. public ExpValueContext(ExpressionContext context) { CopyFrom(context); }
  1939. public override void EnterRule(IParseTreeListener listener) {
  1940. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1941. if (typedListener != null) typedListener.EnterExpValue(this);
  1942. }
  1943. public override void ExitRule(IParseTreeListener listener) {
  1944. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1945. if (typedListener != null) typedListener.ExitExpValue(this);
  1946. }
  1947. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1948. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1949. if (typedVisitor != null) return typedVisitor.VisitExpValue(this);
  1950. else return visitor.VisitChildren(this);
  1951. }
  1952. }
  1953. public partial class ExpEqualityContext : ExpressionContext {
  1954. public IToken op;
  1955. public ExpressionContext[] expression() {
  1956. return GetRuleContexts<ExpressionContext>();
  1957. }
  1958. public ExpressionContext expression(int i) {
  1959. return GetRuleContext<ExpressionContext>(i);
  1960. }
  1961. public ITerminalNode OPERATOR_LOGICAL_EQUALS() { return GetToken(YarnSpinnerParser.OPERATOR_LOGICAL_EQUALS, 0); }
  1962. public ITerminalNode OPERATOR_LOGICAL_NOT_EQUALS() { return GetToken(YarnSpinnerParser.OPERATOR_LOGICAL_NOT_EQUALS, 0); }
  1963. public ExpEqualityContext(ExpressionContext context) { CopyFrom(context); }
  1964. public override void EnterRule(IParseTreeListener listener) {
  1965. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1966. if (typedListener != null) typedListener.EnterExpEquality(this);
  1967. }
  1968. public override void ExitRule(IParseTreeListener listener) {
  1969. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  1970. if (typedListener != null) typedListener.ExitExpEquality(this);
  1971. }
  1972. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  1973. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  1974. if (typedVisitor != null) return typedVisitor.VisitExpEquality(this);
  1975. else return visitor.VisitChildren(this);
  1976. }
  1977. }
  1978. [RuleVersion(0)]
  1979. public ExpressionContext expression() {
  1980. return expression(0);
  1981. }
  1982. private ExpressionContext expression(int _p) {
  1983. ParserRuleContext _parentctx = Context;
  1984. int _parentState = State;
  1985. ExpressionContext _localctx = new ExpressionContext(Context, _parentState);
  1986. ExpressionContext _prevctx = _localctx;
  1987. int _startState = 50;
  1988. EnterRecursionRule(_localctx, 50, RULE_expression, _p);
  1989. int _la;
  1990. try {
  1991. int _alt;
  1992. EnterOuterAlt(_localctx, 1);
  1993. {
  1994. State = 267;
  1995. ErrorHandler.Sync(this);
  1996. switch ( Interpreter.AdaptivePredict(TokenStream,26,Context) ) {
  1997. case 1:
  1998. {
  1999. _localctx = new ExpParensContext(_localctx);
  2000. Context = _localctx;
  2001. _prevctx = _localctx;
  2002. State = 250; Match(LPAREN);
  2003. State = 251; expression(0);
  2004. State = 252; Match(RPAREN);
  2005. }
  2006. break;
  2007. case 2:
  2008. {
  2009. _localctx = new ExpNegativeContext(_localctx);
  2010. Context = _localctx;
  2011. _prevctx = _localctx;
  2012. State = 254; Match(OPERATOR_MATHS_SUBTRACTION);
  2013. State = 255; expression(10);
  2014. }
  2015. break;
  2016. case 3:
  2017. {
  2018. _localctx = new ExpNotContext(_localctx);
  2019. Context = _localctx;
  2020. _prevctx = _localctx;
  2021. State = 256; Match(OPERATOR_LOGICAL_NOT);
  2022. State = 257; expression(9);
  2023. }
  2024. break;
  2025. case 4:
  2026. {
  2027. _localctx = new ExpMultDivModEqualsContext(_localctx);
  2028. Context = _localctx;
  2029. _prevctx = _localctx;
  2030. State = 258; variable();
  2031. State = 259;
  2032. ((ExpMultDivModEqualsContext)_localctx).op = TokenStream.LT(1);
  2033. _la = TokenStream.LA(1);
  2034. if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OPERATOR_MATHS_MULTIPLICATION_EQUALS) | (1L << OPERATOR_MATHS_MODULUS_EQUALS) | (1L << OPERATOR_MATHS_DIVISION_EQUALS))) != 0)) ) {
  2035. ((ExpMultDivModEqualsContext)_localctx).op = ErrorHandler.RecoverInline(this);
  2036. }
  2037. else {
  2038. ErrorHandler.ReportMatch(this);
  2039. Consume();
  2040. }
  2041. State = 260; expression(4);
  2042. }
  2043. break;
  2044. case 5:
  2045. {
  2046. _localctx = new ExpPlusMinusEqualsContext(_localctx);
  2047. Context = _localctx;
  2048. _prevctx = _localctx;
  2049. State = 262; variable();
  2050. State = 263;
  2051. ((ExpPlusMinusEqualsContext)_localctx).op = TokenStream.LT(1);
  2052. _la = TokenStream.LA(1);
  2053. if ( !(_la==OPERATOR_MATHS_ADDITION_EQUALS || _la==OPERATOR_MATHS_SUBTRACTION_EQUALS) ) {
  2054. ((ExpPlusMinusEqualsContext)_localctx).op = ErrorHandler.RecoverInline(this);
  2055. }
  2056. else {
  2057. ErrorHandler.ReportMatch(this);
  2058. Consume();
  2059. }
  2060. State = 264; expression(3);
  2061. }
  2062. break;
  2063. case 6:
  2064. {
  2065. _localctx = new ExpValueContext(_localctx);
  2066. Context = _localctx;
  2067. _prevctx = _localctx;
  2068. State = 266; value();
  2069. }
  2070. break;
  2071. }
  2072. Context.Stop = TokenStream.LT(-1);
  2073. State = 286;
  2074. ErrorHandler.Sync(this);
  2075. _alt = Interpreter.AdaptivePredict(TokenStream,28,Context);
  2076. while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) {
  2077. if ( _alt==1 ) {
  2078. if ( ParseListeners!=null )
  2079. TriggerExitRuleEvent();
  2080. _prevctx = _localctx;
  2081. {
  2082. State = 284;
  2083. ErrorHandler.Sync(this);
  2084. switch ( Interpreter.AdaptivePredict(TokenStream,27,Context) ) {
  2085. case 1:
  2086. {
  2087. _localctx = new ExpMultDivModContext(new ExpressionContext(_parentctx, _parentState));
  2088. PushNewRecursionContext(_localctx, _startState, RULE_expression);
  2089. State = 269;
  2090. if (!(Precpred(Context, 8))) throw new FailedPredicateException(this, "Precpred(Context, 8)");
  2091. State = 270;
  2092. ((ExpMultDivModContext)_localctx).op = TokenStream.LT(1);
  2093. _la = TokenStream.LA(1);
  2094. if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OPERATOR_MATHS_MULTIPLICATION) | (1L << OPERATOR_MATHS_DIVISION) | (1L << OPERATOR_MATHS_MODULUS))) != 0)) ) {
  2095. ((ExpMultDivModContext)_localctx).op = ErrorHandler.RecoverInline(this);
  2096. }
  2097. else {
  2098. ErrorHandler.ReportMatch(this);
  2099. Consume();
  2100. }
  2101. State = 271; expression(9);
  2102. }
  2103. break;
  2104. case 2:
  2105. {
  2106. _localctx = new ExpAddSubContext(new ExpressionContext(_parentctx, _parentState));
  2107. PushNewRecursionContext(_localctx, _startState, RULE_expression);
  2108. State = 272;
  2109. if (!(Precpred(Context, 7))) throw new FailedPredicateException(this, "Precpred(Context, 7)");
  2110. State = 273;
  2111. ((ExpAddSubContext)_localctx).op = TokenStream.LT(1);
  2112. _la = TokenStream.LA(1);
  2113. if ( !(_la==OPERATOR_MATHS_ADDITION || _la==OPERATOR_MATHS_SUBTRACTION) ) {
  2114. ((ExpAddSubContext)_localctx).op = ErrorHandler.RecoverInline(this);
  2115. }
  2116. else {
  2117. ErrorHandler.ReportMatch(this);
  2118. Consume();
  2119. }
  2120. State = 274; expression(8);
  2121. }
  2122. break;
  2123. case 3:
  2124. {
  2125. _localctx = new ExpComparisonContext(new ExpressionContext(_parentctx, _parentState));
  2126. PushNewRecursionContext(_localctx, _startState, RULE_expression);
  2127. State = 275;
  2128. if (!(Precpred(Context, 6))) throw new FailedPredicateException(this, "Precpred(Context, 6)");
  2129. State = 276;
  2130. ((ExpComparisonContext)_localctx).op = TokenStream.LT(1);
  2131. _la = TokenStream.LA(1);
  2132. if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OPERATOR_LOGICAL_LESS_THAN_EQUALS) | (1L << OPERATOR_LOGICAL_GREATER_THAN_EQUALS) | (1L << OPERATOR_LOGICAL_LESS) | (1L << OPERATOR_LOGICAL_GREATER))) != 0)) ) {
  2133. ((ExpComparisonContext)_localctx).op = ErrorHandler.RecoverInline(this);
  2134. }
  2135. else {
  2136. ErrorHandler.ReportMatch(this);
  2137. Consume();
  2138. }
  2139. State = 277; expression(7);
  2140. }
  2141. break;
  2142. case 4:
  2143. {
  2144. _localctx = new ExpEqualityContext(new ExpressionContext(_parentctx, _parentState));
  2145. PushNewRecursionContext(_localctx, _startState, RULE_expression);
  2146. State = 278;
  2147. if (!(Precpred(Context, 5))) throw new FailedPredicateException(this, "Precpred(Context, 5)");
  2148. State = 279;
  2149. ((ExpEqualityContext)_localctx).op = TokenStream.LT(1);
  2150. _la = TokenStream.LA(1);
  2151. if ( !(_la==OPERATOR_LOGICAL_EQUALS || _la==OPERATOR_LOGICAL_NOT_EQUALS) ) {
  2152. ((ExpEqualityContext)_localctx).op = ErrorHandler.RecoverInline(this);
  2153. }
  2154. else {
  2155. ErrorHandler.ReportMatch(this);
  2156. Consume();
  2157. }
  2158. State = 280; expression(6);
  2159. }
  2160. break;
  2161. case 5:
  2162. {
  2163. _localctx = new ExpAndOrXorContext(new ExpressionContext(_parentctx, _parentState));
  2164. PushNewRecursionContext(_localctx, _startState, RULE_expression);
  2165. State = 281;
  2166. if (!(Precpred(Context, 2))) throw new FailedPredicateException(this, "Precpred(Context, 2)");
  2167. State = 282;
  2168. ((ExpAndOrXorContext)_localctx).op = TokenStream.LT(1);
  2169. _la = TokenStream.LA(1);
  2170. if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OPERATOR_LOGICAL_AND) | (1L << OPERATOR_LOGICAL_OR) | (1L << OPERATOR_LOGICAL_XOR))) != 0)) ) {
  2171. ((ExpAndOrXorContext)_localctx).op = ErrorHandler.RecoverInline(this);
  2172. }
  2173. else {
  2174. ErrorHandler.ReportMatch(this);
  2175. Consume();
  2176. }
  2177. State = 283; expression(3);
  2178. }
  2179. break;
  2180. }
  2181. }
  2182. }
  2183. State = 288;
  2184. ErrorHandler.Sync(this);
  2185. _alt = Interpreter.AdaptivePredict(TokenStream,28,Context);
  2186. }
  2187. }
  2188. }
  2189. catch (RecognitionException re) {
  2190. _localctx.exception = re;
  2191. ErrorHandler.ReportError(this, re);
  2192. ErrorHandler.Recover(this, re);
  2193. }
  2194. finally {
  2195. UnrollRecursionContexts(_parentctx);
  2196. }
  2197. return _localctx;
  2198. }
  2199. public partial class ValueContext : ParserRuleContext {
  2200. public ValueContext(ParserRuleContext parent, int invokingState)
  2201. : base(parent, invokingState)
  2202. {
  2203. }
  2204. public override int RuleIndex { get { return RULE_value; } }
  2205. public ValueContext() { }
  2206. public virtual void CopyFrom(ValueContext context) {
  2207. base.CopyFrom(context);
  2208. }
  2209. }
  2210. public partial class ValueNullContext : ValueContext {
  2211. public ITerminalNode KEYWORD_NULL() { return GetToken(YarnSpinnerParser.KEYWORD_NULL, 0); }
  2212. public ValueNullContext(ValueContext context) { CopyFrom(context); }
  2213. public override void EnterRule(IParseTreeListener listener) {
  2214. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2215. if (typedListener != null) typedListener.EnterValueNull(this);
  2216. }
  2217. public override void ExitRule(IParseTreeListener listener) {
  2218. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2219. if (typedListener != null) typedListener.ExitValueNull(this);
  2220. }
  2221. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  2222. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  2223. if (typedVisitor != null) return typedVisitor.VisitValueNull(this);
  2224. else return visitor.VisitChildren(this);
  2225. }
  2226. }
  2227. public partial class ValueNumberContext : ValueContext {
  2228. public ITerminalNode BODY_NUMBER() { return GetToken(YarnSpinnerParser.BODY_NUMBER, 0); }
  2229. public ValueNumberContext(ValueContext context) { CopyFrom(context); }
  2230. public override void EnterRule(IParseTreeListener listener) {
  2231. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2232. if (typedListener != null) typedListener.EnterValueNumber(this);
  2233. }
  2234. public override void ExitRule(IParseTreeListener listener) {
  2235. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2236. if (typedListener != null) typedListener.ExitValueNumber(this);
  2237. }
  2238. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  2239. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  2240. if (typedVisitor != null) return typedVisitor.VisitValueNumber(this);
  2241. else return visitor.VisitChildren(this);
  2242. }
  2243. }
  2244. public partial class ValueTrueContext : ValueContext {
  2245. public ITerminalNode KEYWORD_TRUE() { return GetToken(YarnSpinnerParser.KEYWORD_TRUE, 0); }
  2246. public ValueTrueContext(ValueContext context) { CopyFrom(context); }
  2247. public override void EnterRule(IParseTreeListener listener) {
  2248. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2249. if (typedListener != null) typedListener.EnterValueTrue(this);
  2250. }
  2251. public override void ExitRule(IParseTreeListener listener) {
  2252. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2253. if (typedListener != null) typedListener.ExitValueTrue(this);
  2254. }
  2255. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  2256. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  2257. if (typedVisitor != null) return typedVisitor.VisitValueTrue(this);
  2258. else return visitor.VisitChildren(this);
  2259. }
  2260. }
  2261. public partial class ValueFalseContext : ValueContext {
  2262. public ITerminalNode KEYWORD_FALSE() { return GetToken(YarnSpinnerParser.KEYWORD_FALSE, 0); }
  2263. public ValueFalseContext(ValueContext context) { CopyFrom(context); }
  2264. public override void EnterRule(IParseTreeListener listener) {
  2265. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2266. if (typedListener != null) typedListener.EnterValueFalse(this);
  2267. }
  2268. public override void ExitRule(IParseTreeListener listener) {
  2269. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2270. if (typedListener != null) typedListener.ExitValueFalse(this);
  2271. }
  2272. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  2273. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  2274. if (typedVisitor != null) return typedVisitor.VisitValueFalse(this);
  2275. else return visitor.VisitChildren(this);
  2276. }
  2277. }
  2278. public partial class ValueFuncContext : ValueContext {
  2279. public FunctionContext function() {
  2280. return GetRuleContext<FunctionContext>(0);
  2281. }
  2282. public ValueFuncContext(ValueContext context) { CopyFrom(context); }
  2283. public override void EnterRule(IParseTreeListener listener) {
  2284. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2285. if (typedListener != null) typedListener.EnterValueFunc(this);
  2286. }
  2287. public override void ExitRule(IParseTreeListener listener) {
  2288. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2289. if (typedListener != null) typedListener.ExitValueFunc(this);
  2290. }
  2291. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  2292. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  2293. if (typedVisitor != null) return typedVisitor.VisitValueFunc(this);
  2294. else return visitor.VisitChildren(this);
  2295. }
  2296. }
  2297. public partial class ValueVarContext : ValueContext {
  2298. public VariableContext variable() {
  2299. return GetRuleContext<VariableContext>(0);
  2300. }
  2301. public ValueVarContext(ValueContext context) { CopyFrom(context); }
  2302. public override void EnterRule(IParseTreeListener listener) {
  2303. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2304. if (typedListener != null) typedListener.EnterValueVar(this);
  2305. }
  2306. public override void ExitRule(IParseTreeListener listener) {
  2307. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2308. if (typedListener != null) typedListener.ExitValueVar(this);
  2309. }
  2310. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  2311. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  2312. if (typedVisitor != null) return typedVisitor.VisitValueVar(this);
  2313. else return visitor.VisitChildren(this);
  2314. }
  2315. }
  2316. public partial class ValueStringContext : ValueContext {
  2317. public ITerminalNode COMMAND_STRING() { return GetToken(YarnSpinnerParser.COMMAND_STRING, 0); }
  2318. public ValueStringContext(ValueContext context) { CopyFrom(context); }
  2319. public override void EnterRule(IParseTreeListener listener) {
  2320. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2321. if (typedListener != null) typedListener.EnterValueString(this);
  2322. }
  2323. public override void ExitRule(IParseTreeListener listener) {
  2324. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2325. if (typedListener != null) typedListener.ExitValueString(this);
  2326. }
  2327. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  2328. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  2329. if (typedVisitor != null) return typedVisitor.VisitValueString(this);
  2330. else return visitor.VisitChildren(this);
  2331. }
  2332. }
  2333. [RuleVersion(0)]
  2334. public ValueContext value() {
  2335. ValueContext _localctx = new ValueContext(Context, State);
  2336. EnterRule(_localctx, 52, RULE_value);
  2337. try {
  2338. State = 296;
  2339. ErrorHandler.Sync(this);
  2340. switch (TokenStream.LA(1)) {
  2341. case BODY_NUMBER:
  2342. _localctx = new ValueNumberContext(_localctx);
  2343. EnterOuterAlt(_localctx, 1);
  2344. {
  2345. State = 289; Match(BODY_NUMBER);
  2346. }
  2347. break;
  2348. case KEYWORD_TRUE:
  2349. _localctx = new ValueTrueContext(_localctx);
  2350. EnterOuterAlt(_localctx, 2);
  2351. {
  2352. State = 290; Match(KEYWORD_TRUE);
  2353. }
  2354. break;
  2355. case KEYWORD_FALSE:
  2356. _localctx = new ValueFalseContext(_localctx);
  2357. EnterOuterAlt(_localctx, 3);
  2358. {
  2359. State = 291; Match(KEYWORD_FALSE);
  2360. }
  2361. break;
  2362. case VAR_ID:
  2363. _localctx = new ValueVarContext(_localctx);
  2364. EnterOuterAlt(_localctx, 4);
  2365. {
  2366. State = 292; variable();
  2367. }
  2368. break;
  2369. case COMMAND_STRING:
  2370. _localctx = new ValueStringContext(_localctx);
  2371. EnterOuterAlt(_localctx, 5);
  2372. {
  2373. State = 293; Match(COMMAND_STRING);
  2374. }
  2375. break;
  2376. case FUNC_ID:
  2377. _localctx = new ValueFuncContext(_localctx);
  2378. EnterOuterAlt(_localctx, 6);
  2379. {
  2380. State = 294; function();
  2381. }
  2382. break;
  2383. case KEYWORD_NULL:
  2384. _localctx = new ValueNullContext(_localctx);
  2385. EnterOuterAlt(_localctx, 7);
  2386. {
  2387. State = 295; Match(KEYWORD_NULL);
  2388. }
  2389. break;
  2390. default:
  2391. throw new NoViableAltException(this);
  2392. }
  2393. }
  2394. catch (RecognitionException re) {
  2395. _localctx.exception = re;
  2396. ErrorHandler.ReportError(this, re);
  2397. ErrorHandler.Recover(this, re);
  2398. }
  2399. finally {
  2400. ExitRule();
  2401. }
  2402. return _localctx;
  2403. }
  2404. public partial class VariableContext : ParserRuleContext {
  2405. public ITerminalNode VAR_ID() { return GetToken(YarnSpinnerParser.VAR_ID, 0); }
  2406. public VariableContext(ParserRuleContext parent, int invokingState)
  2407. : base(parent, invokingState)
  2408. {
  2409. }
  2410. public override int RuleIndex { get { return RULE_variable; } }
  2411. public override void EnterRule(IParseTreeListener listener) {
  2412. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2413. if (typedListener != null) typedListener.EnterVariable(this);
  2414. }
  2415. public override void ExitRule(IParseTreeListener listener) {
  2416. IYarnSpinnerParserListener typedListener = listener as IYarnSpinnerParserListener;
  2417. if (typedListener != null) typedListener.ExitVariable(this);
  2418. }
  2419. public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
  2420. IYarnSpinnerParserVisitor<TResult> typedVisitor = visitor as IYarnSpinnerParserVisitor<TResult>;
  2421. if (typedVisitor != null) return typedVisitor.VisitVariable(this);
  2422. else return visitor.VisitChildren(this);
  2423. }
  2424. }
  2425. [RuleVersion(0)]
  2426. public VariableContext variable() {
  2427. VariableContext _localctx = new VariableContext(Context, State);
  2428. EnterRule(_localctx, 54, RULE_variable);
  2429. try {
  2430. EnterOuterAlt(_localctx, 1);
  2431. {
  2432. State = 298; Match(VAR_ID);
  2433. }
  2434. }
  2435. catch (RecognitionException re) {
  2436. _localctx.exception = re;
  2437. ErrorHandler.ReportError(this, re);
  2438. ErrorHandler.Recover(this, re);
  2439. }
  2440. finally {
  2441. ExitRule();
  2442. }
  2443. return _localctx;
  2444. }
  2445. public override bool Sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
  2446. switch (ruleIndex) {
  2447. case 25: return expression_sempred((ExpressionContext)_localctx, predIndex);
  2448. }
  2449. return true;
  2450. }
  2451. private bool expression_sempred(ExpressionContext _localctx, int predIndex) {
  2452. switch (predIndex) {
  2453. case 0: return Precpred(Context, 8);
  2454. case 1: return Precpred(Context, 7);
  2455. case 2: return Precpred(Context, 6);
  2456. case 3: return Precpred(Context, 5);
  2457. case 4: return Precpred(Context, 2);
  2458. }
  2459. return true;
  2460. }
  2461. private static char[] _serializedATN = {
  2462. '\x3', '\x608B', '\xA72A', '\x8133', '\xB9ED', '\x417C', '\x3BE7', '\x7786',
  2463. '\x5964', '\x3', 'M', '\x12F', '\x4', '\x2', '\t', '\x2', '\x4', '\x3',
  2464. '\t', '\x3', '\x4', '\x4', '\t', '\x4', '\x4', '\x5', '\t', '\x5', '\x4',
  2465. '\x6', '\t', '\x6', '\x4', '\a', '\t', '\a', '\x4', '\b', '\t', '\b',
  2466. '\x4', '\t', '\t', '\t', '\x4', '\n', '\t', '\n', '\x4', '\v', '\t', '\v',
  2467. '\x4', '\f', '\t', '\f', '\x4', '\r', '\t', '\r', '\x4', '\xE', '\t',
  2468. '\xE', '\x4', '\xF', '\t', '\xF', '\x4', '\x10', '\t', '\x10', '\x4',
  2469. '\x11', '\t', '\x11', '\x4', '\x12', '\t', '\x12', '\x4', '\x13', '\t',
  2470. '\x13', '\x4', '\x14', '\t', '\x14', '\x4', '\x15', '\t', '\x15', '\x4',
  2471. '\x16', '\t', '\x16', '\x4', '\x17', '\t', '\x17', '\x4', '\x18', '\t',
  2472. '\x18', '\x4', '\x19', '\t', '\x19', '\x4', '\x1A', '\t', '\x1A', '\x4',
  2473. '\x1B', '\t', '\x1B', '\x4', '\x1C', '\t', '\x1C', '\x4', '\x1D', '\t',
  2474. '\x1D', '\x3', '\x2', '\x6', '\x2', '<', '\n', '\x2', '\r', '\x2', '\xE',
  2475. '\x2', '=', '\x3', '\x2', '\x3', '\x2', '\x3', '\x3', '\x3', '\x3', '\x3',
  2476. '\x3', '\a', '\x3', '\x45', '\n', '\x3', '\f', '\x3', '\xE', '\x3', 'H',
  2477. '\v', '\x3', '\x3', '\x4', '\x3', '\x4', '\x3', '\x4', '\a', '\x4', 'M',
  2478. '\n', '\x4', '\f', '\x4', '\xE', '\x4', 'P', '\v', '\x4', '\x3', '\x5',
  2479. '\x3', '\x5', '\x3', '\x5', '\x3', '\x5', '\x3', '\x6', '\x3', '\x6',
  2480. '\x3', '\x6', '\x3', '\x6', '\x3', '\a', '\x3', '\a', '\x3', '\a', '\x3',
  2481. '\a', '\x3', '\a', '\x3', '\b', '\x3', '\b', '\a', '\b', '\x61', '\n',
  2482. '\b', '\f', '\b', '\xE', '\b', '\x64', '\v', '\b', '\x3', '\b', '\x3',
  2483. '\b', '\x3', '\t', '\x3', '\t', '\x3', '\t', '\x3', '\t', '\x3', '\t',
  2484. '\x3', '\t', '\x3', '\t', '\x5', '\t', 'o', '\n', '\t', '\x3', '\n', '\x6',
  2485. '\n', 'r', '\n', '\n', '\r', '\n', '\xE', '\n', 's', '\x3', '\v', '\x3',
  2486. '\v', '\x3', '\v', '\x5', '\v', 'y', '\n', '\v', '\x3', '\v', '\x5', '\v',
  2487. '|', '\n', '\v', '\x3', '\v', '\x3', '\v', '\a', '\v', '\x80', '\n', '\v',
  2488. '\f', '\v', '\xE', '\v', '\x83', '\v', '\v', '\x3', '\v', '\x5', '\v',
  2489. '\x86', '\n', '\v', '\x3', '\f', '\x3', '\f', '\x3', '\f', '\x3', '\f',
  2490. '\x3', '\r', '\x3', '\r', '\x3', '\xE', '\x3', '\xE', '\a', '\xE', '\x90',
  2491. '\n', '\xE', '\f', '\xE', '\xE', '\xE', '\x93', '\v', '\xE', '\x3', '\xE',
  2492. '\x5', '\xE', '\x96', '\n', '\xE', '\x3', '\xE', '\x3', '\xE', '\x5',
  2493. '\xE', '\x9A', '\n', '\xE', '\x3', '\xF', '\x3', '\xF', '\x3', '\xF',
  2494. '\x3', '\xF', '\a', '\xF', '\xA0', '\n', '\xF', '\f', '\xF', '\xE', '\xF',
  2495. '\xA3', '\v', '\xF', '\x3', '\x10', '\x3', '\x10', '\x3', '\x10', '\x3',
  2496. '\x10', '\a', '\x10', '\xA9', '\n', '\x10', '\f', '\x10', '\xE', '\x10',
  2497. '\xAC', '\v', '\x10', '\x3', '\x11', '\x3', '\x11', '\a', '\x11', '\xB0',
  2498. '\n', '\x11', '\f', '\x11', '\xE', '\x11', '\xB3', '\v', '\x11', '\x3',
  2499. '\x12', '\x3', '\x12', '\x3', '\x12', '\a', '\x12', '\xB8', '\n', '\x12',
  2500. '\f', '\x12', '\xE', '\x12', '\xBB', '\v', '\x12', '\x3', '\x12', '\x3',
  2501. '\x12', '\x3', '\x12', '\x3', '\x12', '\x3', '\x12', '\x3', '\x12', '\x3',
  2502. '\x12', '\x5', '\x12', '\xC4', '\n', '\x12', '\x3', '\x13', '\x3', '\x13',
  2503. '\x3', '\x13', '\x3', '\x13', '\x3', '\x13', '\x3', '\x13', '\x3', '\x13',
  2504. '\x3', '\x13', '\x5', '\x13', '\xCE', '\n', '\x13', '\x3', '\x13', '\x5',
  2505. '\x13', '\xD1', '\n', '\x13', '\x3', '\x14', '\x3', '\x14', '\x3', '\x14',
  2506. '\x5', '\x14', '\xD6', '\n', '\x14', '\x3', '\x14', '\x3', '\x14', '\a',
  2507. '\x14', '\xDA', '\n', '\x14', '\f', '\x14', '\xE', '\x14', '\xDD', '\v',
  2508. '\x14', '\x3', '\x14', '\x3', '\x14', '\x3', '\x15', '\x3', '\x15', '\x3',
  2509. '\x15', '\x3', '\x15', '\a', '\x15', '\xE5', '\n', '\x15', '\f', '\x15',
  2510. '\xE', '\x15', '\xE8', '\v', '\x15', '\x3', '\x15', '\x3', '\x15', '\x3',
  2511. '\x15', '\x3', '\x16', '\x3', '\x16', '\x3', '\x17', '\x3', '\x17', '\x3',
  2512. '\x18', '\x3', '\x18', '\x5', '\x18', '\xF3', '\n', '\x18', '\x3', '\x19',
  2513. '\x6', '\x19', '\xF6', '\n', '\x19', '\r', '\x19', '\xE', '\x19', '\xF7',
  2514. '\x3', '\x1A', '\x3', '\x1A', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B',
  2515. '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B',
  2516. '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B',
  2517. '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B',
  2518. '\x5', '\x1B', '\x10E', '\n', '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3',
  2519. '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3',
  2520. '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3',
  2521. '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\a', '\x1B', '\x11F', '\n', '\x1B',
  2522. '\f', '\x1B', '\xE', '\x1B', '\x122', '\v', '\x1B', '\x3', '\x1C', '\x3',
  2523. '\x1C', '\x3', '\x1C', '\x3', '\x1C', '\x3', '\x1C', '\x3', '\x1C', '\x3',
  2524. '\x1C', '\x5', '\x1C', '\x12B', '\n', '\x1C', '\x3', '\x1D', '\x3', '\x1D',
  2525. '\x3', '\x1D', '\x2', '\x3', '\x34', '\x1E', '\x2', '\x4', '\x6', '\b',
  2526. '\n', '\f', '\xE', '\x10', '\x12', '\x14', '\x16', '\x18', '\x1A', '\x1C',
  2527. '\x1E', ' ', '\"', '$', '&', '(', '*', ',', '.', '\x30', '\x32', '\x34',
  2528. '\x36', '\x38', '\x2', '\n', '\x4', '\x2', '\x14', '\x14', '!', '!', '\x3',
  2529. '\x2', ':', '<', '\x3', '\x2', '\x38', '\x39', '\x3', '\x2', '?', '\x41',
  2530. '\x3', '\x2', '=', '>', '\x4', '\x2', '.', '/', '\x31', '\x32', '\x4',
  2531. '\x2', '\x30', '\x30', '\x33', '\x33', '\x3', '\x2', '\x34', '\x36', '\x2',
  2532. '\x141', '\x2', ';', '\x3', '\x2', '\x2', '\x2', '\x4', '\x41', '\x3',
  2533. '\x2', '\x2', '\x2', '\x6', 'I', '\x3', '\x2', '\x2', '\x2', '\b', 'Q',
  2534. '\x3', '\x2', '\x2', '\x2', '\n', 'U', '\x3', '\x2', '\x2', '\x2', '\f',
  2535. 'Y', '\x3', '\x2', '\x2', '\x2', '\xE', '^', '\x3', '\x2', '\x2', '\x2',
  2536. '\x10', 'n', '\x3', '\x2', '\x2', '\x2', '\x12', 'q', '\x3', '\x2', '\x2',
  2537. '\x2', '\x14', 'u', '\x3', '\x2', '\x2', '\x2', '\x16', '\x87', '\x3',
  2538. '\x2', '\x2', '\x2', '\x18', '\x8B', '\x3', '\x2', '\x2', '\x2', '\x1A',
  2539. '\x8D', '\x3', '\x2', '\x2', '\x2', '\x1C', '\x9B', '\x3', '\x2', '\x2',
  2540. '\x2', '\x1E', '\xA4', '\x3', '\x2', '\x2', '\x2', ' ', '\xAD', '\x3',
  2541. '\x2', '\x2', '\x2', '\"', '\xC3', '\x3', '\x2', '\x2', '\x2', '$', '\xCD',
  2542. '\x3', '\x2', '\x2', '\x2', '&', '\xD2', '\x3', '\x2', '\x2', '\x2', '(',
  2543. '\xE0', '\x3', '\x2', '\x2', '\x2', '*', '\xEC', '\x3', '\x2', '\x2',
  2544. '\x2', ',', '\xEE', '\x3', '\x2', '\x2', '\x2', '.', '\xF0', '\x3', '\x2',
  2545. '\x2', '\x2', '\x30', '\xF5', '\x3', '\x2', '\x2', '\x2', '\x32', '\xF9',
  2546. '\x3', '\x2', '\x2', '\x2', '\x34', '\x10D', '\x3', '\x2', '\x2', '\x2',
  2547. '\x36', '\x12A', '\x3', '\x2', '\x2', '\x2', '\x38', '\x12C', '\x3', '\x2',
  2548. '\x2', '\x2', ':', '<', '\x5', '\x4', '\x3', '\x2', ';', ':', '\x3', '\x2',
  2549. '\x2', '\x2', '<', '=', '\x3', '\x2', '\x2', '\x2', '=', ';', '\x3', '\x2',
  2550. '\x2', '\x2', '=', '>', '\x3', '\x2', '\x2', '\x2', '>', '?', '\x3', '\x2',
  2551. '\x2', '\x2', '?', '@', '\a', '\x2', '\x2', '\x3', '@', '\x3', '\x3',
  2552. '\x2', '\x2', '\x2', '\x41', '\x42', '\x5', '\x6', '\x4', '\x2', '\x42',
  2553. '\x46', '\x5', '\xE', '\b', '\x2', '\x43', '\x45', '\a', '\n', '\x2',
  2554. '\x2', '\x44', '\x43', '\x3', '\x2', '\x2', '\x2', '\x45', 'H', '\x3',
  2555. '\x2', '\x2', '\x2', '\x46', '\x44', '\x3', '\x2', '\x2', '\x2', '\x46',
  2556. 'G', '\x3', '\x2', '\x2', '\x2', 'G', '\x5', '\x3', '\x2', '\x2', '\x2',
  2557. 'H', '\x46', '\x3', '\x2', '\x2', '\x2', 'I', 'N', '\x5', '\b', '\x5',
  2558. '\x2', 'J', 'M', '\x5', '\n', '\x6', '\x2', 'K', 'M', '\x5', '\f', '\a',
  2559. '\x2', 'L', 'J', '\x3', '\x2', '\x2', '\x2', 'L', 'K', '\x3', '\x2', '\x2',
  2560. '\x2', 'M', 'P', '\x3', '\x2', '\x2', '\x2', 'N', 'L', '\x3', '\x2', '\x2',
  2561. '\x2', 'N', 'O', '\x3', '\x2', '\x2', '\x2', 'O', '\a', '\x3', '\x2',
  2562. '\x2', '\x2', 'P', 'N', '\x3', '\x2', '\x2', '\x2', 'Q', 'R', '\a', '\x4',
  2563. '\x2', '\x2', 'R', 'S', '\a', '\r', '\x2', '\x2', 'S', 'T', '\a', '\n',
  2564. '\x2', '\x2', 'T', '\t', '\x3', '\x2', '\x2', '\x2', 'U', 'V', '\a', '\x5',
  2565. '\x2', '\x2', 'V', 'W', '\a', '\xE', '\x2', '\x2', 'W', 'X', '\a', '\n',
  2566. '\x2', '\x2', 'X', '\v', '\x3', '\x2', '\x2', '\x2', 'Y', 'Z', '\a', '\x6',
  2567. '\x2', '\x2', 'Z', '[', '\a', '\a', '\x2', '\x2', '[', '\\', '\a', '\x10',
  2568. '\x2', '\x2', '\\', ']', '\a', '\n', '\x2', '\x2', ']', '\r', '\x3', '\x2',
  2569. '\x2', '\x2', '^', '\x62', '\a', '\x3', '\x2', '\x2', '_', '\x61', '\x5',
  2570. '\x10', '\t', '\x2', '`', '_', '\x3', '\x2', '\x2', '\x2', '\x61', '\x64',
  2571. '\x3', '\x2', '\x2', '\x2', '\x62', '`', '\x3', '\x2', '\x2', '\x2', '\x62',
  2572. '\x63', '\x3', '\x2', '\x2', '\x2', '\x63', '\x65', '\x3', '\x2', '\x2',
  2573. '\x2', '\x64', '\x62', '\x3', '\x2', '\x2', '\x2', '\x65', '\x66', '\a',
  2574. '\x13', '\x2', '\x2', '\x66', '\xF', '\x3', '\x2', '\x2', '\x2', 'g',
  2575. 'o', '\x5', '\x12', '\n', '\x2', 'h', 'o', '\x5', '\x1A', '\xE', '\x2',
  2576. 'i', 'o', '\x5', '\"', '\x12', '\x2', 'j', 'o', '\x5', '$', '\x13', '\x2',
  2577. 'k', 'o', '\x5', '(', '\x15', '\x2', 'l', 'o', '\x5', '*', '\x16', '\x2',
  2578. 'm', 'o', '\x5', '.', '\x18', '\x2', 'n', 'g', '\x3', '\x2', '\x2', '\x2',
  2579. 'n', 'h', '\x3', '\x2', '\x2', '\x2', 'n', 'i', '\x3', '\x2', '\x2', '\x2',
  2580. 'n', 'j', '\x3', '\x2', '\x2', '\x2', 'n', 'k', '\x3', '\x2', '\x2', '\x2',
  2581. 'n', 'l', '\x3', '\x2', '\x2', '\x2', 'n', 'm', '\x3', '\x2', '\x2', '\x2',
  2582. 'o', '\x11', '\x3', '\x2', '\x2', '\x2', 'p', 'r', '\x5', '\x14', '\v',
  2583. '\x2', 'q', 'p', '\x3', '\x2', '\x2', '\x2', 'r', 's', '\x3', '\x2', '\x2',
  2584. '\x2', 's', 'q', '\x3', '\x2', '\x2', '\x2', 's', 't', '\x3', '\x2', '\x2',
  2585. '\x2', 't', '\x13', '\x3', '\x2', '\x2', '\x2', 'u', 'v', '\a', '\x15',
  2586. '\x2', '\x2', 'v', 'x', '\x5', '\x18', '\r', '\x2', 'w', 'y', '\x5', '\x16',
  2587. '\f', '\x2', 'x', 'w', '\x3', '\x2', '\x2', '\x2', 'x', 'y', '\x3', '\x2',
  2588. '\x2', '\x2', 'y', '{', '\x3', '\x2', '\x2', '\x2', 'z', '|', '\x5', '\x30',
  2589. '\x19', '\x2', '{', 'z', '\x3', '\x2', '\x2', '\x2', '{', '|', '\x3',
  2590. '\x2', '\x2', '\x2', '|', '\x85', '\x3', '\x2', '\x2', '\x2', '}', '\x81',
  2591. '\a', '\x16', '\x2', '\x2', '~', '\x80', '\x5', '\x10', '\t', '\x2', '\x7F',
  2592. '~', '\x3', '\x2', '\x2', '\x2', '\x80', '\x83', '\x3', '\x2', '\x2',
  2593. '\x2', '\x81', '\x7F', '\x3', '\x2', '\x2', '\x2', '\x81', '\x82', '\x3',
  2594. '\x2', '\x2', '\x2', '\x82', '\x84', '\x3', '\x2', '\x2', '\x2', '\x83',
  2595. '\x81', '\x3', '\x2', '\x2', '\x2', '\x84', '\x86', '\a', '\x17', '\x2',
  2596. '\x2', '\x85', '}', '\x3', '\x2', '\x2', '\x2', '\x85', '\x86', '\x3',
  2597. '\x2', '\x2', '\x2', '\x86', '\x15', '\x3', '\x2', '\x2', '\x2', '\x87',
  2598. '\x88', '\a', '\x18', '\x2', '\x2', '\x88', '\x89', '\x5', '\x34', '\x1B',
  2599. '\x2', '\x89', '\x8A', '\a', '$', '\x2', '\x2', '\x8A', '\x17', '\x3',
  2600. '\x2', '\x2', '\x2', '\x8B', '\x8C', '\a', '\"', '\x2', '\x2', '\x8C',
  2601. '\x19', '\x3', '\x2', '\x2', '\x2', '\x8D', '\x91', '\x5', '\x1C', '\xF',
  2602. '\x2', '\x8E', '\x90', '\x5', '\x1E', '\x10', '\x2', '\x8F', '\x8E', '\x3',
  2603. '\x2', '\x2', '\x2', '\x90', '\x93', '\x3', '\x2', '\x2', '\x2', '\x91',
  2604. '\x8F', '\x3', '\x2', '\x2', '\x2', '\x91', '\x92', '\x3', '\x2', '\x2',
  2605. '\x2', '\x92', '\x95', '\x3', '\x2', '\x2', '\x2', '\x93', '\x91', '\x3',
  2606. '\x2', '\x2', '\x2', '\x94', '\x96', '\x5', ' ', '\x11', '\x2', '\x95',
  2607. '\x94', '\x3', '\x2', '\x2', '\x2', '\x95', '\x96', '\x3', '\x2', '\x2',
  2608. '\x2', '\x96', '\x97', '\x3', '\x2', '\x2', '\x2', '\x97', '\x99', '\a',
  2609. '\x1B', '\x2', '\x2', '\x98', '\x9A', '\x5', '\x30', '\x19', '\x2', '\x99',
  2610. '\x98', '\x3', '\x2', '\x2', '\x2', '\x99', '\x9A', '\x3', '\x2', '\x2',
  2611. '\x2', '\x9A', '\x1B', '\x3', '\x2', '\x2', '\x2', '\x9B', '\x9C', '\a',
  2612. '\x18', '\x2', '\x2', '\x9C', '\x9D', '\x5', '\x34', '\x1B', '\x2', '\x9D',
  2613. '\xA1', '\a', '$', '\x2', '\x2', '\x9E', '\xA0', '\x5', '\x10', '\t',
  2614. '\x2', '\x9F', '\x9E', '\x3', '\x2', '\x2', '\x2', '\xA0', '\xA3', '\x3',
  2615. '\x2', '\x2', '\x2', '\xA1', '\x9F', '\x3', '\x2', '\x2', '\x2', '\xA1',
  2616. '\xA2', '\x3', '\x2', '\x2', '\x2', '\xA2', '\x1D', '\x3', '\x2', '\x2',
  2617. '\x2', '\xA3', '\xA1', '\x3', '\x2', '\x2', '\x2', '\xA4', '\xA5', '\a',
  2618. '\x1A', '\x2', '\x2', '\xA5', '\xA6', '\x5', '\x34', '\x1B', '\x2', '\xA6',
  2619. '\xAA', '\a', '$', '\x2', '\x2', '\xA7', '\xA9', '\x5', '\x10', '\t',
  2620. '\x2', '\xA8', '\xA7', '\x3', '\x2', '\x2', '\x2', '\xA9', '\xAC', '\x3',
  2621. '\x2', '\x2', '\x2', '\xAA', '\xA8', '\x3', '\x2', '\x2', '\x2', '\xAA',
  2622. '\xAB', '\x3', '\x2', '\x2', '\x2', '\xAB', '\x1F', '\x3', '\x2', '\x2',
  2623. '\x2', '\xAC', '\xAA', '\x3', '\x2', '\x2', '\x2', '\xAD', '\xB1', '\a',
  2624. '\x19', '\x2', '\x2', '\xAE', '\xB0', '\x5', '\x10', '\t', '\x2', '\xAF',
  2625. '\xAE', '\x3', '\x2', '\x2', '\x2', '\xB0', '\xB3', '\x3', '\x2', '\x2',
  2626. '\x2', '\xB1', '\xAF', '\x3', '\x2', '\x2', '\x2', '\xB1', '\xB2', '\x3',
  2627. '\x2', '\x2', '\x2', '\xB2', '!', '\x3', '\x2', '\x2', '\x2', '\xB3',
  2628. '\xB1', '\x3', '\x2', '\x2', '\x2', '\xB4', '\xB5', '\a', '\x1C', '\x2',
  2629. '\x2', '\xB5', '\xB9', '\x5', '\x38', '\x1D', '\x2', '\xB6', '\xB8', '\a',
  2630. '-', '\x2', '\x2', '\xB7', '\xB6', '\x3', '\x2', '\x2', '\x2', '\xB8',
  2631. '\xBB', '\x3', '\x2', '\x2', '\x2', '\xB9', '\xB7', '\x3', '\x2', '\x2',
  2632. '\x2', '\xB9', '\xBA', '\x3', '\x2', '\x2', '\x2', '\xBA', '\xBC', '\x3',
  2633. '\x2', '\x2', '\x2', '\xBB', '\xB9', '\x3', '\x2', '\x2', '\x2', '\xBC',
  2634. '\xBD', '\x5', '\x34', '\x1B', '\x2', '\xBD', '\xBE', '\a', '$', '\x2',
  2635. '\x2', '\xBE', '\xC4', '\x3', '\x2', '\x2', '\x2', '\xBF', '\xC0', '\a',
  2636. '\x1C', '\x2', '\x2', '\xC0', '\xC1', '\x5', '\x34', '\x1B', '\x2', '\xC1',
  2637. '\xC2', '\a', '$', '\x2', '\x2', '\xC2', '\xC4', '\x3', '\x2', '\x2',
  2638. '\x2', '\xC3', '\xB4', '\x3', '\x2', '\x2', '\x2', '\xC3', '\xBF', '\x3',
  2639. '\x2', '\x2', '\x2', '\xC4', '#', '\x3', '\x2', '\x2', '\x2', '\xC5',
  2640. '\xC6', '\a', '\x1F', '\x2', '\x2', '\xC6', '\xC7', '\a', 'K', '\x2',
  2641. '\x2', '\xC7', '\xC8', '\a', 'J', '\x2', '\x2', '\xC8', '\xC9', '\a',
  2642. 'M', '\x2', '\x2', '\xC9', '\xCE', '\a', 'L', '\x2', '\x2', '\xCA', '\xCB',
  2643. '\a', '\x1F', '\x2', '\x2', '\xCB', '\xCC', '\a', 'K', '\x2', '\x2', '\xCC',
  2644. '\xCE', '\a', 'L', '\x2', '\x2', '\xCD', '\xC5', '\x3', '\x2', '\x2',
  2645. '\x2', '\xCD', '\xCA', '\x3', '\x2', '\x2', '\x2', '\xCE', '\xD0', '\x3',
  2646. '\x2', '\x2', '\x2', '\xCF', '\xD1', '\x5', '\x30', '\x19', '\x2', '\xD0',
  2647. '\xCF', '\x3', '\x2', '\x2', '\x2', '\xD0', '\xD1', '\x3', '\x2', '\x2',
  2648. '\x2', '\xD1', '%', '\x3', '\x2', '\x2', '\x2', '\xD2', '\xD3', '\a',
  2649. 'G', '\x2', '\x2', '\xD3', '\xD5', '\a', '\x42', '\x2', '\x2', '\xD4',
  2650. '\xD6', '\x5', '\x34', '\x1B', '\x2', '\xD5', '\xD4', '\x3', '\x2', '\x2',
  2651. '\x2', '\xD5', '\xD6', '\x3', '\x2', '\x2', '\x2', '\xD6', '\xDB', '\x3',
  2652. '\x2', '\x2', '\x2', '\xD7', '\xD8', '\a', '\x44', '\x2', '\x2', '\xD8',
  2653. '\xDA', '\x5', '\x34', '\x1B', '\x2', '\xD9', '\xD7', '\x3', '\x2', '\x2',
  2654. '\x2', '\xDA', '\xDD', '\x3', '\x2', '\x2', '\x2', '\xDB', '\xD9', '\x3',
  2655. '\x2', '\x2', '\x2', '\xDB', '\xDC', '\x3', '\x2', '\x2', '\x2', '\xDC',
  2656. '\xDE', '\x3', '\x2', '\x2', '\x2', '\xDD', '\xDB', '\x3', '\x2', '\x2',
  2657. '\x2', '\xDE', '\xDF', '\a', '\x43', '\x2', '\x2', '\xDF', '\'', '\x3',
  2658. '\x2', '\x2', '\x2', '\xE0', '\xE1', '\a', '\x1D', '\x2', '\x2', '\xE1',
  2659. '\xE6', '\x5', '\x34', '\x1B', '\x2', '\xE2', '\xE3', '\a', '\x44', '\x2',
  2660. '\x2', '\xE3', '\xE5', '\x5', '\x34', '\x1B', '\x2', '\xE4', '\xE2', '\x3',
  2661. '\x2', '\x2', '\x2', '\xE5', '\xE8', '\x3', '\x2', '\x2', '\x2', '\xE6',
  2662. '\xE4', '\x3', '\x2', '\x2', '\x2', '\xE6', '\xE7', '\x3', '\x2', '\x2',
  2663. '\x2', '\xE7', '\xE9', '\x3', '\x2', '\x2', '\x2', '\xE8', '\xE6', '\x3',
  2664. '\x2', '\x2', '\x2', '\xE9', '\xEA', '\a', '\x43', '\x2', '\x2', '\xEA',
  2665. '\xEB', '\a', '$', '\x2', '\x2', '\xEB', ')', '\x3', '\x2', '\x2', '\x2',
  2666. '\xEC', '\xED', '\a', 'I', '\x2', '\x2', '\xED', '+', '\x3', '\x2', '\x2',
  2667. '\x2', '\xEE', '\xEF', '\t', '\x2', '\x2', '\x2', '\xEF', '-', '\x3',
  2668. '\x2', '\x2', '\x2', '\xF0', '\xF2', '\x5', ',', '\x17', '\x2', '\xF1',
  2669. '\xF3', '\x5', '\x30', '\x19', '\x2', '\xF2', '\xF1', '\x3', '\x2', '\x2',
  2670. '\x2', '\xF2', '\xF3', '\x3', '\x2', '\x2', '\x2', '\xF3', '/', '\x3',
  2671. '\x2', '\x2', '\x2', '\xF4', '\xF6', '\x5', '\x32', '\x1A', '\x2', '\xF5',
  2672. '\xF4', '\x3', '\x2', '\x2', '\x2', '\xF6', '\xF7', '\x3', '\x2', '\x2',
  2673. '\x2', '\xF7', '\xF5', '\x3', '\x2', '\x2', '\x2', '\xF7', '\xF8', '\x3',
  2674. '\x2', '\x2', '\x2', '\xF8', '\x31', '\x3', '\x2', '\x2', '\x2', '\xF9',
  2675. '\xFA', '\a', ' ', '\x2', '\x2', '\xFA', '\x33', '\x3', '\x2', '\x2',
  2676. '\x2', '\xFB', '\xFC', '\b', '\x1B', '\x1', '\x2', '\xFC', '\xFD', '\a',
  2677. '\x42', '\x2', '\x2', '\xFD', '\xFE', '\x5', '\x34', '\x1B', '\x2', '\xFE',
  2678. '\xFF', '\a', '\x43', '\x2', '\x2', '\xFF', '\x10E', '\x3', '\x2', '\x2',
  2679. '\x2', '\x100', '\x101', '\a', '>', '\x2', '\x2', '\x101', '\x10E', '\x5',
  2680. '\x34', '\x1B', '\f', '\x102', '\x103', '\a', '\x37', '\x2', '\x2', '\x103',
  2681. '\x10E', '\x5', '\x34', '\x1B', '\v', '\x104', '\x105', '\x5', '\x38',
  2682. '\x1D', '\x2', '\x105', '\x106', '\t', '\x3', '\x2', '\x2', '\x106', '\x107',
  2683. '\x5', '\x34', '\x1B', '\x6', '\x107', '\x10E', '\x3', '\x2', '\x2', '\x2',
  2684. '\x108', '\x109', '\x5', '\x38', '\x1D', '\x2', '\x109', '\x10A', '\t',
  2685. '\x4', '\x2', '\x2', '\x10A', '\x10B', '\x5', '\x34', '\x1B', '\x5', '\x10B',
  2686. '\x10E', '\x3', '\x2', '\x2', '\x2', '\x10C', '\x10E', '\x5', '\x36',
  2687. '\x1C', '\x2', '\x10D', '\xFB', '\x3', '\x2', '\x2', '\x2', '\x10D', '\x100',
  2688. '\x3', '\x2', '\x2', '\x2', '\x10D', '\x102', '\x3', '\x2', '\x2', '\x2',
  2689. '\x10D', '\x104', '\x3', '\x2', '\x2', '\x2', '\x10D', '\x108', '\x3',
  2690. '\x2', '\x2', '\x2', '\x10D', '\x10C', '\x3', '\x2', '\x2', '\x2', '\x10E',
  2691. '\x120', '\x3', '\x2', '\x2', '\x2', '\x10F', '\x110', '\f', '\n', '\x2',
  2692. '\x2', '\x110', '\x111', '\t', '\x5', '\x2', '\x2', '\x111', '\x11F',
  2693. '\x5', '\x34', '\x1B', '\v', '\x112', '\x113', '\f', '\t', '\x2', '\x2',
  2694. '\x113', '\x114', '\t', '\x6', '\x2', '\x2', '\x114', '\x11F', '\x5',
  2695. '\x34', '\x1B', '\n', '\x115', '\x116', '\f', '\b', '\x2', '\x2', '\x116',
  2696. '\x117', '\t', '\a', '\x2', '\x2', '\x117', '\x11F', '\x5', '\x34', '\x1B',
  2697. '\t', '\x118', '\x119', '\f', '\a', '\x2', '\x2', '\x119', '\x11A', '\t',
  2698. '\b', '\x2', '\x2', '\x11A', '\x11F', '\x5', '\x34', '\x1B', '\b', '\x11B',
  2699. '\x11C', '\f', '\x4', '\x2', '\x2', '\x11C', '\x11D', '\t', '\t', '\x2',
  2700. '\x2', '\x11D', '\x11F', '\x5', '\x34', '\x1B', '\x5', '\x11E', '\x10F',
  2701. '\x3', '\x2', '\x2', '\x2', '\x11E', '\x112', '\x3', '\x2', '\x2', '\x2',
  2702. '\x11E', '\x115', '\x3', '\x2', '\x2', '\x2', '\x11E', '\x118', '\x3',
  2703. '\x2', '\x2', '\x2', '\x11E', '\x11B', '\x3', '\x2', '\x2', '\x2', '\x11F',
  2704. '\x122', '\x3', '\x2', '\x2', '\x2', '\x120', '\x11E', '\x3', '\x2', '\x2',
  2705. '\x2', '\x120', '\x121', '\x3', '\x2', '\x2', '\x2', '\x121', '\x35',
  2706. '\x3', '\x2', '\x2', '\x2', '\x122', '\x120', '\x3', '\x2', '\x2', '\x2',
  2707. '\x123', '\x12B', '\a', '\x46', '\x2', '\x2', '\x124', '\x12B', '\a',
  2708. '*', '\x2', '\x2', '\x125', '\x12B', '\a', '+', '\x2', '\x2', '\x126',
  2709. '\x12B', '\x5', '\x38', '\x1D', '\x2', '\x127', '\x12B', '\a', '%', '\x2',
  2710. '\x2', '\x128', '\x12B', '\x5', '&', '\x14', '\x2', '\x129', '\x12B',
  2711. '\a', ',', '\x2', '\x2', '\x12A', '\x123', '\x3', '\x2', '\x2', '\x2',
  2712. '\x12A', '\x124', '\x3', '\x2', '\x2', '\x2', '\x12A', '\x125', '\x3',
  2713. '\x2', '\x2', '\x2', '\x12A', '\x126', '\x3', '\x2', '\x2', '\x2', '\x12A',
  2714. '\x127', '\x3', '\x2', '\x2', '\x2', '\x12A', '\x128', '\x3', '\x2', '\x2',
  2715. '\x2', '\x12A', '\x129', '\x3', '\x2', '\x2', '\x2', '\x12B', '\x37',
  2716. '\x3', '\x2', '\x2', '\x2', '\x12C', '\x12D', '\a', '\x45', '\x2', '\x2',
  2717. '\x12D', '\x39', '\x3', '\x2', '\x2', '\x2', ' ', '=', '\x46', 'L', 'N',
  2718. '\x62', 'n', 's', 'x', '{', '\x81', '\x85', '\x91', '\x95', '\x99', '\xA1',
  2719. '\xAA', '\xB1', '\xB9', '\xC3', '\xCD', '\xD0', '\xD5', '\xDB', '\xE6',
  2720. '\xF2', '\xF7', '\x10D', '\x11E', '\x120', '\x12A',
  2721. };
  2722. public static readonly ATN _ATN =
  2723. new ATNDeserializer().Deserialize(_serializedATN);
  2724. }