Class AbstractParser

  • All Implemented Interfaces:
    Parser

    public abstract class AbstractParser
    extends Object
    implements Parser
    This is a generic implementation of the Parser interface.
    See Also:
    Parser
    • Constructor Detail

      • AbstractParser

        public AbstractParser​(ParserOptions parserOptions)
    • Method Detail

      • getTokenManager

        public TokenManager getTokenManager​(String fileName,
                                            Reader source)
        Description copied from interface: Parser
        Get a TokenManager for the given source.
        Specified by:
        getTokenManager in interface Parser
        Parameters:
        fileName - The file name being parsed (may be null).
        source - Reader that provides the source code to tokenize.
        Returns:
        A TokenManager for reading token.
      • createTokenManager

        protected abstract TokenManager createTokenManager​(Reader source)