EmbASP-CSharp
PDDLGrammarParser.cs
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 
11 // Generated from PDDLGrammar.g4 by ANTLR 4.7
12 
13 // Unreachable code detected
14 #pragma warning disable 0162
15 // The variable '...' is assigned but its value is never used
16 #pragma warning disable 0219
17 // Missing XML comment for publicly visible type or member '...'
18 #pragma warning disable 1591
19 // Ambiguous reference in cref attribute
20 #pragma warning disable 419
21 
22 using System;
23 using System.IO;
24 using System.Text;
25 using System.Diagnostics;
26 using System.Collections.Generic;
27 using Antlr4.Runtime;
28 using Antlr4.Runtime.Atn;
29 using Antlr4.Runtime.Misc;
30 using Antlr4.Runtime.Tree;
31 using DFA = Antlr4.Runtime.Dfa.DFA;
32 
33 [System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.7")]
34 [System.CLSCompliant(false)]
35 public partial class PDDLGrammarParser : Parser {
36  protected static DFA[] decisionToDFA;
37  protected static PredictionContextCache sharedContextCache = new PredictionContextCache();
38  public const int
39  T__0=1, T__1=2, IDENTIFIER=3, SEPARATOR=4;
40  public const int
41  RULE_atom = 0, RULE_output = 1;
42  public static readonly string[] ruleNames = {
43  "atom", "output"
44  };
45 
46  private static readonly string[] _LiteralNames = {
47  null, "'('", "')'"
48  };
49  private static readonly string[] _SymbolicNames = {
50  null, null, null, "IDENTIFIER", "SEPARATOR"
51  };
52  public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames);
53 
54  [NotNull]
55  public override IVocabulary Vocabulary
56  {
57  get
58  {
59  return DefaultVocabulary;
60  }
61  }
62 
63  public override string GrammarFileName { get { return "PDDLGrammar.g4"; } }
64 
65  public override string[] RuleNames { get { return ruleNames; } }
66 
67  public override string SerializedAtn { get { return new string(_serializedATN); } }
68 
69  static PDDLGrammarParser() {
70  decisionToDFA = new DFA[_ATN.NumberOfDecisions];
71  for (int i = 0; i < _ATN.NumberOfDecisions; i++) {
72  decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i);
73  }
74  }
75 
76  public PDDLGrammarParser(ITokenStream input) : this(input, Console.Out, Console.Error) { }
77 
78  public PDDLGrammarParser(ITokenStream input, TextWriter output, TextWriter errorOutput)
79  : base(input, output, errorOutput)
80  {
81  Interpreter = new ParserATNSimulator(this, _ATN, decisionToDFA, sharedContextCache);
82  }
83  public partial class AtomContext : ParserRuleContext {
84  public ITerminalNode[] IDENTIFIER() { return GetTokens(PDDLGrammarParser.IDENTIFIER); }
85  public ITerminalNode IDENTIFIER(int i) {
86  return GetToken(PDDLGrammarParser.IDENTIFIER, i);
87  }
88  public AtomContext(ParserRuleContext parent, int invokingState)
89  : base(parent, invokingState)
90  {
91  }
92  public override int RuleIndex { get { return RULE_atom; } }
93  public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
95  if (typedVisitor != null) return typedVisitor.VisitAtom(this);
96  else return visitor.VisitChildren(this);
97  }
98  }
99 
100  [RuleVersion(0)]
101  public AtomContext atom() {
102  AtomContext _localctx = new AtomContext(Context, State);
103  EnterRule(_localctx, 0, RULE_atom);
104  int _la;
105  try {
106  EnterOuterAlt(_localctx, 1);
107  {
108  State = 4; Match(T__0);
109  State = 8;
110  ErrorHandler.Sync(this);
111  _la = TokenStream.LA(1);
112  while (_la==IDENTIFIER) {
113  {
114  {
115  State = 5; Match(IDENTIFIER);
116  }
117  }
118  State = 10;
119  ErrorHandler.Sync(this);
120  _la = TokenStream.LA(1);
121  }
122  State = 11; Match(T__1);
123  }
124  }
125  catch (RecognitionException re) {
126  _localctx.exception = re;
127  ErrorHandler.ReportError(this, re);
128  ErrorHandler.Recover(this, re);
129  }
130  finally {
131  ExitRule();
132  }
133  return _localctx;
134  }
135 
136  public partial class OutputContext : ParserRuleContext {
137  public AtomContext[] atom() {
138  return GetRuleContexts<AtomContext>();
139  }
140  public AtomContext atom(int i) {
141  return GetRuleContext<AtomContext>(i);
142  }
143  public OutputContext(ParserRuleContext parent, int invokingState)
144  : base(parent, invokingState)
145  {
146  }
147  public override int RuleIndex { get { return RULE_output; } }
148  public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
150  if (typedVisitor != null) return typedVisitor.VisitOutput(this);
151  else return visitor.VisitChildren(this);
152  }
153  }
154 
155  [RuleVersion(0)]
156  public OutputContext output() {
157  OutputContext _localctx = new OutputContext(Context, State);
158  EnterRule(_localctx, 2, RULE_output);
159  int _la;
160  try {
161  EnterOuterAlt(_localctx, 1);
162  {
163  State = 16;
164  ErrorHandler.Sync(this);
165  _la = TokenStream.LA(1);
166  while (_la==T__0) {
167  {
168  {
169  State = 13; atom();
170  }
171  }
172  State = 18;
173  ErrorHandler.Sync(this);
174  _la = TokenStream.LA(1);
175  }
176  }
177  }
178  catch (RecognitionException re) {
179  _localctx.exception = re;
180  ErrorHandler.ReportError(this, re);
181  ErrorHandler.Recover(this, re);
182  }
183  finally {
184  ExitRule();
185  }
186  return _localctx;
187  }
188 
189  private static char[] _serializedATN = {
190  '\x3', '\x608B', '\xA72A', '\x8133', '\xB9ED', '\x417C', '\x3BE7', '\x7786',
191  '\x5964', '\x3', '\x6', '\x16', '\x4', '\x2', '\t', '\x2', '\x4', '\x3',
192  '\t', '\x3', '\x3', '\x2', '\x3', '\x2', '\a', '\x2', '\t', '\n', '\x2',
193  '\f', '\x2', '\xE', '\x2', '\f', '\v', '\x2', '\x3', '\x2', '\x3', '\x2',
194  '\x3', '\x3', '\a', '\x3', '\x11', '\n', '\x3', '\f', '\x3', '\xE', '\x3',
195  '\x14', '\v', '\x3', '\x3', '\x3', '\x2', '\x2', '\x4', '\x2', '\x4',
196  '\x2', '\x2', '\x2', '\x15', '\x2', '\x6', '\x3', '\x2', '\x2', '\x2',
197  '\x4', '\x12', '\x3', '\x2', '\x2', '\x2', '\x6', '\n', '\a', '\x3', '\x2',
198  '\x2', '\a', '\t', '\a', '\x5', '\x2', '\x2', '\b', '\a', '\x3', '\x2',
199  '\x2', '\x2', '\t', '\f', '\x3', '\x2', '\x2', '\x2', '\n', '\b', '\x3',
200  '\x2', '\x2', '\x2', '\n', '\v', '\x3', '\x2', '\x2', '\x2', '\v', '\r',
201  '\x3', '\x2', '\x2', '\x2', '\f', '\n', '\x3', '\x2', '\x2', '\x2', '\r',
202  '\xE', '\a', '\x4', '\x2', '\x2', '\xE', '\x3', '\x3', '\x2', '\x2', '\x2',
203  '\xF', '\x11', '\x5', '\x2', '\x2', '\x2', '\x10', '\xF', '\x3', '\x2',
204  '\x2', '\x2', '\x11', '\x14', '\x3', '\x2', '\x2', '\x2', '\x12', '\x10',
205  '\x3', '\x2', '\x2', '\x2', '\x12', '\x13', '\x3', '\x2', '\x2', '\x2',
206  '\x13', '\x5', '\x3', '\x2', '\x2', '\x2', '\x14', '\x12', '\x3', '\x2',
207  '\x2', '\x2', '\x4', '\n', '\x12',
208  };
209 
210  public static readonly ATN _ATN =
211  new ATNDeserializer().Deserialize(_serializedATN);
212 
213 
214 }
PDDLGrammarParser.OutputContext
Definition: PDDLGrammarParser.cs:136
PDDLGrammarParser
Definition: PDDLGrammarParser.cs:35
base
Definition: Callback.cs:1
PDDLGrammarParser.AtomContext
Definition: PDDLGrammarParser.cs:83
IPDDLGrammarVisitor.VisitAtom
Result VisitAtom([NotNull] PDDLGrammarParser.AtomContext context)
Visit a parse tree produced by PDDLGrammarParser.atom.
IPDDLGrammarVisitor.VisitOutput
Result VisitOutput([NotNull] PDDLGrammarParser.OutputContext context)
Visit a parse tree produced by PDDLGrammarParser.output.
IPDDLGrammarVisitor
This interface defines a complete generic visitor for a parse tree produced by PDDLGrammarParser.
Definition: PDDLGrammarVisitor.cs:33