Class PreprocessorParser

java.lang.Object
com.javacc.preprocessor.PreprocessorParser
All Implemented Interfaces:
PreprocessorConstants

public class PreprocessorParser extends Object implements PreprocessorConstants
  • Field Details

  • 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

      public PreprocessorParser(String inputSource, CharSequence content)
    • PreprocessorParser

      public PreprocessorParser(CharSequence content)
    • PreprocessorParser

      public PreprocessorParser(String inputSource, Path path) throws IOException
      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

      public PreprocessorParser(Path path) throws IOException
      Parameters:
      path - The location (typically the filename) from which to get the input to parse
      Throws:
      IOException
    • PreprocessorParser

      public PreprocessorParser(InputStream stream)
    • PreprocessorParser

      public PreprocessorParser(Reader reader)
    • PreprocessorParser

      public PreprocessorParser(PreprocessorLexer lexer)
      Constructor with user supplied Lexer.
  • Method Details

    • getLineMarkers

      public BitSet getLineMarkers()
    • setSymbol

      public void setSymbol(String symbol, String value)
    • unsetSymbol

      public void unsetSymbol(String symbol)
    • addSymbols

      public void addSymbols(Map<String,String> symbols)
    • cancel

      public void cancel()
    • isCancelled

      public boolean isCancelled()
    • setInputSource

      public void setInputSource(String inputSource)
    • getNextToken

      public final Token getNextToken()
      Returns:
      the next Token off the stream. This is the same as #getToken(1)
    • getToken

      public final Token getToken(int index)
      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

      public final BitSet PP_Root() throws ParseException
      Throws:
      ParseException
    • PP_Block

      public final void PP_Block() throws ParseException
      Throws:
      ParseException
    • PP_Content

      public final void PP_Content() throws ParseException
      Throws:
      ParseException
    • PP_IfBlock

      public final void PP_IfBlock() throws ParseException
      Throws:
      ParseException
    • PP_DefStatement

      public final void PP_DefStatement() throws ParseException
      Throws:
      ParseException
    • PP_UndefStatement

      public final void PP_UndefStatement() throws ParseException
      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()