com.aptana.ide.editor.text
Class GenericParserBase

java.lang.Object
  extended by com.aptana.ide.parsing.AbstractParser
      extended by com.aptana.ide.editors.unified.parsing.AbstractUnifiedParser
          extended by com.aptana.ide.editor.text.GenericParserBase
All Implemented Interfaces:
IParser

public class GenericParserBase
extends AbstractUnifiedParser

Author:
Kevin Sawicki (ksawicki@aptana.com)

Field Summary
 
Fields inherited from class com.aptana.ide.parsing.AbstractParser
currentLexeme, EOS
 
Constructor Summary
GenericParserBase(java.lang.String language)
           
 
Method Summary
protected  ITokenList createLanguageTokenList()
          createLanguageTokenList
 IParseState createParseState(IParseState parent)
          Create a single parse state for this language.
 void initializeLexer()
          Perform any initializations on the lexer now that it has been created
 void parseAll(IParseNode parentNode)
          parseOneStatement
 
Methods inherited from class com.aptana.ide.editors.unified.parsing.AbstractUnifiedParser
addLexerGrammar
 
Methods inherited from class com.aptana.ide.parsing.AbstractParser
addChildParser, addChildParsers, addGrammars, addLexeme, advance, assertAndAdvance, assertInSet, assertType, changeLanguage, flushCache, getEndingOffset, getLanguage, getLanguageChangeListener, getLexemeList, getLexer, getNextLexemeInLanguage, getParseNodeFactory, getParserForMimeType, getParseState, hasParent, initializeLexers, inSet, isEOS, isType, parse, removeLexeme, setLanguageChangeListener, throwParseError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericParserBase

public GenericParserBase(java.lang.String language)
                  throws ParserInitializationException
Parameters:
language -
Throws:
ParserInitializationException
Method Detail

createLanguageTokenList

protected ITokenList createLanguageTokenList()
Description copied from class: AbstractParser
createLanguageTokenList

Specified by:
createLanguageTokenList in class AbstractParser
Returns:
ITokenList
See Also:
AbstractParser.createLanguageTokenList()

createParseState

public IParseState createParseState(IParseState parent)
Description copied from interface: IParser
Create a single parse state for this language. Note that sub-language parse states will be included in the returned parse state

Specified by:
createParseState in interface IParser
Specified by:
createParseState in class AbstractParser
Returns:
IParseState
See Also:
AbstractParser.createParseState(com.aptana.ide.parsing.IParseState)

initializeLexer

public void initializeLexer()
                     throws LexerException
Description copied from class: AbstractParser
Perform any initializations on the lexer now that it has been created

Specified by:
initializeLexer in interface IParser
Specified by:
initializeLexer in class AbstractParser
Throws:
LexerException
See Also:
AbstractParser.initializeLexer()

parseAll

public void parseAll(IParseNode parentNode)
              throws java.text.ParseException,
                     LexerException
Description copied from class: AbstractParser
parseOneStatement

Specified by:
parseAll in interface IParser
Specified by:
parseAll in class AbstractParser
Throws:
java.text.ParseException
LexerException
See Also:
AbstractParser.parseAll(com.aptana.ide.parsing.nodes.IParseNode)