com.aptana.ide.editor.js.parsing
Class JSParser

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.js.parsing.JSParser
All Implemented Interfaces:
IParser

public class JSParser
extends AbstractUnifiedParser

Author:
Kevin Lindsey

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

Constructor Detail

JSParser

public JSParser()
         throws ParserInitializationException
Create a new instance of JSParser

Throws:
ParserInitializationException
Method Detail

addChildParsers

protected void addChildParsers()
                        throws ParserInitializationException
Description copied from class: AbstractParser
addChildParsers

Overrides:
addChildParsers in class AbstractParser
Throws:
ParserInitializationException
See Also:
AbstractParser.addChildParsers()

advance

protected void advance()
                throws LexerException
Advance to the next lexeme in the lexeme stream

Overrides:
advance in class AbstractParser
Throws:
LexerException

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)

getNextLexemeInLanguage

protected Lexeme getNextLexemeInLanguage()
                                  throws LexerException
Description copied from class: AbstractParser
getNextLexemeInLanguage

Overrides:
getNextLexemeInLanguage in class AbstractParser
Returns:
Lexeme
Throws:
LexerException
See Also:
AbstractParser.getNextLexemeInLanguage()

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 LexerException,
                     java.text.ParseException
Description copied from class: AbstractParser
parseOneStatement

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

throwParseError

protected void throwParseError(java.lang.String message)
                        throws java.text.ParseException
Throw a parse exception

Overrides:
throwParseError in class AbstractParser
Parameters:
message - The exception message
Throws:
java.text.ParseException