|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.lexer.yacc.RubyYaccLexer
This is a port of the MRI lexer to Java it is compatible to Ruby 1.8.1.
Constructor Summary | |
RubyYaccLexer()
|
Method Summary | |
boolean |
advance()
How the parser advances to the next token. |
StackState |
getCmdArgumentState()
|
StackState |
getConditionState()
|
ISourcePosition |
getPosition()
|
ISourcePosition |
getPosition(ISourcePosition startPosition,
boolean inclusive)
Get position information for Token/Node that follows node represented by startPosition and current lexer location. |
ISourcePositionFactory |
getPositionFactory()
|
StrTerm |
getStrTerm()
|
java.lang.StringBuffer |
getTokenBuffer()
|
protected int |
readComment(char c)
Read a comment up to end of line. |
void |
reset()
|
void |
resetStacks()
|
void |
setParserSupport(ParserSupport parserSupport)
Parse must pass its support object for some check at bottom of yylex(). |
void |
setSource(LexerSource source)
Allow the parser to set the source for its lexer. |
void |
setState(LexState state)
|
void |
setStrTerm(StrTerm strterm)
|
void |
setValue(java.lang.Object yaccValue)
|
void |
setWarnings(IRubyWarnings warnings)
|
int |
token()
Last token read from the lexer at the end of a call to yylex() |
java.lang.Object |
value()
Value of last token (if it is a token which has a value). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RubyYaccLexer()
Method Detail |
public void reset()
public boolean advance() throws java.io.IOException
java.io.IOException
public int token()
public java.lang.StringBuffer getTokenBuffer()
public java.lang.Object value()
public ISourcePositionFactory getPositionFactory()
public ISourcePosition getPosition(ISourcePosition startPosition, boolean inclusive)
startPosition
- previous node/tokeninclusive
- include previous node into position information of current node
public ISourcePosition getPosition()
public void setParserSupport(ParserSupport parserSupport)
parserSupport
- public void setSource(LexerSource source)
source
- where the lexer gets raw datapublic StrTerm getStrTerm()
public void setStrTerm(StrTerm strterm)
public void resetStacks()
public void setWarnings(IRubyWarnings warnings)
public void setState(LexState state)
public StackState getCmdArgumentState()
public StackState getConditionState()
public void setValue(java.lang.Object yaccValue)
protected int readComment(char c) throws java.io.IOException
c
- last character read from lexer source
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |