Package com.javacc.preprocessor
Class PreprocessorParser
java.lang.Object
com.javacc.preprocessor.PreprocessorParser
- All Implemented Interfaces:
PreprocessorConstants
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.javacc.preprocessor.PreprocessorConstants
PreprocessorConstants.LexicalState, PreprocessorConstants.TokenType -
Field Summary
FieldsFields inherited from interface com.javacc.preprocessor.PreprocessorConstants
BUF_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionConstructor with user supplied Lexer.PreprocessorParser(InputStream stream) PreprocessorParser(Reader reader) PreprocessorParser(CharSequence content) PreprocessorParser(CharSequence content, Map<String, String> definedSymbols) PreprocessorParser(String inputSource, CharSequence content) PreprocessorParser(String inputSource, Path path) PreprocessorParser(Path path) PreprocessorParser(Path path, Map<String, String> definedSymbols, boolean csharpMode) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSymbols(Map<String, String> symbols) voidcancel()final Tokenfinal TokengetToken(int index) booleanbooleanbooleanfinal com.javacc.preprocessor.PreprocessorParser.Expressionfinal voidPP_Block()final voidfinal voidfinal com.javacc.preprocessor.PreprocessorParser.Expressionfinal voidfinal com.javacc.preprocessor.PreprocessorParser.Expressionfinal com.javacc.preprocessor.PreprocessorParser.Expressionfinal com.javacc.preprocessor.PreprocessorParser.Expressionfinal com.javacc.preprocessor.PreprocessorParser.Expressionfinal BitSetPP_Root()final voidvoidsetInputSource(String inputSource) voidsetParserTolerant(boolean tolerantParsing) voidvoidunsetSymbol(String symbol)
-
Field Details
-
token_source
Generated Lexer.
-
-
Constructor Details
-
PreprocessorParser
public PreprocessorParser(Path path, Map<String, String> definedSymbols, boolean csharpMode) throws IOException- Throws:
IOException
-
PreprocessorParser
public PreprocessorParser(CharSequence content, Map<String, String> definedSymbols) throws IOException- Throws:
IOException
-
PreprocessorParser
-
PreprocessorParser
-
PreprocessorParser
- Parameters:
inputSource- just the name of the input source (typically the filename) that will be used in error messages and so on.path- The location (typically the filename) from which to get the input to parse- Throws:
IOException
-
PreprocessorParser
- Parameters:
path- The location (typically the filename) from which to get the input to parse- Throws:
IOException
-
PreprocessorParser
-
PreprocessorParser
-
PreprocessorParser
Constructor with user supplied Lexer.
-
-
Method Details
-
getLineMarkers
-
setSymbol
-
unsetSymbol
-
addSymbols
-
cancel
public void cancel() -
isCancelled
public boolean isCancelled() -
setInputSource
-
getNextToken
- Returns:
- the next Token off the stream. This is the same as #getToken(1)
-
getToken
- Parameters:
index- how many tokens to look ahead- Returns:
- the specific regular (i.e. parsed) Token index ahead/behind in the stream. If we are in a lookahead, it looks ahead from the currentLookaheadToken Otherwise, it is the lastConsumedToken. If you pass in a negative number it goes backward.
-
PP_Root
- Throws:
ParseException
-
PP_Block
- Throws:
ParseException
-
PP_Content
- Throws:
ParseException
-
PP_IfBlock
- Throws:
ParseException
-
PP_DefStatement
- Throws:
ParseException
-
PP_UndefStatement
- Throws:
ParseException
-
PP_Expression
public final com.javacc.preprocessor.PreprocessorParser.Expression PP_Expression() throws ParseException- Throws:
ParseException
-
PP_OrExpression
public final com.javacc.preprocessor.PreprocessorParser.Expression PP_OrExpression() throws ParseException- Throws:
ParseException
-
PP_AndExpression
public final com.javacc.preprocessor.PreprocessorParser.Expression PP_AndExpression() throws ParseException- Throws:
ParseException
-
PP_NotExpression
public final com.javacc.preprocessor.PreprocessorParser.Expression PP_NotExpression() throws ParseException- Throws:
ParseException
-
PP_Parentheses
public final com.javacc.preprocessor.PreprocessorParser.Expression PP_Parentheses() throws ParseException- Throws:
ParseException
-
PP_PrimaryExpression
public final com.javacc.preprocessor.PreprocessorParser.Expression PP_PrimaryExpression() throws ParseException- Throws:
ParseException
-
isParserTolerant
public boolean isParserTolerant() -
setParserTolerant
public void setParserTolerant(boolean tolerantParsing) -
isTreeBuildingEnabled
public boolean isTreeBuildingEnabled()
-