Package org.javacc.parser
Class LexGen
java.lang.Object
org.javacc.parser.CodeGenerator
org.javacc.parser.LexGen
- All Implemented Interfaces:
JavaCCParserConstants
- Direct Known Subclasses:
LexGenCPP
Generate lexer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Action[]static boolean[]static int[]static boolean[]static intstatic RegularExpressionstatic intstatic Stringstatic booleanstatic booleanstatic booleanstatic boolean[]static boolean[]static NfaStatestatic int[]static Hashtablestatic booleanstatic intstatic String[]static int[]static Stringstatic intstatic int[]static intstatic boolean[]static RegularExpression[]static boolean[]static intstatic Stringstatic TokenizerDatastatic Stringstatic long[]static long[]static long[]static intstatic long[]Fields inherited from class org.javacc.parser.CodeGenerator
ccol, cline, includeBuffer, mainBuffer, outputBuffer, staticsBufferFields inherited from interface org.javacc.parser.JavaCCParserConstants
_CPPCODE, _DEFAULT, _EOF, _IGNORE_CASE, _JAVACODE, _LOOKAHEAD, _MORE, _PARSER_BEGIN, _PARSER_END, _SKIP, _SPECIAL_TOKEN, _TOKEN, _TOKEN_MGR_DECLS, ABSTRACT, ACT_TOK, AFTER_EGEN, ANDASSIGN, ASSERT, ASSIGN, BANG, BINARY_LITERAL, BIT_AND, BIT_OR, BOOLEAN, BREAK, BYTE, CASE, CATCH, CHAR, CHARACTER_LITERAL, CLASS, COLON, COMMA, CONST, CONTINUE, DECIMAL_EXPONENT, DECIMAL_FLOATING_POINT_LITERAL, DECIMAL_LITERAL, DECR, DEFAULT, DO, DOT, DOUBLE, DOUBLECOLON, ELSE, ENUM, EOF, EQ, EXTENDS, FALSE, FINAL, FINALLY, FLOAT, FLOATING_POINT_LITERAL, FOR, FORMAL_COMMENT, GE, GOTO, GT, HEX_LITERAL, HEXADECIMAL_EXPONENT, HEXADECIMAL_FLOATING_POINT_LITERAL, HOOK, IDENTIFIER, IF, IMPLEMENTS, IMPORT, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, INCR, INSTANCEOF, INT, INTEGER_LITERAL, INTERFACE, LANGLE, LBRACE, LBRACKET, LE, LETTER, LONG, LPAREN, LT, MINUS, MINUSASSIGN, MULTI_LINE_COMMENT, NATIVE, NE, NEW, NULL, OCTAL_LITERAL, ORASSIGN, PACKAGE, PART_LETTER, PLUS, PLUSASSIGN, PRIVATE, PROTECTED, PUBLIC, RANGLE, RBRACE, RBRACKET, REM, REMASSIGN, RETURN, RPAREN, RSIGNEDSHIFT, RUNSIGNEDSHIFT, SC_AND, SC_OR, SEMICOLON, SHORT, SINGLE_LINE_COMMENT, SLASH, SLASHASSIGN, STAR, STARASSIGN, STATIC, STRICTFP, STRING_LITERAL, SUPER, SWITCH, SYNCHRONIZED, TEMPLATE, THIS, THROW, THROWS, TILDE, tokenImage, TRANSIENT, TRUE, TRY, TYPENAME, VOID, VOLATILE, WHILE, XOR, XORASSIGN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAddCharToSkip(char c, int kind) voidvoidvoidstatic voidreInit()voidstart()protected voidwriteTemplate(String name, Object... additionalOptions) Methods inherited from class org.javacc.parser.CodeGenerator
genAnnotation, genClassStart, genCode, genCodeLine, generateMethodDefHeader, generateMethodDefHeader, genModifier, genStringLiteralArrayCPP, genStringLiteralInCPP, getCharStreamName, getClassQualifier, getGeneratedCode, getLeadingComments, getStringForTokenOnly, getStringToPrint, getTrailingComments, isJavaLanguage, printLeadingComments, printToken, printTokenList, printTokenOnly, printTokenSetup, printTrailingComments, saveOutput, saveOutput, switchToIncludeFile, switchToMainFile, switchToStaticsFile, writeTemplate
-
Field Details
-
staticString
-
tokMgrClassName
-
lexStateIndex
public static int lexStateIndex -
maxOrdinal
public static int maxOrdinal -
lexStateSuffix
-
lexStates
public static int[] lexStates -
ignoreCase
public static boolean[] ignoreCase -
actions
-
initStates
-
stateSetSize
public static int stateSetSize -
totalNumStates
public static int totalNumStates -
maxLexStates
public static int maxLexStates -
lexStateName
-
toSkip
public static long[] toSkip -
toSpecial
public static long[] toSpecial -
toMore
public static long[] toMore -
toToken
public static long[] toToken -
defaultLexState
public static int defaultLexState -
rexprs
-
maxLongsReqd
public static int[] maxLongsReqd -
initMatch
public static int[] initMatch -
canMatchAnyChar
public static int[] canMatchAnyChar -
hasEmptyMatch
public static boolean hasEmptyMatch -
canLoop
public static boolean[] canLoop -
stateHasActions
public static boolean[] stateHasActions -
hasLoop
public static boolean hasLoop -
canReachOnMore
public static boolean[] canReachOnMore -
hasNfa
public static boolean[] hasNfa -
mixed
public static boolean[] mixed -
initialState
-
curKind
public static int curKind -
curRE
-
keepLineCol
public static boolean keepLineCol -
errorHandlingClass
-
tokenizerData
-
generateDataOnly
public static boolean generateDataOnly
-
-
Constructor Details
-
LexGen
public LexGen()
-
-
Method Details
-
writeTemplate
- Throws:
IOException
-
AddCharToSkip
public static void AddCharToSkip(char c, int kind) -
start
- Throws:
IOException
-
DumpSkipActions
public void DumpSkipActions() -
DumpMoreActions
public void DumpMoreActions() -
DumpTokenActions
public void DumpTokenActions() -
reInit
public static void reInit()
-