Package jminusminus
Class JavaCCParser
java.lang.Object
jminusminus.JavaCCParser
- All Implemented Interfaces:
- JavaCCParserConstants
Parser generated by JavaCC. It parses a j-- compilation unit (program file), taking tokens from
 the scanner (also generated by JavaCC), and produces an abstract syntax tree (AST) for it.
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescription(package private) SimpleCharStreamNext token.Current token.Generated Token Manager.Fields inherited from interface jminusminus.JavaCCParserConstantsABSTRACT, ASSIGN, BEGIN_COMMENT, BOOLEAN, CHAR, CHAR_LITERAL, CLASS, COMMA, COMMENT, DEC, DEFAULT, DIGIT, DOT, ELSE, END_COMMENT, EOF, EQUAL, ERROR, ESC, EXTENDS, FALSE, GT, IDENTIFIER, IF, IMPORT, IN_SINGLE_LINE_COMMENT, INC, INSTANCEOF, INT, INT_LITERAL, LAND, LBRACK, LCURLY, LE, LETTER, LNOT, LPAREN, MINUS, NEW, NULL, PACKAGE, PLUS, PLUS_ASSIGN, PRIVATE, PROTECTED, PUBLIC, RBRACK, RCURLY, RETURN, RPAREN, SEMI, STAR, STATIC, STRING_LITERAL, SUPER, THIS, tokenImage, TRUE, VOID, WHILE
- 
Constructor SummaryConstructorsConstructorDescriptionJavaCCParser(InputStream stream) Constructor with InputStream.JavaCCParser(InputStream stream, String encoding) Constructor with InputStream and supplied encodingJavaCCParser(Reader stream) Constructor.Constructor with generated Token Manager.
- 
Method SummaryModifier and TypeMethodDescriptionfinal JCompilationUnitfinal voidDisable tracing.final voidEnable tracing.booleanReturnstrueif a parser error has occurred up to now, andfalseotherwise.voidSets the name of the file being parsed.Generate ParseException.final TokenGet the next Token.final TokengetToken(int index) Get the specific Token.voidReInit(InputStream stream) Reinitialise.voidReInit(InputStream stream, String encoding) Reinitialise.voidReinitialise.voidReinitialise.final booleanTrace enabled.
- 
Field Details- 
token_sourceGenerated Token Manager.
- 
jj_input_streamSimpleCharStream jj_input_stream
- 
tokenCurrent token.
- 
jj_ntNext token.
 
- 
- 
Constructor Details- 
JavaCCParserConstructor with InputStream.
- 
JavaCCParserConstructor with InputStream and supplied encoding
- 
JavaCCParserConstructor.
- 
JavaCCParserConstructor with generated Token Manager.
 
- 
- 
Method Details- 
fileNameSets the name of the file being parsed.- Parameters:
- fileName- name of the file being parsed.
 
- 
errorHasOccurredpublic boolean errorHasOccurred()Returnstrueif a parser error has occurred up to now, andfalseotherwise.- Returns:
- trueif a parser error has occurred up to now, and- falseotherwise.
 
- 
compilationUnit- Throws:
- ParseException
 
- 
ReInitReinitialise.
- 
ReInitReinitialise.
- 
ReInitReinitialise.
- 
ReInitReinitialise.
- 
getNextTokenGet the next Token.
- 
getTokenGet the specific Token.
- 
generateParseExceptionGenerate ParseException.
- 
trace_enabledpublic final boolean trace_enabled()Trace enabled.
- 
enable_tracingpublic final void enable_tracing()Enable tracing.
- 
disable_tracingpublic final void disable_tracing()Disable tracing.
 
-