add antlr
This commit is contained in:
87
lib/generated/bfParser.h
Normal file
87
lib/generated/bfParser.h
Normal file
@@ -0,0 +1,87 @@
|
||||
|
||||
// Generated from /home/atreya/Documents/Projects/Miscellaneous/bfc/grammar/bf.g4 by ANTLR 4.8
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "antlr4-runtime.h"
|
||||
|
||||
|
||||
|
||||
|
||||
class bfParser : public antlr4::Parser {
|
||||
public:
|
||||
enum {
|
||||
COMMENT = 1, INPUT = 2, OUTPUT = 3, DEC = 4, INC = 5, LEFT = 6, RIGHT = 7
|
||||
};
|
||||
|
||||
enum {
|
||||
RuleProgram = 0, RuleStatements = 1
|
||||
};
|
||||
|
||||
bfParser(antlr4::TokenStream *input);
|
||||
~bfParser();
|
||||
|
||||
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 ProgramContext;
|
||||
class StatementsContext;
|
||||
|
||||
class ProgramContext : public antlr4::ParserRuleContext {
|
||||
public:
|
||||
ProgramContext(antlr4::ParserRuleContext *parent, size_t invokingState);
|
||||
virtual size_t getRuleIndex() const override;
|
||||
StatementsContext *statements();
|
||||
|
||||
virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override;
|
||||
virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override;
|
||||
|
||||
virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override;
|
||||
|
||||
};
|
||||
|
||||
ProgramContext* program();
|
||||
|
||||
class StatementsContext : public antlr4::ParserRuleContext {
|
||||
public:
|
||||
StatementsContext(antlr4::ParserRuleContext *parent, size_t invokingState);
|
||||
virtual size_t getRuleIndex() const override;
|
||||
antlr4::tree::TerminalNode *INC();
|
||||
antlr4::tree::TerminalNode *DEC();
|
||||
antlr4::tree::TerminalNode *INPUT();
|
||||
antlr4::tree::TerminalNode *OUTPUT();
|
||||
|
||||
virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override;
|
||||
virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override;
|
||||
|
||||
virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override;
|
||||
|
||||
};
|
||||
|
||||
StatementsContext* statements();
|
||||
|
||||
|
||||
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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user