From 3e3d9eda9d1dd8c67c1c27c6a9bdc68bdecfcc30 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 17 Dec 2020 20:50:19 +0900 Subject: Renaming of files in preparation for code style tools. Signed-off-by: Michele Calgaro --- languages/pascal/Makefile.am | 4 +- languages/pascal/PascalAST.h | 51 +++ languages/pascal/PascalAST.hpp | 51 --- languages/pascal/PascalLexer.cpp | 16 +- languages/pascal/PascalLexer.h | 121 +++++++ languages/pascal/PascalLexer.hpp | 121 ------- languages/pascal/PascalParser.cpp | 8 +- languages/pascal/PascalParser.h | 422 +++++++++++++++++++++++ languages/pascal/PascalParser.hpp | 422 ----------------------- languages/pascal/PascalStoreWalker.cpp | 14 +- languages/pascal/PascalStoreWalker.h | 172 +++++++++ languages/pascal/PascalStoreWalker.hpp | 172 --------- languages/pascal/PascalStoreWalkerTokenTypes.h | 206 +++++++++++ languages/pascal/PascalStoreWalkerTokenTypes.hpp | 206 ----------- languages/pascal/PascalTokenTypes.h | 209 +++++++++++ languages/pascal/PascalTokenTypes.hpp | 209 ----------- languages/pascal/backgroundparser.cpp | 8 +- languages/pascal/pascal.g | 2 +- languages/pascal/pascal.tree.g | 2 +- languages/pascal/pascalsupport_part.cpp | 8 +- 20 files changed, 1212 insertions(+), 1212 deletions(-) create mode 100644 languages/pascal/PascalAST.h delete mode 100644 languages/pascal/PascalAST.hpp create mode 100644 languages/pascal/PascalLexer.h delete mode 100644 languages/pascal/PascalLexer.hpp create mode 100644 languages/pascal/PascalParser.h delete mode 100644 languages/pascal/PascalParser.hpp create mode 100644 languages/pascal/PascalStoreWalker.h delete mode 100644 languages/pascal/PascalStoreWalker.hpp create mode 100644 languages/pascal/PascalStoreWalkerTokenTypes.h delete mode 100644 languages/pascal/PascalStoreWalkerTokenTypes.hpp create mode 100644 languages/pascal/PascalTokenTypes.h delete mode 100644 languages/pascal/PascalTokenTypes.hpp (limited to 'languages/pascal') diff --git a/languages/pascal/Makefile.am b/languages/pascal/Makefile.am index 9d168734..5d4b3513 100644 --- a/languages/pascal/Makefile.am +++ b/languages/pascal/Makefile.am @@ -23,10 +23,10 @@ genparser: antlr pascal.g && antlr pascal.tree.g ## The following rules assume that you have Java and ANTLR installed, -#PascalLexer.hpp PascalLexer.cpp PascalParser.hpp PascalParser.cpp: pascal.g +#PascalLexer.h PascalLexer.cpp PascalParser.h PascalParser.cpp: pascal.g # antlr pascal.g -#PascalStoreWalker.hpp PascalStoreWalker.cpp: pascal.tree.g +#PascalStoreWalker.h PascalStoreWalker.cpp: pascal.tree.g # antlr pascal.tree.g templatedir = ${kde_datadir}/kdevabbrev/templates diff --git a/languages/pascal/PascalAST.h b/languages/pascal/PascalAST.h new file mode 100644 index 00000000..1e3df014 --- /dev/null +++ b/languages/pascal/PascalAST.h @@ -0,0 +1,51 @@ +#ifndef PASCALAST_HPP +#define PASCALAST_HPP + +#include + +class PascalAST; +typedef antlr::ASTRefCount RefPascalAST; + +class PascalAST : public antlr::CommonAST { +public: + PascalAST() + : m_line(0), m_column(0) {} + + ~PascalAST() {} + + int getLine() const { return m_line; } + void setLine( int line ) { m_line = line; } + + int getColumn() const { return m_column; } + void setColumn( int column ) { m_column = column; } + + void initialize( antlr::RefToken t ) { + antlr::CommonAST::initialize(t); + m_line = t->getLine() - 1; + m_column = t->getColumn() - 1; + } + + void initialize(int t,const ANTLR_USE_NAMESPACE(std)string& txt) { + setType(t); + setText(txt); + m_line = 0; + m_column = 0; + } + + void addChild( RefPascalAST c ) { + antlr::RefAST n( c.get() ); + antlr::BaseAST::addChild( n ); + } + + static antlr::RefAST factory( void ) { + RefPascalAST n(new PascalAST); + return n.get(); + } + +private: + int m_line; + int m_column; +}; + + +#endif diff --git a/languages/pascal/PascalAST.hpp b/languages/pascal/PascalAST.hpp deleted file mode 100644 index 3df4ea50..00000000 --- a/languages/pascal/PascalAST.hpp +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef PASCALAST_HPP -#define PASCALAST_HPP - -#include - -class PascalAST; -typedef antlr::ASTRefCount RefPascalAST; - -class PascalAST : public antlr::CommonAST { -public: - PascalAST() - : m_line(0), m_column(0) {} - - ~PascalAST() {} - - int getLine() const { return m_line; } - void setLine( int line ) { m_line = line; } - - int getColumn() const { return m_column; } - void setColumn( int column ) { m_column = column; } - - void initialize( antlr::RefToken t ) { - antlr::CommonAST::initialize(t); - m_line = t->getLine() - 1; - m_column = t->getColumn() - 1; - } - - void initialize(int t,const ANTLR_USE_NAMESPACE(std)string& txt) { - setType(t); - setText(txt); - m_line = 0; - m_column = 0; - } - - void addChild( RefPascalAST c ) { - antlr::RefAST n( c.get() ); - antlr::BaseAST::addChild( n ); - } - - static antlr::RefAST factory( void ) { - RefPascalAST n(new PascalAST); - return n.get(); - } - -private: - int m_line; - int m_column; -}; - - -#endif diff --git a/languages/pascal/PascalLexer.cpp b/languages/pascal/PascalLexer.cpp index 28f532f8..c140ee51 100644 --- a/languages/pascal/PascalLexer.cpp +++ b/languages/pascal/PascalLexer.cpp @@ -1,12 +1,12 @@ /* $ANTLR 2.7.7 (20061129): "pascal.g" -> "PascalLexer.cpp"$ */ -#include "PascalLexer.hpp" -#include -#include -#include -#include -#include -#include -#include +#include "PascalLexer.h" +#include +#include +#include +#include +#include +#include +#include #line 1 "pascal.g" #line 13 "PascalLexer.cpp" diff --git a/languages/pascal/PascalLexer.h b/languages/pascal/PascalLexer.h new file mode 100644 index 00000000..e2043c2f --- /dev/null +++ b/languages/pascal/PascalLexer.h @@ -0,0 +1,121 @@ +#ifndef INC_PascalLexer_h_ +#define INC_PascalLexer_h_ + +#line 29 "pascal.g" + + #include "problemreporter.h" + #include "PascalAST.h" + + #include + #include + + #define SET_POSITION(ast,t)\ + { \ + RefPascalAST(ast)->setLine( t->getLine() );\ + RefPascalAST(ast)->setColumn( t->getColumn() ); \ + } + +#line 19 "PascalLexer.h" +#include +/* $ANTLR 2.7.7 (20061129): "pascal.g" -> "PascalLexer.h"$ */ +#include +#include +#include +#include "PascalTokenTypes.h" +#include +class CUSTOM_API PascalLexer : public ANTLR_USE_NAMESPACE(antlr)CharScanner, public PascalTokenTypes +{ +#line 1067 "pascal.g" + +private: + ProblemReporter* m_problemReporter; + unsigned int m_numberOfErrors; + +public: + void resetErrors() { m_numberOfErrors = 0; } + unsigned int numberOfErrors() const { return m_numberOfErrors; } + void setProblemReporter( ProblemReporter* r ) { m_problemReporter = r; } + + virtual void reportError( const ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex ){ + m_problemReporter->reportError( ex.getMessage().c_str(), + ex.getFilename().c_str(), + ex.getLine(), + ex.getColumn() ); + ++m_numberOfErrors; + } + + virtual void reportError( const ANTLR_USE_NAMESPACE(std)string& errorMessage ){ + m_problemReporter->reportError( errorMessage.c_str(), + getFilename().c_str(), + getLine(), getColumn() ); + ++m_numberOfErrors; + } + + virtual void reportWarning( const ANTLR_USE_NAMESPACE(std)string& warnMessage ){ + m_problemReporter->reportWarning( warnMessage.c_str(), + getFilename().c_str(), + getLine(), getColumn() ); + } +#line 30 "PascalLexer.h" +private: + void initLiterals(); +public: + bool getCaseSensitiveLiterals() const + { + return false; + } +public: + PascalLexer(ANTLR_USE_NAMESPACE(std)istream& in); + PascalLexer(ANTLR_USE_NAMESPACE(antlr)InputBuffer& ib); + PascalLexer(const ANTLR_USE_NAMESPACE(antlr)LexerSharedInputState& state); + ANTLR_USE_NAMESPACE(antlr)RefToken nextToken(); + public: void mPLUS(bool _createToken); + public: void mMINUS(bool _createToken); + public: void mSTAR(bool _createToken); + public: void mSLASH(bool _createToken); + public: void mASSIGN(bool _createToken); + public: void mCOMMA(bool _createToken); + public: void mSEMI(bool _createToken); + public: void mCOLON(bool _createToken); + public: void mEQUAL(bool _createToken); + public: void mNOT_EQUAL(bool _createToken); + public: void mLTH(bool _createToken); + public: void mLE(bool _createToken); + public: void mGE(bool _createToken); + public: void mGT(bool _createToken); + public: void mLPAREN(bool _createToken); + public: void mRPAREN(bool _createToken); + public: void mLBRACK(bool _createToken); + public: void mLBRACK2(bool _createToken); + public: void mRBRACK(bool _createToken); + public: void mRBRACK2(bool _createToken); + public: void mPOINTER(bool _createToken); + public: void mAT(bool _createToken); + public: void mDOT(bool _createToken); + public: void mLCURLY(bool _createToken); + public: void mRCURLY(bool _createToken); + public: void mPLUSEQ(bool _createToken); + public: void mMINUSEQ(bool _createToken); + public: void mSTAREQ(bool _createToken); + public: void mSLASHQE(bool _createToken); + public: void mWS(bool _createToken); + public: void mCOMMENT_1(bool _createToken); + public: void mCOMMENT_2(bool _createToken); + public: void mCOMMENT_3(bool _createToken); + public: void mIDENT(bool _createToken); + public: void mSTRING_LITERAL(bool _createToken); + public: void mNUM_INT(bool _createToken); + protected: void mEXPONENT(bool _createToken); +private: + + static const unsigned long _tokenSet_0_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_0; + static const unsigned long _tokenSet_1_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_1; + static const unsigned long _tokenSet_2_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_2; + static const unsigned long _tokenSet_3_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_3; +}; + +#endif /*INC_PascalLexer_h_*/ diff --git a/languages/pascal/PascalLexer.hpp b/languages/pascal/PascalLexer.hpp deleted file mode 100644 index 99a14959..00000000 --- a/languages/pascal/PascalLexer.hpp +++ /dev/null @@ -1,121 +0,0 @@ -#ifndef INC_PascalLexer_hpp_ -#define INC_PascalLexer_hpp_ - -#line 29 "pascal.g" - - #include "problemreporter.h" - #include "PascalAST.hpp" - - #include - #include - - #define SET_POSITION(ast,t)\ - { \ - RefPascalAST(ast)->setLine( t->getLine() );\ - RefPascalAST(ast)->setColumn( t->getColumn() ); \ - } - -#line 19 "PascalLexer.hpp" -#include -/* $ANTLR 2.7.7 (20061129): "pascal.g" -> "PascalLexer.hpp"$ */ -#include -#include -#include -#include "PascalTokenTypes.hpp" -#include -class CUSTOM_API PascalLexer : public ANTLR_USE_NAMESPACE(antlr)CharScanner, public PascalTokenTypes -{ -#line 1067 "pascal.g" - -private: - ProblemReporter* m_problemReporter; - unsigned int m_numberOfErrors; - -public: - void resetErrors() { m_numberOfErrors = 0; } - unsigned int numberOfErrors() const { return m_numberOfErrors; } - void setProblemReporter( ProblemReporter* r ) { m_problemReporter = r; } - - virtual void reportError( const ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex ){ - m_problemReporter->reportError( ex.getMessage().c_str(), - ex.getFilename().c_str(), - ex.getLine(), - ex.getColumn() ); - ++m_numberOfErrors; - } - - virtual void reportError( const ANTLR_USE_NAMESPACE(std)string& errorMessage ){ - m_problemReporter->reportError( errorMessage.c_str(), - getFilename().c_str(), - getLine(), getColumn() ); - ++m_numberOfErrors; - } - - virtual void reportWarning( const ANTLR_USE_NAMESPACE(std)string& warnMessage ){ - m_problemReporter->reportWarning( warnMessage.c_str(), - getFilename().c_str(), - getLine(), getColumn() ); - } -#line 30 "PascalLexer.hpp" -private: - void initLiterals(); -public: - bool getCaseSensitiveLiterals() const - { - return false; - } -public: - PascalLexer(ANTLR_USE_NAMESPACE(std)istream& in); - PascalLexer(ANTLR_USE_NAMESPACE(antlr)InputBuffer& ib); - PascalLexer(const ANTLR_USE_NAMESPACE(antlr)LexerSharedInputState& state); - ANTLR_USE_NAMESPACE(antlr)RefToken nextToken(); - public: void mPLUS(bool _createToken); - public: void mMINUS(bool _createToken); - public: void mSTAR(bool _createToken); - public: void mSLASH(bool _createToken); - public: void mASSIGN(bool _createToken); - public: void mCOMMA(bool _createToken); - public: void mSEMI(bool _createToken); - public: void mCOLON(bool _createToken); - public: void mEQUAL(bool _createToken); - public: void mNOT_EQUAL(bool _createToken); - public: void mLTH(bool _createToken); - public: void mLE(bool _createToken); - public: void mGE(bool _createToken); - public: void mGT(bool _createToken); - public: void mLPAREN(bool _createToken); - public: void mRPAREN(bool _createToken); - public: void mLBRACK(bool _createToken); - public: void mLBRACK2(bool _createToken); - public: void mRBRACK(bool _createToken); - public: void mRBRACK2(bool _createToken); - public: void mPOINTER(bool _createToken); - public: void mAT(bool _createToken); - public: void mDOT(bool _createToken); - public: void mLCURLY(bool _createToken); - public: void mRCURLY(bool _createToken); - public: void mPLUSEQ(bool _createToken); - public: void mMINUSEQ(bool _createToken); - public: void mSTAREQ(bool _createToken); - public: void mSLASHQE(bool _createToken); - public: void mWS(bool _createToken); - public: void mCOMMENT_1(bool _createToken); - public: void mCOMMENT_2(bool _createToken); - public: void mCOMMENT_3(bool _createToken); - public: void mIDENT(bool _createToken); - public: void mSTRING_LITERAL(bool _createToken); - public: void mNUM_INT(bool _createToken); - protected: void mEXPONENT(bool _createToken); -private: - - static const unsigned long _tokenSet_0_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_0; - static const unsigned long _tokenSet_1_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_1; - static const unsigned long _tokenSet_2_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_2; - static const unsigned long _tokenSet_3_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_3; -}; - -#endif /*INC_PascalLexer_hpp_*/ diff --git a/languages/pascal/PascalParser.cpp b/languages/pascal/PascalParser.cpp index 51d620ff..e45cdb4e 100644 --- a/languages/pascal/PascalParser.cpp +++ b/languages/pascal/PascalParser.cpp @@ -1,8 +1,8 @@ /* $ANTLR 2.7.7 (20061129): "pascal.g" -> "PascalParser.cpp"$ */ -#include "PascalParser.hpp" -#include -#include -#include +#include "PascalParser.h" +#include +#include +#include #line 1 "pascal.g" #line 8 "PascalParser.cpp" PascalParser::PascalParser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf, int k) diff --git a/languages/pascal/PascalParser.h b/languages/pascal/PascalParser.h new file mode 100644 index 00000000..19cbc397 --- /dev/null +++ b/languages/pascal/PascalParser.h @@ -0,0 +1,422 @@ +#ifndef INC_PascalParser_h_ +#define INC_PascalParser_h_ + +#line 29 "pascal.g" + + #include "problemreporter.h" + #include "PascalAST.h" + + #include + #include + + #define SET_POSITION(ast,t)\ + { \ + RefPascalAST(ast)->setLine( t->getLine() );\ + RefPascalAST(ast)->setColumn( t->getColumn() ); \ + } + +#line 19 "PascalParser.h" +#include +/* $ANTLR 2.7.7 (20061129): "pascal.g" -> "PascalParser.h"$ */ +#include +#include +#include "PascalTokenTypes.h" +#include + +class CUSTOM_API PascalParser : public ANTLR_USE_NAMESPACE(antlr)LLkParser, public PascalTokenTypes +{ +#line 90 "pascal.g" + +private: + unsigned int m_numberOfErrors; + ProblemReporter* m_problemReporter; + +public: + void resetErrors() { m_numberOfErrors = 0; } + unsigned int numberOfErrors() const { return m_numberOfErrors; } + void setProblemReporter( ProblemReporter* r ) { m_problemReporter = r; } + + void reportError( const ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex ){ + m_problemReporter->reportError( ex.getMessage().c_str(), + ex.getFilename().c_str(), + ex.getLine(), + ex.getColumn() ); + ++m_numberOfErrors; + } + + void reportError( const ANTLR_USE_NAMESPACE(std)string& errorMessage ){ + m_problemReporter->reportError( errorMessage.c_str(), + getFilename().c_str(), + LT(1)->getLine(), + LT(1)->getColumn() ); + ++m_numberOfErrors; + } + + void reportMessage( const ANTLR_USE_NAMESPACE(std)string& message ){ + m_problemReporter->reportMessage( message.c_str(), + getFilename().c_str(), + LT(1)->getLine(), + LT(1)->getColumn() ); + } +#line 30 "PascalParser.h" +public: + void initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory ); +protected: + PascalParser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf, int k); +public: + PascalParser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf); +protected: + PascalParser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer, int k); +public: + PascalParser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer); + PascalParser(const ANTLR_USE_NAMESPACE(antlr)ParserSharedInputState& state); + int getNumTokens() const + { + return PascalParser::NUM_TOKENS; + } + const char* getTokenName( int type ) const + { + if( type > getNumTokens() ) return 0; + return PascalParser::tokenNames[type]; + } + const char* const* getTokenNames() const + { + return PascalParser::tokenNames; + } + public: void compilationUnit(); + public: void program(); + public: void library(); + public: void unit(); + public: void programHeading(); + public: void usesClause(); + public: void block(); + public: void identifier(); + public: void libraryBlock(); + public: void exportsClause(); + public: void declarationPart(); + public: void statementPart(); + public: void exportsList(); + public: void exportsEntry(); + public: void integerConstant(); + public: void stringConstant(); + public: void identifierList(); + public: void interfacePart(); + public: void implementationPart(); + public: void initializationPart(); + public: void finalizationPart(); + public: void realizationPart(); + public: void constantDeclarationPart(); + public: void typeDeclarationPart(); + public: void procedureHeadersPart(); + public: void statement(); + public: void labelDeclarationPart(); + public: void resourcestringDeclarationPart(); + public: void variableDeclarationPart(); + public: void procedureAndFunctionDeclarationPart(); + public: void label(); + public: void constantDeclaration(); + public: void typedConstantDeclaration(); + public: void stringConstantDeclaration(); + public: void string(); + public: void typeDeclaration(); + public: void variableDeclaration(); + public: void type(); + public: void procedureAndFunctionDeclaration(); + public: void procedureDeclaration(); + public: void functionDeclaration(); + public: void constructorDeclaration(); + public: void destructorDeclaration(); + public: void compoundStatement(); + public: void procedureHeader(); + public: void subroutineBlock(); + public: void functionHeader(); + public: void qualifiedMethodIdentifier(); + public: void formalParameterList(); + public: void modifiers(); + public: void externalDirective(); + public: void functionHeaderEnding(); + public: void parameterDeclaration(); + public: void valueParameter(); + public: void variableParameter(); + public: void constantParameter(); + public: void untypedParameterPart(); + public: void callModifiers(); + public: void expression(); + public: void typedConstant(); + public: void constant(); + public: void recordConstant(); + public: void arrayConstant(); + public: void proceduralConstant(); + public: void addressConstant(); + public: void simpleType(); + public: void subrangeTypeOrTypeIdentifier(); + public: void enumeratedType(); + public: void stringType(); + public: void structuredType(); + public: void pointerType(); + public: void proceduralType(); + public: void ordinalType(); + public: void realType(); + public: void typeIdentifier(); + public: void subrangeType(); + public: void assignedEnumList(); + public: void unsignedInteger(); + public: void arrayType(); + public: void recordType(); + public: void objectType(); + public: void classType(); + public: void setType(); + public: void fileType(); + public: void arrayIndexType(); + public: void arraySubrangeType(); + public: void fieldList(); + public: void fixedField(); + public: void variantPart(); + public: void variant(); + public: void proceduralTypePart1(); + public: void heritage(); + public: void componentList(); + public: void objectVisibilitySpecifier(); + public: void fieldDefinition(); + public: void methodDefinition(); + public: void constructorHeader(); + public: void destructorHeader(); + public: void methodDirectives(); + public: void classComponentList(); + public: void classVisibilitySpecifier(); + public: void classMethodDefinition(); + public: void propertyDefinition(); + public: void classMethodDirectives(); + public: void directiveVariants(); + public: void propertyInterface(); + public: void propertySpecifiers(); + public: void propertyParameterList(); + public: void readSpecifier(); + public: void writeSpecifier(); + public: void defaultSpecifier(); + public: void fieldOrMethod(); + public: void simpleExpression(); + public: void expressionSign(); + public: void term(); + public: void factor(); + public: void identifierOrValueTypecastOrFunctionCall(); + public: void unsignedConstant(); + public: void setConstructor(); + public: void addressFactor(); + public: void expressions(); + public: void functionCall(); + public: void actualParameterList(); + public: void setGroup(); + public: void valueTypecast(); + public: void simpleStatement(); + public: void structuredStatement(); + public: void assignmentStatement(); + public: void procedureStatement(); + public: void gotoStatement(); + public: void raiseStatement(); + public: void identifierOrArrayIdentifier(); + public: void assignmentOperator(); + public: void repetitiveStatement(); + public: void conditionalStatement(); + public: void exceptionStatement(); + public: void withStatement(); + public: void ifStatement(); + public: void caseStatement(); + public: void forStatement(); + public: void repeatStatement(); + public: void whileStatement(); + public: void caseListElement(); + public: void constList(); + public: void forList(); + public: void initialValue(); + public: void finalValue(); + public: void recordVariableList(); + public: void variable(); + public: void operatorDefinition(); + public: void assignmentOperatorDefinition(); + public: void arithmeticOperatorDefinition(); + public: void comparisonOperatorDefinition(); + public: void tryStatement(); + public: void statements(); + public: void exceptOrFinallyPart(); + public: void exceptionHandlers(); + public: void exceptionHandler(); + public: void sign(); + public: void constantChr(); + public: void unsignedNumber(); + public: void unsignedReal(); +public: + ANTLR_USE_NAMESPACE(antlr)RefAST getAST() + { + return ANTLR_USE_NAMESPACE(antlr)RefAST(returnAST); + } + +protected: + RefPascalAST returnAST; +private: + static const char* tokenNames[]; +#ifndef NO_STATIC_CONSTS + static const int NUM_TOKENS = 190; +#else + enum { + NUM_TOKENS = 190 + }; +#endif + + static const unsigned long _tokenSet_0_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_0; + static const unsigned long _tokenSet_1_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_1; + static const unsigned long _tokenSet_2_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_2; + static const unsigned long _tokenSet_3_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_3; + static const unsigned long _tokenSet_4_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_4; + static const unsigned long _tokenSet_5_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_5; + static const unsigned long _tokenSet_6_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_6; + static const unsigned long _tokenSet_7_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_7; + static const unsigned long _tokenSet_8_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_8; + static const unsigned long _tokenSet_9_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_9; + static const unsigned long _tokenSet_10_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_10; + static const unsigned long _tokenSet_11_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_11; + static const unsigned long _tokenSet_12_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_12; + static const unsigned long _tokenSet_13_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_13; + static const unsigned long _tokenSet_14_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_14; + static const unsigned long _tokenSet_15_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_15; + static const unsigned long _tokenSet_16_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_16; + static const unsigned long _tokenSet_17_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_17; + static const unsigned long _tokenSet_18_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_18; + static const unsigned long _tokenSet_19_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_19; + static const unsigned long _tokenSet_20_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_20; + static const unsigned long _tokenSet_21_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_21; + static const unsigned long _tokenSet_22_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_22; + static const unsigned long _tokenSet_23_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_23; + static const unsigned long _tokenSet_24_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_24; + static const unsigned long _tokenSet_25_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_25; + static const unsigned long _tokenSet_26_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_26; + static const unsigned long _tokenSet_27_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_27; + static const unsigned long _tokenSet_28_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_28; + static const unsigned long _tokenSet_29_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_29; + static const unsigned long _tokenSet_30_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_30; + static const unsigned long _tokenSet_31_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_31; + static const unsigned long _tokenSet_32_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_32; + static const unsigned long _tokenSet_33_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_33; + static const unsigned long _tokenSet_34_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_34; + static const unsigned long _tokenSet_35_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_35; + static const unsigned long _tokenSet_36_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_36; + static const unsigned long _tokenSet_37_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_37; + static const unsigned long _tokenSet_38_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_38; + static const unsigned long _tokenSet_39_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_39; + static const unsigned long _tokenSet_40_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_40; + static const unsigned long _tokenSet_41_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_41; + static const unsigned long _tokenSet_42_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_42; + static const unsigned long _tokenSet_43_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_43; + static const unsigned long _tokenSet_44_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_44; + static const unsigned long _tokenSet_45_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_45; + static const unsigned long _tokenSet_46_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_46; + static const unsigned long _tokenSet_47_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_47; + static const unsigned long _tokenSet_48_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_48; + static const unsigned long _tokenSet_49_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_49; + static const unsigned long _tokenSet_50_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_50; + static const unsigned long _tokenSet_51_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_51; + static const unsigned long _tokenSet_52_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_52; + static const unsigned long _tokenSet_53_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_53; + static const unsigned long _tokenSet_54_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_54; + static const unsigned long _tokenSet_55_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_55; + static const unsigned long _tokenSet_56_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_56; + static const unsigned long _tokenSet_57_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_57; + static const unsigned long _tokenSet_58_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_58; + static const unsigned long _tokenSet_59_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_59; + static const unsigned long _tokenSet_60_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_60; + static const unsigned long _tokenSet_61_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_61; + static const unsigned long _tokenSet_62_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_62; + static const unsigned long _tokenSet_63_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_63; + static const unsigned long _tokenSet_64_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_64; + static const unsigned long _tokenSet_65_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_65; + static const unsigned long _tokenSet_66_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_66; + static const unsigned long _tokenSet_67_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_67; + static const unsigned long _tokenSet_68_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_68; + static const unsigned long _tokenSet_69_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_69; + static const unsigned long _tokenSet_70_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_70; + static const unsigned long _tokenSet_71_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_71; + static const unsigned long _tokenSet_72_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_72; + static const unsigned long _tokenSet_73_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_73; + static const unsigned long _tokenSet_74_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_74; + static const unsigned long _tokenSet_75_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_75; + static const unsigned long _tokenSet_76_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_76; +}; + +#endif /*INC_PascalParser_h_*/ diff --git a/languages/pascal/PascalParser.hpp b/languages/pascal/PascalParser.hpp deleted file mode 100644 index dfd4e5f2..00000000 --- a/languages/pascal/PascalParser.hpp +++ /dev/null @@ -1,422 +0,0 @@ -#ifndef INC_PascalParser_hpp_ -#define INC_PascalParser_hpp_ - -#line 29 "pascal.g" - - #include "problemreporter.h" - #include "PascalAST.hpp" - - #include - #include - - #define SET_POSITION(ast,t)\ - { \ - RefPascalAST(ast)->setLine( t->getLine() );\ - RefPascalAST(ast)->setColumn( t->getColumn() ); \ - } - -#line 19 "PascalParser.hpp" -#include -/* $ANTLR 2.7.7 (20061129): "pascal.g" -> "PascalParser.hpp"$ */ -#include -#include -#include "PascalTokenTypes.hpp" -#include - -class CUSTOM_API PascalParser : public ANTLR_USE_NAMESPACE(antlr)LLkParser, public PascalTokenTypes -{ -#line 90 "pascal.g" - -private: - unsigned int m_numberOfErrors; - ProblemReporter* m_problemReporter; - -public: - void resetErrors() { m_numberOfErrors = 0; } - unsigned int numberOfErrors() const { return m_numberOfErrors; } - void setProblemReporter( ProblemReporter* r ) { m_problemReporter = r; } - - void reportError( const ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex ){ - m_problemReporter->reportError( ex.getMessage().c_str(), - ex.getFilename().c_str(), - ex.getLine(), - ex.getColumn() ); - ++m_numberOfErrors; - } - - void reportError( const ANTLR_USE_NAMESPACE(std)string& errorMessage ){ - m_problemReporter->reportError( errorMessage.c_str(), - getFilename().c_str(), - LT(1)->getLine(), - LT(1)->getColumn() ); - ++m_numberOfErrors; - } - - void reportMessage( const ANTLR_USE_NAMESPACE(std)string& message ){ - m_problemReporter->reportMessage( message.c_str(), - getFilename().c_str(), - LT(1)->getLine(), - LT(1)->getColumn() ); - } -#line 30 "PascalParser.hpp" -public: - void initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory ); -protected: - PascalParser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf, int k); -public: - PascalParser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf); -protected: - PascalParser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer, int k); -public: - PascalParser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer); - PascalParser(const ANTLR_USE_NAMESPACE(antlr)ParserSharedInputState& state); - int getNumTokens() const - { - return PascalParser::NUM_TOKENS; - } - const char* getTokenName( int type ) const - { - if( type > getNumTokens() ) return 0; - return PascalParser::tokenNames[type]; - } - const char* const* getTokenNames() const - { - return PascalParser::tokenNames; - } - public: void compilationUnit(); - public: void program(); - public: void library(); - public: void unit(); - public: void programHeading(); - public: void usesClause(); - public: void block(); - public: void identifier(); - public: void libraryBlock(); - public: void exportsClause(); - public: void declarationPart(); - public: void statementPart(); - public: void exportsList(); - public: void exportsEntry(); - public: void integerConstant(); - public: void stringConstant(); - public: void identifierList(); - public: void interfacePart(); - public: void implementationPart(); - public: void initializationPart(); - public: void finalizationPart(); - public: void realizationPart(); - public: void constantDeclarationPart(); - public: void typeDeclarationPart(); - public: void procedureHeadersPart(); - public: void statement(); - public: void labelDeclarationPart(); - public: void resourcestringDeclarationPart(); - public: void variableDeclarationPart(); - public: void procedureAndFunctionDeclarationPart(); - public: void label(); - public: void constantDeclaration(); - public: void typedConstantDeclaration(); - public: void stringConstantDeclaration(); - public: void string(); - public: void typeDeclaration(); - public: void variableDeclaration(); - public: void type(); - public: void procedureAndFunctionDeclaration(); - public: void procedureDeclaration(); - public: void functionDeclaration(); - public: void constructorDeclaration(); - public: void destructorDeclaration(); - public: void compoundStatement(); - public: void procedureHeader(); - public: void subroutineBlock(); - public: void functionHeader(); - public: void qualifiedMethodIdentifier(); - public: void formalParameterList(); - public: void modifiers(); - public: void externalDirective(); - public: void functionHeaderEnding(); - public: void parameterDeclaration(); - public: void valueParameter(); - public: void variableParameter(); - public: void constantParameter(); - public: void untypedParameterPart(); - public: void callModifiers(); - public: void expression(); - public: void typedConstant(); - public: void constant(); - public: void recordConstant(); - public: void arrayConstant(); - public: void proceduralConstant(); - public: void addressConstant(); - public: void simpleType(); - public: void subrangeTypeOrTypeIdentifier(); - public: void enumeratedType(); - public: void stringType(); - public: void structuredType(); - public: void pointerType(); - public: void proceduralType(); - public: void ordinalType(); - public: void realType(); - public: void typeIdentifier(); - public: void subrangeType(); - public: void assignedEnumList(); - public: void unsignedInteger(); - public: void arrayType(); - public: void recordType(); - public: void objectType(); - public: void classType(); - public: void setType(); - public: void fileType(); - public: void arrayIndexType(); - public: void arraySubrangeType(); - public: void fieldList(); - public: void fixedField(); - public: void variantPart(); - public: void variant(); - public: void proceduralTypePart1(); - public: void heritage(); - public: void componentList(); - public: void objectVisibilitySpecifier(); - public: void fieldDefinition(); - public: void methodDefinition(); - public: void constructorHeader(); - public: void destructorHeader(); - public: void methodDirectives(); - public: void classComponentList(); - public: void classVisibilitySpecifier(); - public: void classMethodDefinition(); - public: void propertyDefinition(); - public: void classMethodDirectives(); - public: void directiveVariants(); - public: void propertyInterface(); - public: void propertySpecifiers(); - public: void propertyParameterList(); - public: void readSpecifier(); - public: void writeSpecifier(); - public: void defaultSpecifier(); - public: void fieldOrMethod(); - public: void simpleExpression(); - public: void expressionSign(); - public: void term(); - public: void factor(); - public: void identifierOrValueTypecastOrFunctionCall(); - public: void unsignedConstant(); - public: void setConstructor(); - public: void addressFactor(); - public: void expressions(); - public: void functionCall(); - public: void actualParameterList(); - public: void setGroup(); - public: void valueTypecast(); - public: void simpleStatement(); - public: void structuredStatement(); - public: void assignmentStatement(); - public: void procedureStatement(); - public: void gotoStatement(); - public: void raiseStatement(); - public: void identifierOrArrayIdentifier(); - public: void assignmentOperator(); - public: void repetitiveStatement(); - public: void conditionalStatement(); - public: void exceptionStatement(); - public: void withStatement(); - public: void ifStatement(); - public: void caseStatement(); - public: void forStatement(); - public: void repeatStatement(); - public: void whileStatement(); - public: void caseListElement(); - public: void constList(); - public: void forList(); - public: void initialValue(); - public: void finalValue(); - public: void recordVariableList(); - public: void variable(); - public: void operatorDefinition(); - public: void assignmentOperatorDefinition(); - public: void arithmeticOperatorDefinition(); - public: void comparisonOperatorDefinition(); - public: void tryStatement(); - public: void statements(); - public: void exceptOrFinallyPart(); - public: void exceptionHandlers(); - public: void exceptionHandler(); - public: void sign(); - public: void constantChr(); - public: void unsignedNumber(); - public: void unsignedReal(); -public: - ANTLR_USE_NAMESPACE(antlr)RefAST getAST() - { - return ANTLR_USE_NAMESPACE(antlr)RefAST(returnAST); - } - -protected: - RefPascalAST returnAST; -private: - static const char* tokenNames[]; -#ifndef NO_STATIC_CONSTS - static const int NUM_TOKENS = 190; -#else - enum { - NUM_TOKENS = 190 - }; -#endif - - static const unsigned long _tokenSet_0_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_0; - static const unsigned long _tokenSet_1_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_1; - static const unsigned long _tokenSet_2_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_2; - static const unsigned long _tokenSet_3_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_3; - static const unsigned long _tokenSet_4_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_4; - static const unsigned long _tokenSet_5_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_5; - static const unsigned long _tokenSet_6_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_6; - static const unsigned long _tokenSet_7_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_7; - static const unsigned long _tokenSet_8_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_8; - static const unsigned long _tokenSet_9_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_9; - static const unsigned long _tokenSet_10_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_10; - static const unsigned long _tokenSet_11_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_11; - static const unsigned long _tokenSet_12_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_12; - static const unsigned long _tokenSet_13_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_13; - static const unsigned long _tokenSet_14_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_14; - static const unsigned long _tokenSet_15_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_15; - static const unsigned long _tokenSet_16_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_16; - static const unsigned long _tokenSet_17_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_17; - static const unsigned long _tokenSet_18_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_18; - static const unsigned long _tokenSet_19_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_19; - static const unsigned long _tokenSet_20_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_20; - static const unsigned long _tokenSet_21_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_21; - static const unsigned long _tokenSet_22_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_22; - static const unsigned long _tokenSet_23_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_23; - static const unsigned long _tokenSet_24_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_24; - static const unsigned long _tokenSet_25_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_25; - static const unsigned long _tokenSet_26_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_26; - static const unsigned long _tokenSet_27_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_27; - static const unsigned long _tokenSet_28_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_28; - static const unsigned long _tokenSet_29_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_29; - static const unsigned long _tokenSet_30_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_30; - static const unsigned long _tokenSet_31_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_31; - static const unsigned long _tokenSet_32_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_32; - static const unsigned long _tokenSet_33_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_33; - static const unsigned long _tokenSet_34_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_34; - static const unsigned long _tokenSet_35_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_35; - static const unsigned long _tokenSet_36_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_36; - static const unsigned long _tokenSet_37_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_37; - static const unsigned long _tokenSet_38_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_38; - static const unsigned long _tokenSet_39_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_39; - static const unsigned long _tokenSet_40_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_40; - static const unsigned long _tokenSet_41_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_41; - static const unsigned long _tokenSet_42_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_42; - static const unsigned long _tokenSet_43_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_43; - static const unsigned long _tokenSet_44_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_44; - static const unsigned long _tokenSet_45_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_45; - static const unsigned long _tokenSet_46_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_46; - static const unsigned long _tokenSet_47_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_47; - static const unsigned long _tokenSet_48_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_48; - static const unsigned long _tokenSet_49_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_49; - static const unsigned long _tokenSet_50_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_50; - static const unsigned long _tokenSet_51_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_51; - static const unsigned long _tokenSet_52_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_52; - static const unsigned long _tokenSet_53_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_53; - static const unsigned long _tokenSet_54_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_54; - static const unsigned long _tokenSet_55_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_55; - static const unsigned long _tokenSet_56_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_56; - static const unsigned long _tokenSet_57_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_57; - static const unsigned long _tokenSet_58_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_58; - static const unsigned long _tokenSet_59_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_59; - static const unsigned long _tokenSet_60_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_60; - static const unsigned long _tokenSet_61_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_61; - static const unsigned long _tokenSet_62_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_62; - static const unsigned long _tokenSet_63_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_63; - static const unsigned long _tokenSet_64_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_64; - static const unsigned long _tokenSet_65_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_65; - static const unsigned long _tokenSet_66_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_66; - static const unsigned long _tokenSet_67_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_67; - static const unsigned long _tokenSet_68_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_68; - static const unsigned long _tokenSet_69_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_69; - static const unsigned long _tokenSet_70_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_70; - static const unsigned long _tokenSet_71_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_71; - static const unsigned long _tokenSet_72_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_72; - static const unsigned long _tokenSet_73_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_73; - static const unsigned long _tokenSet_74_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_74; - static const unsigned long _tokenSet_75_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_75; - static const unsigned long _tokenSet_76_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_76; -}; - -#endif /*INC_PascalParser_hpp_*/ diff --git a/languages/pascal/PascalStoreWalker.cpp b/languages/pascal/PascalStoreWalker.cpp index 96c69fe4..b56897df 100644 --- a/languages/pascal/PascalStoreWalker.cpp +++ b/languages/pascal/PascalStoreWalker.cpp @@ -1,11 +1,11 @@ /* $ANTLR 2.7.7 (20061129): "pascal.tree.g" -> "PascalStoreWalker.cpp"$ */ -#include "PascalStoreWalker.hpp" -#include -#include -#include -#include -#include -#include +#include "PascalStoreWalker.h" +#include +#include +#include +#include +#include +#include #line 1 "pascal.tree.g" #line 11 "PascalStoreWalker.cpp" PascalStoreWalker::PascalStoreWalker() diff --git a/languages/pascal/PascalStoreWalker.h b/languages/pascal/PascalStoreWalker.h new file mode 100644 index 00000000..ceece541 --- /dev/null +++ b/languages/pascal/PascalStoreWalker.h @@ -0,0 +1,172 @@ +#ifndef INC_PascalStoreWalker_h_ +#define INC_PascalStoreWalker_h_ + +#line 20 "pascal.tree.g" + + #include + #include "PascalAST.h" + + #include + #include + #include + +#line 14 "PascalStoreWalker.h" +#include +#include "PascalStoreWalkerTokenTypes.h" +/* $ANTLR 2.7.7 (20061129): "pascal.tree.g" -> "PascalStoreWalker.h"$ */ +#include + +#line 29 "pascal.tree.g" + + #include + #include + +#line 25 "PascalStoreWalker.h" +class CUSTOM_API PascalStoreWalker : public ANTLR_USE_NAMESPACE(antlr)TreeParser, public PascalStoreWalkerTokenTypes +{ +#line 47 "pascal.tree.g" + +private: + TQString m_fileName; + TQStringList m_currentScope; + int m_currentAccess; + int m_anon; + CodeModel* m_model; + +public: + void setCodeModel( CodeModel* model ) { m_model = model; } + CodeModel* codeModel() { return m_model; } + const CodeModel* codeModel() const { return m_model; } + + TQString fileName() const { return m_fileName; } + void setFileName( const TQString& fileName ) { m_fileName = fileName; } + + void init(){ + m_currentScope.clear(); + m_currentAccess = CodeModelItem::Public; + m_anon = 0; + } + + void wipeout() { m_model->wipeout(); } +#line 29 "PascalStoreWalker.h" +public: + PascalStoreWalker(); + static void initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory ); + int getNumTokens() const + { + return PascalStoreWalker::NUM_TOKENS; + } + const char* getTokenName( int type ) const + { + if( type > getNumTokens() ) return 0; + return PascalStoreWalker::tokenNames[type]; + } + const char* const* getTokenNames() const + { + return PascalStoreWalker::tokenNames; + } + public: void program(RefPascalAST _t); + public: void programHeading(RefPascalAST _t); + public: void block(RefPascalAST _t); + public: void identifierList(RefPascalAST _t); + public: void identifier(RefPascalAST _t); + public: void labelDeclarationPart(RefPascalAST _t); + public: void constantDefinitionPart(RefPascalAST _t); + public: void typeDefinitionPart(RefPascalAST _t); + public: void variableDeclarationPart(RefPascalAST _t); + public: void procedureAndFunctionDeclarationPart(RefPascalAST _t); + public: void usesUnitsPart(RefPascalAST _t); + public: void compoundStatement(RefPascalAST _t); + public: void label(RefPascalAST _t); + public: void constantDefinition(RefPascalAST _t); + public: void constant(RefPascalAST _t); + public: void string(RefPascalAST _t); + public: void typeDefinition(RefPascalAST _t); + public: void type(RefPascalAST _t); + public: void formalParameterList(RefPascalAST _t); + public: void resultType(RefPascalAST _t); + public: void typeIdentifier(RefPascalAST _t); + public: void structuredType(RefPascalAST _t); + public: void unpackedStructuredType(RefPascalAST _t); + public: void arrayType(RefPascalAST _t); + public: void recordType(RefPascalAST _t); + public: void setType(RefPascalAST _t); + public: void fileType(RefPascalAST _t); + public: void typeList(RefPascalAST _t); + public: void fieldList(RefPascalAST _t); + public: void fixedPart(RefPascalAST _t); + public: void variantPart(RefPascalAST _t); + public: void recordSection(RefPascalAST _t); + public: void tag(RefPascalAST _t); + public: void variant(RefPascalAST _t); + public: void constList(RefPascalAST _t); + public: void variableDeclaration(RefPascalAST _t); + public: void procedureOrFunctionDeclaration(RefPascalAST _t); + public: void procedureDeclaration(RefPascalAST _t); + public: void functionDeclaration(RefPascalAST _t); + public: void formalParameterSection(RefPascalAST _t); + public: void parameterGroup(RefPascalAST _t); + public: void statement(RefPascalAST _t); + public: void unlabelledStatement(RefPascalAST _t); + public: void simpleStatement(RefPascalAST _t); + public: void structuredStatement(RefPascalAST _t); + public: void assignmentStatement(RefPascalAST _t); + public: void procedureStatement(RefPascalAST _t); + public: void gotoStatement(RefPascalAST _t); + public: void variable(RefPascalAST _t); + public: void expression(RefPascalAST _t); + public: void functionDesignator(RefPascalAST _t); + public: void set(RefPascalAST _t); + public: void parameterList(RefPascalAST _t); + public: void actualParameter(RefPascalAST _t); + public: void element(RefPascalAST _t); + public: void conditionalStatement(RefPascalAST _t); + public: void repetetiveStatement(RefPascalAST _t); + public: void withStatement(RefPascalAST _t); + public: void statements(RefPascalAST _t); + public: void ifStatement(RefPascalAST _t); + public: void caseStatement(RefPascalAST _t); + public: void caseListElement(RefPascalAST _t); + public: void whileStatement(RefPascalAST _t); + public: void repeatStatement(RefPascalAST _t); + public: void forStatement(RefPascalAST _t); + public: void forList(RefPascalAST _t); + public: void initialValue(RefPascalAST _t); + public: void finalValue(RefPascalAST _t); + public: void recordVariableList(RefPascalAST _t); +public: + ANTLR_USE_NAMESPACE(antlr)RefAST getAST() + { + return ANTLR_USE_NAMESPACE(antlr)RefAST(returnAST); + } + +protected: + RefPascalAST returnAST; + RefPascalAST _retTree; +private: + static const char* tokenNames[]; +#ifndef NO_STATIC_CONSTS + static const int NUM_TOKENS = 190; +#else + enum { + NUM_TOKENS = 190 + }; +#endif + + static const unsigned long _tokenSet_0_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_0; + static const unsigned long _tokenSet_1_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_1; + static const unsigned long _tokenSet_2_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_2; + static const unsigned long _tokenSet_3_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_3; + static const unsigned long _tokenSet_4_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_4; + static const unsigned long _tokenSet_5_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_5; + static const unsigned long _tokenSet_6_data_[]; + static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_6; +}; + +#endif /*INC_PascalStoreWalker_h_*/ diff --git a/languages/pascal/PascalStoreWalker.hpp b/languages/pascal/PascalStoreWalker.hpp deleted file mode 100644 index ada7c020..00000000 --- a/languages/pascal/PascalStoreWalker.hpp +++ /dev/null @@ -1,172 +0,0 @@ -#ifndef INC_PascalStoreWalker_hpp_ -#define INC_PascalStoreWalker_hpp_ - -#line 20 "pascal.tree.g" - - #include - #include "PascalAST.hpp" - - #include - #include - #include - -#line 14 "PascalStoreWalker.hpp" -#include -#include "PascalStoreWalkerTokenTypes.hpp" -/* $ANTLR 2.7.7 (20061129): "pascal.tree.g" -> "PascalStoreWalker.hpp"$ */ -#include - -#line 29 "pascal.tree.g" - - #include - #include - -#line 25 "PascalStoreWalker.hpp" -class CUSTOM_API PascalStoreWalker : public ANTLR_USE_NAMESPACE(antlr)TreeParser, public PascalStoreWalkerTokenTypes -{ -#line 47 "pascal.tree.g" - -private: - TQString m_fileName; - TQStringList m_currentScope; - int m_currentAccess; - int m_anon; - CodeModel* m_model; - -public: - void setCodeModel( CodeModel* model ) { m_model = model; } - CodeModel* codeModel() { return m_model; } - const CodeModel* codeModel() const { return m_model; } - - TQString fileName() const { return m_fileName; } - void setFileName( const TQString& fileName ) { m_fileName = fileName; } - - void init(){ - m_currentScope.clear(); - m_currentAccess = CodeModelItem::Public; - m_anon = 0; - } - - void wipeout() { m_model->wipeout(); } -#line 29 "PascalStoreWalker.hpp" -public: - PascalStoreWalker(); - static void initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory ); - int getNumTokens() const - { - return PascalStoreWalker::NUM_TOKENS; - } - const char* getTokenName( int type ) const - { - if( type > getNumTokens() ) return 0; - return PascalStoreWalker::tokenNames[type]; - } - const char* const* getTokenNames() const - { - return PascalStoreWalker::tokenNames; - } - public: void program(RefPascalAST _t); - public: void programHeading(RefPascalAST _t); - public: void block(RefPascalAST _t); - public: void identifierList(RefPascalAST _t); - public: void identifier(RefPascalAST _t); - public: void labelDeclarationPart(RefPascalAST _t); - public: void constantDefinitionPart(RefPascalAST _t); - public: void typeDefinitionPart(RefPascalAST _t); - public: void variableDeclarationPart(RefPascalAST _t); - public: void procedureAndFunctionDeclarationPart(RefPascalAST _t); - public: void usesUnitsPart(RefPascalAST _t); - public: void compoundStatement(RefPascalAST _t); - public: void label(RefPascalAST _t); - public: void constantDefinition(RefPascalAST _t); - public: void constant(RefPascalAST _t); - public: void string(RefPascalAST _t); - public: void typeDefinition(RefPascalAST _t); - public: void type(RefPascalAST _t); - public: void formalParameterList(RefPascalAST _t); - public: void resultType(RefPascalAST _t); - public: void typeIdentifier(RefPascalAST _t); - public: void structuredType(RefPascalAST _t); - public: void unpackedStructuredType(RefPascalAST _t); - public: void arrayType(RefPascalAST _t); - public: void recordType(RefPascalAST _t); - public: void setType(RefPascalAST _t); - public: void fileType(RefPascalAST _t); - public: void typeList(RefPascalAST _t); - public: void fieldList(RefPascalAST _t); - public: void fixedPart(RefPascalAST _t); - public: void variantPart(RefPascalAST _t); - public: void recordSection(RefPascalAST _t); - public: void tag(RefPascalAST _t); - public: void variant(RefPascalAST _t); - public: void constList(RefPascalAST _t); - public: void variableDeclaration(RefPascalAST _t); - public: void procedureOrFunctionDeclaration(RefPascalAST _t); - public: void procedureDeclaration(RefPascalAST _t); - public: void functionDeclaration(RefPascalAST _t); - public: void formalParameterSection(RefPascalAST _t); - public: void parameterGroup(RefPascalAST _t); - public: void statement(RefPascalAST _t); - public: void unlabelledStatement(RefPascalAST _t); - public: void simpleStatement(RefPascalAST _t); - public: void structuredStatement(RefPascalAST _t); - public: void assignmentStatement(RefPascalAST _t); - public: void procedureStatement(RefPascalAST _t); - public: void gotoStatement(RefPascalAST _t); - public: void variable(RefPascalAST _t); - public: void expression(RefPascalAST _t); - public: void functionDesignator(RefPascalAST _t); - public: void set(RefPascalAST _t); - public: void parameterList(RefPascalAST _t); - public: void actualParameter(RefPascalAST _t); - public: void element(RefPascalAST _t); - public: void conditionalStatement(RefPascalAST _t); - public: void repetetiveStatement(RefPascalAST _t); - public: void withStatement(RefPascalAST _t); - public: void statements(RefPascalAST _t); - public: void ifStatement(RefPascalAST _t); - public: void caseStatement(RefPascalAST _t); - public: void caseListElement(RefPascalAST _t); - public: void whileStatement(RefPascalAST _t); - public: void repeatStatement(RefPascalAST _t); - public: void forStatement(RefPascalAST _t); - public: void forList(RefPascalAST _t); - public: void initialValue(RefPascalAST _t); - public: void finalValue(RefPascalAST _t); - public: void recordVariableList(RefPascalAST _t); -public: - ANTLR_USE_NAMESPACE(antlr)RefAST getAST() - { - return ANTLR_USE_NAMESPACE(antlr)RefAST(returnAST); - } - -protected: - RefPascalAST returnAST; - RefPascalAST _retTree; -private: - static const char* tokenNames[]; -#ifndef NO_STATIC_CONSTS - static const int NUM_TOKENS = 190; -#else - enum { - NUM_TOKENS = 190 - }; -#endif - - static const unsigned long _tokenSet_0_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_0; - static const unsigned long _tokenSet_1_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_1; - static const unsigned long _tokenSet_2_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_2; - static const unsigned long _tokenSet_3_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_3; - static const unsigned long _tokenSet_4_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_4; - static const unsigned long _tokenSet_5_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_5; - static const unsigned long _tokenSet_6_data_[]; - static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_6; -}; - -#endif /*INC_PascalStoreWalker_hpp_*/ diff --git a/languages/pascal/PascalStoreWalkerTokenTypes.h b/languages/pascal/PascalStoreWalkerTokenTypes.h new file mode 100644 index 00000000..4631429c --- /dev/null +++ b/languages/pascal/PascalStoreWalkerTokenTypes.h @@ -0,0 +1,206 @@ +#ifndef INC_PascalStoreWalkerTokenTypes_h_ +#define INC_PascalStoreWalkerTokenTypes_h_ + +/* $ANTLR 2.7.7 (20061129): "pascal.tree.g" -> "PascalStoreWalkerTokenTypes.h"$ */ + +#ifndef CUSTOM_API +# define CUSTOM_API +#endif + +#ifdef __cplusplus +struct CUSTOM_API PascalStoreWalkerTokenTypes { +#endif + enum { + EOF_ = 1, + BLOCK = 4, + IDLIST = 5, + ELIST = 6, + FUNC_CALL = 7, + PROC_CALL = 8, + SCALARTYPE = 9, + TYPELIST = 10, + VARIANT_TAG = 11, + VARIANT_TAG_NO_ID = 12, + VARIANT_CASE = 13, + CONSTLIST = 14, + FIELDLIST = 15, + ARGDECLS = 16, + VARDECL = 17, + ARGDECL = 18, + ARGLIST = 19, + TYPEDECL = 20, + FIELD = 21, + DOT = 22, + LIBRARY = 23, + SEMI = 24, + END = 25, + EXPORTS = 26, + COMMA = 27, + LITERAL_index = 28, + LITERAL_name = 29, + USES = 30, + UNIT = 31, + INTERFACE = 32, + IMPLEMENTATION = 33, + BEGIN = 34, + PROGRAM = 35, + LPAREN = 36, + RPAREN = 37, + INITIALIZATION = 38, + FINALIZATION = 39, + LABEL = 40, + CONST = 41, + RESOURCESTRING = 42, + EQUAL = 43, + TYPE = 44, + VAR = 45, + COLON = 46, + PROCEDURE = 47, + FORWARD = 48, + FUNCTION = 49, + ARRAY = 50, + OF = 51, + EXTERNAL = 52, + PUBLIC = 53, + ALIAS = 54, + INTERRUPT = 55, + EXPORT = 56, + REGISTER = 57, + PASCAL = 58, + CDECL = 59, + STDCALL = 60, + POPSTACK = 61, + SAVEREGISTERS = 62, + INLINE = 63, + SAFECALL = 64, + NEAR = 65, + FAR = 66, + NUM_INT = 67, + INTEGER = 68, + SHORTINT = 69, + SMALLINT = 70, + LONGINT = 71, + INT64 = 72, + BYTE = 73, + WORD = 74, + CARDINAL = 75, + TQWORD = 76, + BOOLEAN = 77, + BYTEBOOL = 78, + LONGBOOL = 79, + CHAR = 80, + DOTDOT = 81, + ASSIGN = 82, + REAL = 83, + SINGLE = 84, + DOUBLE = 85, + EXTENDED = 86, + COMP = 87, + STRING = 88, + LBRACK = 89, + RBRACK = 90, + PACKED = 91, + RECORD = 92, + CASE = 93, + SET = 94, + FILE = 95, + POINTER = 96, + OBJECT = 97, + VIRTUAL = 98, + ABSTRACT = 99, + PRIVATE = 100, + PROTECTED = 101, + CONSTRUCTOR = 102, + DESTRUCTOR = 103, + CLASS = 104, + OVERRIDE = 105, + MESSAGE = 106, + PUBLISHED = 107, + PROPERTY = 108, + LITERAL_read = 109, + LITERAL_write = 110, + DEFAULT = 111, + LITERAL_nodefault = 112, + LE = 113, + GE = 114, + LTH = 115, + GT = 116, + NOT_EQUAL = 117, + IN = 118, + IS = 119, + PLUS = 120, + MINUS = 121, + OR = 122, + XOR = 123, + STAR = 124, + SLASH = 125, + DIV = 126, + MOD = 127, + AND = 128, + SHL = 129, + SHR = 130, + NOT = 131, + TRUE = 132, + FALSE = 133, + AT = 134, + PLUSEQ = 135, + MINUSEQ = 136, + STAREQ = 137, + SLASHQE = 138, + GOTO = 139, + IF = 140, + THEN = 141, + ELSE = 142, + WHILE = 143, + DO = 144, + REPEAT = 145, + UNTIL = 146, + FOR = 147, + TO = 148, + DOWNTO = 149, + WITH = 150, + LBRACK2 = 151, + RBRACK2 = 152, + OPERATOR = 153, + RAISE = 154, + TRY = 155, + EXCEPT = 156, + FINALLY = 157, + ON = 158, + STRING_LITERAL = 159, + CHR = 160, + NIL = 161, + NUM_REAL = 162, + IDENT = 163, + ABSOLUTE = 164, + AS = 165, + ASM = 166, + ASSEMBLER = 167, + BREAK = 168, + CONTINUE = 169, + DISPOSE = 170, + EXIT = 171, + INHERITED = 172, + NEW = 173, + SELF = 174, + TQT_METHOD = 175, + ADDSUBOR = 176, + ASSIGNEQUAL = 177, + SIGN = 178, + FUNC = 179, + NODE_NOT_EMIT = 180, + MYASTVAR = 181, + LF = 182, + LCURLY = 183, + RCURLY = 184, + WS = 185, + COMMENT_1 = 186, + COMMENT_2 = 187, + COMMENT_3 = 188, + EXPONENT = 189, + NULL_TREE_LOOKAHEAD = 3 + }; +#ifdef __cplusplus +}; +#endif +#endif /*INC_PascalStoreWalkerTokenTypes_h_*/ diff --git a/languages/pascal/PascalStoreWalkerTokenTypes.hpp b/languages/pascal/PascalStoreWalkerTokenTypes.hpp deleted file mode 100644 index cd9e0c81..00000000 --- a/languages/pascal/PascalStoreWalkerTokenTypes.hpp +++ /dev/null @@ -1,206 +0,0 @@ -#ifndef INC_PascalStoreWalkerTokenTypes_hpp_ -#define INC_PascalStoreWalkerTokenTypes_hpp_ - -/* $ANTLR 2.7.7 (20061129): "pascal.tree.g" -> "PascalStoreWalkerTokenTypes.hpp"$ */ - -#ifndef CUSTOM_API -# define CUSTOM_API -#endif - -#ifdef __cplusplus -struct CUSTOM_API PascalStoreWalkerTokenTypes { -#endif - enum { - EOF_ = 1, - BLOCK = 4, - IDLIST = 5, - ELIST = 6, - FUNC_CALL = 7, - PROC_CALL = 8, - SCALARTYPE = 9, - TYPELIST = 10, - VARIANT_TAG = 11, - VARIANT_TAG_NO_ID = 12, - VARIANT_CASE = 13, - CONSTLIST = 14, - FIELDLIST = 15, - ARGDECLS = 16, - VARDECL = 17, - ARGDECL = 18, - ARGLIST = 19, - TYPEDECL = 20, - FIELD = 21, - DOT = 22, - LIBRARY = 23, - SEMI = 24, - END = 25, - EXPORTS = 26, - COMMA = 27, - LITERAL_index = 28, - LITERAL_name = 29, - USES = 30, - UNIT = 31, - INTERFACE = 32, - IMPLEMENTATION = 33, - BEGIN = 34, - PROGRAM = 35, - LPAREN = 36, - RPAREN = 37, - INITIALIZATION = 38, - FINALIZATION = 39, - LABEL = 40, - CONST = 41, - RESOURCESTRING = 42, - EQUAL = 43, - TYPE = 44, - VAR = 45, - COLON = 46, - PROCEDURE = 47, - FORWARD = 48, - FUNCTION = 49, - ARRAY = 50, - OF = 51, - EXTERNAL = 52, - PUBLIC = 53, - ALIAS = 54, - INTERRUPT = 55, - EXPORT = 56, - REGISTER = 57, - PASCAL = 58, - CDECL = 59, - STDCALL = 60, - POPSTACK = 61, - SAVEREGISTERS = 62, - INLINE = 63, - SAFECALL = 64, - NEAR = 65, - FAR = 66, - NUM_INT = 67, - INTEGER = 68, - SHORTINT = 69, - SMALLINT = 70, - LONGINT = 71, - INT64 = 72, - BYTE = 73, - WORD = 74, - CARDINAL = 75, - TQWORD = 76, - BOOLEAN = 77, - BYTEBOOL = 78, - LONGBOOL = 79, - CHAR = 80, - DOTDOT = 81, - ASSIGN = 82, - REAL = 83, - SINGLE = 84, - DOUBLE = 85, - EXTENDED = 86, - COMP = 87, - STRING = 88, - LBRACK = 89, - RBRACK = 90, - PACKED = 91, - RECORD = 92, - CASE = 93, - SET = 94, - FILE = 95, - POINTER = 96, - OBJECT = 97, - VIRTUAL = 98, - ABSTRACT = 99, - PRIVATE = 100, - PROTECTED = 101, - CONSTRUCTOR = 102, - DESTRUCTOR = 103, - CLASS = 104, - OVERRIDE = 105, - MESSAGE = 106, - PUBLISHED = 107, - PROPERTY = 108, - LITERAL_read = 109, - LITERAL_write = 110, - DEFAULT = 111, - LITERAL_nodefault = 112, - LE = 113, - GE = 114, - LTH = 115, - GT = 116, - NOT_EQUAL = 117, - IN = 118, - IS = 119, - PLUS = 120, - MINUS = 121, - OR = 122, - XOR = 123, - STAR = 124, - SLASH = 125, - DIV = 126, - MOD = 127, - AND = 128, - SHL = 129, - SHR = 130, - NOT = 131, - TRUE = 132, - FALSE = 133, - AT = 134, - PLUSEQ = 135, - MINUSEQ = 136, - STAREQ = 137, - SLASHQE = 138, - GOTO = 139, - IF = 140, - THEN = 141, - ELSE = 142, - WHILE = 143, - DO = 144, - REPEAT = 145, - UNTIL = 146, - FOR = 147, - TO = 148, - DOWNTO = 149, - WITH = 150, - LBRACK2 = 151, - RBRACK2 = 152, - OPERATOR = 153, - RAISE = 154, - TRY = 155, - EXCEPT = 156, - FINALLY = 157, - ON = 158, - STRING_LITERAL = 159, - CHR = 160, - NIL = 161, - NUM_REAL = 162, - IDENT = 163, - ABSOLUTE = 164, - AS = 165, - ASM = 166, - ASSEMBLER = 167, - BREAK = 168, - CONTINUE = 169, - DISPOSE = 170, - EXIT = 171, - INHERITED = 172, - NEW = 173, - SELF = 174, - TQT_METHOD = 175, - ADDSUBOR = 176, - ASSIGNEQUAL = 177, - SIGN = 178, - FUNC = 179, - NODE_NOT_EMIT = 180, - MYASTVAR = 181, - LF = 182, - LCURLY = 183, - RCURLY = 184, - WS = 185, - COMMENT_1 = 186, - COMMENT_2 = 187, - COMMENT_3 = 188, - EXPONENT = 189, - NULL_TREE_LOOKAHEAD = 3 - }; -#ifdef __cplusplus -}; -#endif -#endif /*INC_PascalStoreWalkerTokenTypes_hpp_*/ diff --git a/languages/pascal/PascalTokenTypes.h b/languages/pascal/PascalTokenTypes.h new file mode 100644 index 00000000..42e97d53 --- /dev/null +++ b/languages/pascal/PascalTokenTypes.h @@ -0,0 +1,209 @@ +#ifndef INC_PascalTokenTypes_h_ +#define INC_PascalTokenTypes_h_ + +#undef TRUE +#undef FALSE + +/* $ANTLR 2.7.7 (20061129): "pascal.g" -> "PascalTokenTypes.h"$ */ + +#ifndef CUSTOM_API +# define CUSTOM_API +#endif + +#ifdef __cplusplus +struct CUSTOM_API PascalTokenTypes { +#endif + enum { + EOF_ = 1, + BLOCK = 4, + IDLIST = 5, + ELIST = 6, + FUNC_CALL = 7, + PROC_CALL = 8, + SCALARTYPE = 9, + TYPELIST = 10, + VARIANT_TAG = 11, + VARIANT_TAG_NO_ID = 12, + VARIANT_CASE = 13, + CONSTLIST = 14, + FIELDLIST = 15, + ARGDECLS = 16, + VARDECL = 17, + ARGDECL = 18, + ARGLIST = 19, + TYPEDECL = 20, + FIELD = 21, + DOT = 22, + LIBRARY = 23, + SEMI = 24, + END = 25, + EXPORTS = 26, + COMMA = 27, + LITERAL_index = 28, + LITERAL_name = 29, + USES = 30, + UNIT = 31, + INTERFACE = 32, + IMPLEMENTATION = 33, + BEGIN = 34, + PROGRAM = 35, + LPAREN = 36, + RPAREN = 37, + INITIALIZATION = 38, + FINALIZATION = 39, + LABEL = 40, + CONST = 41, + RESOURCESTRING = 42, + EQUAL = 43, + TYPE = 44, + VAR = 45, + COLON = 46, + PROCEDURE = 47, + FORWARD = 48, + FUNCTION = 49, + ARRAY = 50, + OF = 51, + EXTERNAL = 52, + PUBLIC = 53, + ALIAS = 54, + INTERRUPT = 55, + EXPORT = 56, + REGISTER = 57, + PASCAL = 58, + CDECL = 59, + STDCALL = 60, + POPSTACK = 61, + SAVEREGISTERS = 62, + INLINE = 63, + SAFECALL = 64, + NEAR = 65, + FAR = 66, + NUM_INT = 67, + INTEGER = 68, + SHORTINT = 69, + SMALLINT = 70, + LONGINT = 71, + INT64 = 72, + BYTE = 73, + WORD = 74, + CARDINAL = 75, + TQWORD = 76, + BOOLEAN = 77, + BYTEBOOL = 78, + LONGBOOL = 79, + CHAR = 80, + DOTDOT = 81, + ASSIGN = 82, + REAL = 83, + SINGLE = 84, + DOUBLE = 85, + EXTENDED = 86, + COMP = 87, + STRING = 88, + LBRACK = 89, + RBRACK = 90, + PACKED = 91, + RECORD = 92, + CASE = 93, + SET = 94, + FILE = 95, + POINTER = 96, + OBJECT = 97, + VIRTUAL = 98, + ABSTRACT = 99, + PRIVATE = 100, + PROTECTED = 101, + CONSTRUCTOR = 102, + DESTRUCTOR = 103, + CLASS = 104, + OVERRIDE = 105, + MESSAGE = 106, + PUBLISHED = 107, + PROPERTY = 108, + LITERAL_read = 109, + LITERAL_write = 110, + DEFAULT = 111, + LITERAL_nodefault = 112, + LE = 113, + GE = 114, + LTH = 115, + GT = 116, + NOT_EQUAL = 117, + IN = 118, + IS = 119, + PLUS = 120, + MINUS = 121, + OR = 122, + XOR = 123, + STAR = 124, + SLASH = 125, + DIV = 126, + MOD = 127, + AND = 128, + SHL = 129, + SHR = 130, + NOT = 131, + TRUE = 132, + FALSE = 133, + AT = 134, + PLUSEQ = 135, + MINUSEQ = 136, + STAREQ = 137, + SLASHQE = 138, + GOTO = 139, + IF = 140, + THEN = 141, + ELSE = 142, + WHILE = 143, + DO = 144, + REPEAT = 145, + UNTIL = 146, + FOR = 147, + TO = 148, + DOWNTO = 149, + WITH = 150, + LBRACK2 = 151, + RBRACK2 = 152, + OPERATOR = 153, + RAISE = 154, + TRY = 155, + EXCEPT = 156, + FINALLY = 157, + ON = 158, + STRING_LITERAL = 159, + CHR = 160, + NIL = 161, + NUM_REAL = 162, + IDENT = 163, + ABSOLUTE = 164, + AS = 165, + ASM = 166, + ASSEMBLER = 167, + BREAK = 168, + CONTINUE = 169, + DISPOSE = 170, + EXIT = 171, + INHERITED = 172, + NEW = 173, + SELF = 174, + TQT_METHOD = 175, + ADDSUBOR = 176, + ASSIGNEQUAL = 177, + SIGN = 178, + FUNC = 179, + NODE_NOT_EMIT = 180, + MYASTVAR = 181, + LF = 182, + LCURLY = 183, + RCURLY = 184, + WS = 185, + COMMENT_1 = 186, + COMMENT_2 = 187, + COMMENT_3 = 188, + EXPONENT = 189, + NULL_TREE_LOOKAHEAD = 3 + }; +#ifdef __cplusplus +}; +#endif +#endif /*INC_PascalTokenTypes_h_*/ diff --git a/languages/pascal/PascalTokenTypes.hpp b/languages/pascal/PascalTokenTypes.hpp deleted file mode 100644 index 007269b0..00000000 --- a/languages/pascal/PascalTokenTypes.hpp +++ /dev/null @@ -1,209 +0,0 @@ -#ifndef INC_PascalTokenTypes_hpp_ -#define INC_PascalTokenTypes_hpp_ - -#undef TRUE -#undef FALSE - -/* $ANTLR 2.7.7 (20061129): "pascal.g" -> "PascalTokenTypes.hpp"$ */ - -#ifndef CUSTOM_API -# define CUSTOM_API -#endif - -#ifdef __cplusplus -struct CUSTOM_API PascalTokenTypes { -#endif - enum { - EOF_ = 1, - BLOCK = 4, - IDLIST = 5, - ELIST = 6, - FUNC_CALL = 7, - PROC_CALL = 8, - SCALARTYPE = 9, - TYPELIST = 10, - VARIANT_TAG = 11, - VARIANT_TAG_NO_ID = 12, - VARIANT_CASE = 13, - CONSTLIST = 14, - FIELDLIST = 15, - ARGDECLS = 16, - VARDECL = 17, - ARGDECL = 18, - ARGLIST = 19, - TYPEDECL = 20, - FIELD = 21, - DOT = 22, - LIBRARY = 23, - SEMI = 24, - END = 25, - EXPORTS = 26, - COMMA = 27, - LITERAL_index = 28, - LITERAL_name = 29, - USES = 30, - UNIT = 31, - INTERFACE = 32, - IMPLEMENTATION = 33, - BEGIN = 34, - PROGRAM = 35, - LPAREN = 36, - RPAREN = 37, - INITIALIZATION = 38, - FINALIZATION = 39, - LABEL = 40, - CONST = 41, - RESOURCESTRING = 42, - EQUAL = 43, - TYPE = 44, - VAR = 45, - COLON = 46, - PROCEDURE = 47, - FORWARD = 48, - FUNCTION = 49, - ARRAY = 50, - OF = 51, - EXTERNAL = 52, - PUBLIC = 53, - ALIAS = 54, - INTERRUPT = 55, - EXPORT = 56, - REGISTER = 57, - PASCAL = 58, - CDECL = 59, - STDCALL = 60, - POPSTACK = 61, - SAVEREGISTERS = 62, - INLINE = 63, - SAFECALL = 64, - NEAR = 65, - FAR = 66, - NUM_INT = 67, - INTEGER = 68, - SHORTINT = 69, - SMALLINT = 70, - LONGINT = 71, - INT64 = 72, - BYTE = 73, - WORD = 74, - CARDINAL = 75, - TQWORD = 76, - BOOLEAN = 77, - BYTEBOOL = 78, - LONGBOOL = 79, - CHAR = 80, - DOTDOT = 81, - ASSIGN = 82, - REAL = 83, - SINGLE = 84, - DOUBLE = 85, - EXTENDED = 86, - COMP = 87, - STRING = 88, - LBRACK = 89, - RBRACK = 90, - PACKED = 91, - RECORD = 92, - CASE = 93, - SET = 94, - FILE = 95, - POINTER = 96, - OBJECT = 97, - VIRTUAL = 98, - ABSTRACT = 99, - PRIVATE = 100, - PROTECTED = 101, - CONSTRUCTOR = 102, - DESTRUCTOR = 103, - CLASS = 104, - OVERRIDE = 105, - MESSAGE = 106, - PUBLISHED = 107, - PROPERTY = 108, - LITERAL_read = 109, - LITERAL_write = 110, - DEFAULT = 111, - LITERAL_nodefault = 112, - LE = 113, - GE = 114, - LTH = 115, - GT = 116, - NOT_EQUAL = 117, - IN = 118, - IS = 119, - PLUS = 120, - MINUS = 121, - OR = 122, - XOR = 123, - STAR = 124, - SLASH = 125, - DIV = 126, - MOD = 127, - AND = 128, - SHL = 129, - SHR = 130, - NOT = 131, - TRUE = 132, - FALSE = 133, - AT = 134, - PLUSEQ = 135, - MINUSEQ = 136, - STAREQ = 137, - SLASHQE = 138, - GOTO = 139, - IF = 140, - THEN = 141, - ELSE = 142, - WHILE = 143, - DO = 144, - REPEAT = 145, - UNTIL = 146, - FOR = 147, - TO = 148, - DOWNTO = 149, - WITH = 150, - LBRACK2 = 151, - RBRACK2 = 152, - OPERATOR = 153, - RAISE = 154, - TRY = 155, - EXCEPT = 156, - FINALLY = 157, - ON = 158, - STRING_LITERAL = 159, - CHR = 160, - NIL = 161, - NUM_REAL = 162, - IDENT = 163, - ABSOLUTE = 164, - AS = 165, - ASM = 166, - ASSEMBLER = 167, - BREAK = 168, - CONTINUE = 169, - DISPOSE = 170, - EXIT = 171, - INHERITED = 172, - NEW = 173, - SELF = 174, - TQT_METHOD = 175, - ADDSUBOR = 176, - ASSIGNEQUAL = 177, - SIGN = 178, - FUNC = 179, - NODE_NOT_EMIT = 180, - MYASTVAR = 181, - LF = 182, - LCURLY = 183, - RCURLY = 184, - WS = 185, - COMMENT_1 = 186, - COMMENT_2 = 187, - COMMENT_3 = 188, - EXPONENT = 189, - NULL_TREE_LOOKAHEAD = 3 - }; -#ifdef __cplusplus -}; -#endif -#endif /*INC_PascalTokenTypes_hpp_*/ diff --git a/languages/pascal/backgroundparser.cpp b/languages/pascal/backgroundparser.cpp index ff202374..df9c85dc 100644 --- a/languages/pascal/backgroundparser.cpp +++ b/languages/pascal/backgroundparser.cpp @@ -13,12 +13,12 @@ #include "backgroundparser.h" #include "problemreporter.h" -#include "PascalLexer.hpp" -#include "PascalParser.hpp" -#include "PascalAST.hpp" +#include "PascalLexer.h" +#include "PascalParser.h" +#include "PascalAST.h" #include #include -#include +#include BackgroundParser::BackgroundParser( ProblemReporter* reporter, const TQString& source, diff --git a/languages/pascal/pascal.g b/languages/pascal/pascal.g index fde5dcb8..59407423 100644 --- a/languages/pascal/pascal.g +++ b/languages/pascal/pascal.g @@ -28,7 +28,7 @@ header "pre_include_hpp" { #include "problemreporter.h" - #include "PascalAST.hpp" + #include "PascalAST.h" #include #include diff --git a/languages/pascal/pascal.tree.g b/languages/pascal/pascal.tree.g index c597afb8..d90503c4 100644 --- a/languages/pascal/pascal.tree.g +++ b/languages/pascal/pascal.tree.g @@ -19,7 +19,7 @@ header "pre_include_hpp" { #include - #include "PascalAST.hpp" + #include "PascalAST.h" #include #include diff --git a/languages/pascal/pascalsupport_part.cpp b/languages/pascal/pascalsupport_part.cpp index 69cbebf8..a61ab6a0 100644 --- a/languages/pascal/pascalsupport_part.cpp +++ b/languages/pascal/pascalsupport_part.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include "catalog.h" #include @@ -31,9 +31,9 @@ #include "pascalsupport_part.h" #include "problemreporter.h" -#include "PascalLexer.hpp" -#include "PascalParser.hpp" -#include "PascalStoreWalker.hpp" +#include "PascalLexer.h" +#include "PascalParser.h" +#include "PascalStoreWalker.h" struct PascalSupportPartData{ ProblemReporter* problemReporter; -- cgit v1.2.3