PauliOperatorParser.h 6.07 KB
Newer Older
1

2
// Generated from PauliOperator.g4 by ANTLR 4.8
3
4
5
6
7
8
9
10
11
12
13
14
15
16

#pragma once


#include "antlr4-runtime.h"


namespace pauli {


class  PauliOperatorParser : public antlr4::Parser {
public:
  enum {
    T__0 = 1, T__1 = 2, T__2 = 3, T__3 = 4, T__4 = 5, T__5 = 6, T__6 = 7, 
17
18
    T__7 = 8, T__8 = 9, T__9 = 10, T__10 = 11, COMMENT = 12, REAL = 13, 
    INT = 14, WS = 15, EOL = 16
19
20
21
22
  };

  enum {
    RulePauliSrc = 0, RulePlusorminus = 1, RuleTerm = 2, RulePauli = 3, 
23
    RuleCoeff = 4, RuleComplex = 5, RuleReal = 6, RuleComment = 7, RuleScientific = 8
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
  };

  PauliOperatorParser(antlr4::TokenStream *input);
  ~PauliOperatorParser();

  virtual std::string getGrammarFileName() const override;
  virtual const antlr4::atn::ATN& getATN() const override { return _atn; };
  virtual const std::vector<std::string>& getTokenNames() const override { return _tokenNames; }; // deprecated: use vocabulary instead.
  virtual const std::vector<std::string>& getRuleNames() const override;
  virtual antlr4::dfa::Vocabulary& getVocabulary() const override;


  class PauliSrcContext;
  class PlusorminusContext;
  class TermContext;
  class PauliContext;
  class CoeffContext;
  class ComplexContext;
  class RealContext;
43
44
  class CommentContext;
  class ScientificContext; 
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123

  class  PauliSrcContext : public antlr4::ParserRuleContext {
  public:
    PauliSrcContext(antlr4::ParserRuleContext *parent, size_t invokingState);
    virtual size_t getRuleIndex() const override;
    std::vector<TermContext *> term();
    TermContext* term(size_t i);
    std::vector<PlusorminusContext *> plusorminus();
    PlusorminusContext* plusorminus(size_t i);

    virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override;
    virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override;
   
  };

  PauliSrcContext* pauliSrc();

  class  PlusorminusContext : public antlr4::ParserRuleContext {
  public:
    PlusorminusContext(antlr4::ParserRuleContext *parent, size_t invokingState);
    virtual size_t getRuleIndex() const override;

    virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override;
    virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override;
   
  };

  PlusorminusContext* plusorminus();

  class  TermContext : public antlr4::ParserRuleContext {
  public:
    TermContext(antlr4::ParserRuleContext *parent, size_t invokingState);
    virtual size_t getRuleIndex() const override;
    CoeffContext *coeff();
    std::vector<PauliContext *> pauli();
    PauliContext* pauli(size_t i);

    virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override;
    virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override;
   
  };

  TermContext* term();

  class  PauliContext : public antlr4::ParserRuleContext {
  public:
    PauliContext(antlr4::ParserRuleContext *parent, size_t invokingState);
    virtual size_t getRuleIndex() const override;
    antlr4::tree::TerminalNode *INT();

    virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override;
    virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override;
   
  };

  PauliContext* pauli();

  class  CoeffContext : public antlr4::ParserRuleContext {
  public:
    CoeffContext(antlr4::ParserRuleContext *parent, size_t invokingState);
    virtual size_t getRuleIndex() const override;
    ComplexContext *complex();
    RealContext *real();

    virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override;
    virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override;
   
  };

  CoeffContext* coeff();

  class  ComplexContext : public antlr4::ParserRuleContext {
  public:
    ComplexContext(antlr4::ParserRuleContext *parent, size_t invokingState);
    virtual size_t getRuleIndex() const override;
    std::vector<RealContext *> real();
    RealContext* real(size_t i);
    std::vector<antlr4::tree::TerminalNode *> INT();
    antlr4::tree::TerminalNode* INT(size_t i);
124
125
    std::vector<ScientificContext *> scientific();
    ScientificContext* scientific(size_t i);
126
127
128
129
130
131
132
133
134
135
136
137
138

    virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override;
    virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override;
   
  };

  ComplexContext* complex();

  class  RealContext : public antlr4::ParserRuleContext {
  public:
    RealContext(antlr4::ParserRuleContext *parent, size_t invokingState);
    virtual size_t getRuleIndex() const override;
    antlr4::tree::TerminalNode *REAL();
139
    ScientificContext *scientific();
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

    virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override;
    virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override;
   
  };

  RealContext* real();

  class  CommentContext : public antlr4::ParserRuleContext {
  public:
    CommentContext(antlr4::ParserRuleContext *parent, size_t invokingState);
    virtual size_t getRuleIndex() const override;
    antlr4::tree::TerminalNode *COMMENT();

    virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override;
    virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override;
   
  };

  CommentContext* comment();

161
162
163
164
165
166
167
168
169
170
171
172
173
174
  class  ScientificContext : public antlr4::ParserRuleContext {
  public:
    ScientificContext(antlr4::ParserRuleContext *parent, size_t invokingState);
    virtual size_t getRuleIndex() const override;
    antlr4::tree::TerminalNode *INT();
    antlr4::tree::TerminalNode *REAL();

    virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override;
    virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override;
   
  };

  ScientificContext* scientific();

175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195

private:
  static std::vector<antlr4::dfa::DFA> _decisionToDFA;
  static antlr4::atn::PredictionContextCache _sharedContextCache;
  static std::vector<std::string> _ruleNames;
  static std::vector<std::string> _tokenNames;

  static std::vector<std::string> _literalNames;
  static std::vector<std::string> _symbolicNames;
  static antlr4::dfa::Vocabulary _vocabulary;
  static antlr4::atn::ATN _atn;
  static std::vector<uint16_t> _serializedATN;


  struct Initializer {
    Initializer();
  };
  static Initializer _init;
};

}  // namespace pauli