Package org.javacc.parser
Class TokenProduction
- java.lang.Object
-
- org.javacc.parser.TokenProduction
-
public class TokenProduction extends java.lang.ObjectDescribes the various regular expression productions.
-
-
Field Summary
Fields Modifier and Type Field Description private intcolumnThe starting line and column of this token production.TokenfirstTokenThe first and last tokens from the input stream that represent this production.booleanignoreCaseThis is true if case is to be ignored within the regular expressions of this token production.booleanisExplicitThis is true if this corresponds to a production that actually appears in the input grammar.intkindThe kind of this token production - TOKEN, SKIP, MORE, or SPECIAL.static java.lang.String[]kindImageThe image of the above constants.TokenlastTokenThe first and last tokens from the input stream that represent this production.java.lang.String[]lexStatesThe states in which this regular expression production exists.private intlinestatic intMOREjava.util.List<RegExprSpec>respecsThe list of regular expression specifications that comprise this production.static intSKIPstatic intSPECIALstatic intTOKENDefinitions of constants that identify the kind of regular expression production this is.
-
Constructor Summary
Constructors Constructor Description TokenProduction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumn()intgetLine()voidsetColumn(int column)voidsetLine(int line)java.lang.StringtoString()
-
-
-
Field Detail
-
TOKEN
public static final int TOKEN
Definitions of constants that identify the kind of regular expression production this is.- See Also:
- Constant Field Values
-
SKIP
public static final int SKIP
- See Also:
- Constant Field Values
-
MORE
public static final int MORE
- See Also:
- Constant Field Values
-
SPECIAL
public static final int SPECIAL
- See Also:
- Constant Field Values
-
kindImage
public static final java.lang.String[] kindImage
The image of the above constants.
-
column
private int column
The starting line and column of this token production.
-
line
private int line
-
lexStates
public java.lang.String[] lexStates
The states in which this regular expression production exists. If this array is null, then "<*>" has been specified and this regular expression exists in all states. However, this null value is replaced by a String array that includes all lexical state names during the semanticization phase.
-
kind
public int kind
The kind of this token production - TOKEN, SKIP, MORE, or SPECIAL.
-
respecs
public java.util.List<RegExprSpec> respecs
The list of regular expression specifications that comprise this production. Each entry is a "RegExprSpec".
-
isExplicit
public boolean isExplicit
This is true if this corresponds to a production that actually appears in the input grammar. Otherwise (if this is created to describe a regular expression that is part of the BNF) this is set to false.
-
ignoreCase
public boolean ignoreCase
This is true if case is to be ignored within the regular expressions of this token production.
-
firstToken
public Token firstToken
The first and last tokens from the input stream that represent this production.
-
lastToken
public Token lastToken
The first and last tokens from the input stream that represent this production.
-
-
Method Detail
-
setLine
public void setLine(int line)
- Parameters:
line- the line to set
-
getLine
public int getLine()
- Returns:
- the line
-
setColumn
public void setColumn(int column)
- Parameters:
column- the column to set
-
getColumn
public int getColumn()
- Returns:
- the column
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-