public class JavaCCGlobals extends Object
Modifier and Type | Field and Description |
---|---|
static List<NormalProduction> |
bnfproductions
A list of all grammar productions - normal and JAVACODE - in the order
they appear in the input file.
|
protected static int |
ccol |
protected static int |
cline |
static List<Token> |
cu_from_insertion_point_2
This is the list of all tokens that appear after the tokens in
"cu_to_insertion_point_2" and until "PARSER_END(name)".
|
static String |
cu_name
The name of the parser class (what appears in PARSER_BEGIN and PARSER_END).
|
static List<Token> |
cu_to_insertion_point_1
This is a list of tokens that appear after "PARSER_BEGIN(name)" all the
way until (but not including) the opening brace "{" of the class "name".
|
static List<Token> |
cu_to_insertion_point_2
This is the list of all tokens that appear after the tokens in
"cu_to_insertion_point_1" and until (but not including) the closing brace "}"
of the class "name".
|
static String |
fileName
The name of the grammar file being processed.
|
protected static int |
jj2index |
static boolean |
jjtreeGenerated
Set to true if this file has been processed by JJTree.
|
static Hashtable<Integer,String> |
lexstate_I2S
A mapping of the internal integer representations of lexical states to
their strings.
|
static Hashtable<String,Integer> |
lexstate_S2I
A mapping of lexical state strings to their integer internal representation.
|
static boolean |
lookaheadNeeded |
protected static int |
maskindex
maskindex, jj2index, maskVals are variables that are shared between
ParseEngine and ParseGen.
|
protected static List |
maskVals |
static Map |
named_tokens_table
This is a symbol table that contains all named tokens (those that are
defined with a label).
|
static Map<Integer,String> |
names_of_tokens
A mapping of ordinal values (represented as objects of type "Integer") to
the corresponding labels (of type "String").
|
static List<RegularExpression> |
ordered_named_tokens
Contains the same entries as "named_tokens_table", but this is an ordered
list which is ordered by the order of appearance in the input file.
|
static String |
origFileName
The name of the original file (before processing by JJTree).
|
static Token |
otherLanguageDeclTokenBeg |
static Token |
otherLanguageDeclTokenEnd |
static Map |
production_table
A symbol table of all grammar productions - normal and JAVACODE.
|
static List<TokenProduction> |
rexprlist
The list of all TokenProductions from the input file.
|
static Map<Integer,RegularExpression> |
rexps_of_tokens
A mapping of ordinal values (represented as objects of type "Integer") to
the corresponding RegularExpression's.
|
static Hashtable |
simple_tokens_table
This is a three-level symbol table that contains all simple tokens (those
that are defined using a single string (with or without a label).
|
static List |
token_mgr_decls
The declarations to be inserted into the TokenManager class.
|
static int |
tokenCount
The total number of distinct tokens.
|
protected static String |
toolName
String that identifies the JavaCC generated files.
|
static List<String> |
toolNames
The list of tools that have participated in generating the
input grammar file.
|
Constructor and Description |
---|
JavaCCGlobals() |
Modifier and Type | Method and Description |
---|---|
static String |
add_escapes(String str) |
static String |
addUnicodeEscapes(String str) |
static void |
bannerLine(String fullName,
String ver)
This prints the banner line when the various tools are invoked.
|
static void |
createOutputDir(File outputDir) |
static String |
getIdString(List<String> toolNames,
String fileName)
Returns the identifying string for the file name, given a set of tool
names that are used to generate it.
|
static String |
getIdString(String toolName,
String fileName)
Returns the identifying string for the file name, given a toolname
used to generate it.
|
static List<String> |
getToolNames(String fileName)
Returns a List of names of the tools that have been used to generate
the given file.
|
static boolean |
isGeneratedBy(String toolName,
String fileName)
Returns true if tool name passed is one of the tool names returned
by getToolNames(fileName).
|
protected static String |
printLeadingComments(Token t) |
protected static void |
printLeadingComments(Token t,
PrintWriter ostr) |
protected static String |
printToken(Token t) |
protected static void |
printToken(Token t,
PrintWriter ostr) |
protected static void |
printTokenList(List<Token> list,
PrintWriter ostr) |
protected static String |
printTokenOnly(Token t) |
protected static void |
printTokenOnly(Token t,
PrintWriter ostr) |
protected static void |
printTokenSetup(Token t) |
protected static String |
printTrailingComments(Token t) |
protected static void |
printTrailingComments(Token t,
PrintWriter ostr) |
static void |
reInit() |
static String |
staticOpt() |
protected static final String toolName
public static String fileName
public static String origFileName
public static boolean jjtreeGenerated
public static List<String> toolNames
public static String cu_name
public static List<Token> cu_to_insertion_point_1
public static List<Token> cu_to_insertion_point_2
public static List<Token> cu_from_insertion_point_2
public static List<NormalProduction> bnfproductions
public static Map production_table
public static Hashtable<String,Integer> lexstate_S2I
public static Hashtable<Integer,String> lexstate_I2S
public static List token_mgr_decls
public static List<TokenProduction> rexprlist
public static int tokenCount
public static Map named_tokens_table
public static List<RegularExpression> ordered_named_tokens
public static Map<Integer,String> names_of_tokens
public static Map<Integer,RegularExpression> rexps_of_tokens
public static Hashtable simple_tokens_table
protected static int maskindex
protected static int jj2index
public static boolean lookaheadNeeded
protected static List maskVals
public static Token otherLanguageDeclTokenBeg
public static Token otherLanguageDeclTokenEnd
protected static int cline
protected static int ccol
public static void bannerLine(String fullName, String ver)
public static String getIdString(String toolName, String fileName)
public static String getIdString(List<String> toolNames, String fileName)
public static boolean isGeneratedBy(String toolName, String fileName)
public static List<String> getToolNames(String fileName)
public static void createOutputDir(File outputDir)
public static String staticOpt()
protected static void printTokenSetup(Token t)
protected static void printTokenOnly(Token t, PrintWriter ostr)
protected static void printToken(Token t, PrintWriter ostr)
protected static void printTokenList(List<Token> list, PrintWriter ostr)
protected static void printLeadingComments(Token t, PrintWriter ostr)
protected static void printTrailingComments(Token t, PrintWriter ostr)
public static void reInit()
Copyright © 1996–2020 javacc.org. All rights reserved.