|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ocl.lpg.AbstractParser
org.eclipse.ocl.parser.AbstractOCLParser
org.eclipse.ocl.parser.backtracking.OCLBacktrackingParser
public class OCLBacktrackingParser
Field Summary |
---|
Fields inherited from class org.eclipse.ocl.parser.AbstractOCLParser |
---|
iteratorNames |
Constructor Summary | |
---|---|
OCLBacktrackingParser(OCLBacktrackingLexer lexer)
|
Method Summary | |
---|---|
int |
getEOFTokenKind()
|
DerivedPrsStream |
getIPrsStream()
|
protected lpg.runtime.IToken |
getIToken(int i)
Deprecated. |
protected lpg.runtime.IToken |
getLeftIToken()
|
protected int |
getLeftSpan()
|
OCLBacktrackingLexer |
getLexer()
|
Environment<?,?,?,?,?,?,?,?,?,?,?,?> |
getOCLEnvironment()
|
lpg.runtime.BacktrackingParser |
getParser()
|
lpg.runtime.ParseTable |
getParseTable()
|
protected lpg.runtime.ErrorToken |
getRhsErrorIToken(int i)
|
protected int |
getRhsErrorTokenIndex(int i)
|
protected lpg.runtime.IToken |
getRhsFirstIToken(int i)
|
protected int |
getRhsFirstTokenIndex(int i)
|
protected lpg.runtime.IToken |
getRhsIToken(int i)
|
protected lpg.runtime.IToken |
getRhsLastIToken(int i)
|
protected int |
getRhsLastTokenIndex(int i)
|
protected java.lang.Object |
getRhsSym(int i)
|
protected int |
getRhsTokenIndex(int i)
|
protected java.lang.String |
getRhsTokenText(int i)
A convenience method to obtain the text of a right hand side IToken. |
protected lpg.runtime.IToken |
getRightIToken()
|
protected int |
getRightSpan()
|
java.lang.String |
getTokenKindName(int kind)
|
protected java.lang.String |
getTokenText(int i)
Deprecated. |
int |
numTokenKinds()
|
java.lang.String[] |
orderedTerminalSymbols()
|
CSTNode |
parser()
Runs the parser with the current lex and parse streams |
CSTNode |
parser(int error_repair_count)
Runs the parser with the current lex and parse streams
using a given error_repair_count (useful for a backtracking parser) |
CSTNode |
parser(lpg.runtime.Monitor monitor)
Runs the parser with the current lex and parse streams
using the given Monitor |
CSTNode |
parser(lpg.runtime.Monitor monitor,
int error_repair_count)
Runs the parser with the current lex and parse streams
using the given Monitor and error_repair_count (useful for a backtracking parser) |
protected void |
reportErrorTokenMessage(int error_token,
java.lang.String msg)
Report error message for given error_token. |
void |
reset(lpg.runtime.ILexStream lexStream)
Resets the parser's lexStream |
void |
ruleAction(int ruleNumber)
|
protected void |
setResult(java.lang.Object object)
|
Methods inherited from class org.eclipse.ocl.lpg.AbstractParser |
---|
computeInputString, decodeEscapeSequence, decodeHexCharacter, decodeOctalCharacter, decodeString, getDefaultRepairCount, getEnvironment, parseTokensToCST, resetLexStream, setDefaultRepairCount, setLexStream, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, unDoubleQuote, unquote, unSingleQuote, unSingleQuote |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OCLBacktrackingParser(OCLBacktrackingLexer lexer)
Method Detail |
---|
public lpg.runtime.ParseTable getParseTable()
getParseTable
in class AbstractParser
ParseTable
used by the parserpublic lpg.runtime.BacktrackingParser getParser()
protected void setResult(java.lang.Object object)
setResult
in class AbstractParser
protected java.lang.Object getRhsSym(int i)
getRhsSym
in class AbstractParser
protected int getRhsTokenIndex(int i)
getRhsTokenIndex
in class AbstractParser
protected lpg.runtime.IToken getRhsIToken(int i)
getRhsIToken
in class AbstractParser
protected int getRhsFirstTokenIndex(int i)
getRhsFirstTokenIndex
in class AbstractParser
protected lpg.runtime.IToken getRhsFirstIToken(int i)
getRhsFirstIToken
in class AbstractParser
protected int getRhsLastTokenIndex(int i)
getRhsLastTokenIndex
in class AbstractParser
protected lpg.runtime.IToken getRhsLastIToken(int i)
getRhsLastIToken
in class AbstractParser
protected int getLeftSpan()
getLeftSpan
in class AbstractParser
protected lpg.runtime.IToken getLeftIToken()
getLeftIToken
in class AbstractParser
protected int getRightSpan()
getRightSpan
in class AbstractParser
protected lpg.runtime.IToken getRightIToken()
getRightIToken
in class AbstractParser
protected int getRhsErrorTokenIndex(int i)
getRhsErrorTokenIndex
in class AbstractParser
protected lpg.runtime.ErrorToken getRhsErrorIToken(int i)
getRhsErrorIToken
in class AbstractParser
public void reset(lpg.runtime.ILexStream lexStream)
AbstractParser
lexStream
reset
in class AbstractParser
public int numTokenKinds()
numTokenKinds
in class AbstractParser
public java.lang.String[] orderedTerminalSymbols()
orderedTerminalSymbols
in class AbstractParser
public java.lang.String getTokenKindName(int kind)
public int getEOFTokenKind()
public DerivedPrsStream getIPrsStream()
getIPrsStream
in class AbstractParser
parseStream
public CSTNode parser()
AbstractParser
lex
and parse
streams
parser
in class AbstractParser
CSTNode
which results from the parsing processpublic CSTNode parser(lpg.runtime.Monitor monitor)
AbstractParser
lex
and parse
streams
using the given Monitor
parser
in class AbstractParser
CSTNode
which results from the parsing processpublic CSTNode parser(int error_repair_count)
AbstractParser
lex
and parse
streams
using a given error_repair_count (useful for a backtracking parser)
parser
in class AbstractParser
CSTNode
which results from the parsing processpublic CSTNode parser(lpg.runtime.Monitor monitor, int error_repair_count)
AbstractParser
lex
and parse
streams
using the given Monitor
and error_repair_count (useful for a backtracking parser)
parser
in class AbstractParser
CSTNode
which results from the parsing processpublic Environment<?,?,?,?,?,?,?,?,?,?,?,?> getOCLEnvironment()
public OCLBacktrackingLexer getLexer()
getLexer
in class AbstractParser
@Deprecated protected lpg.runtime.IToken getIToken(int i)
Before 3.0, this method was used with the now-deprecated "dollar"getToken macro (which provided token index in the prsStream) to obtain an IToken f a rule given the index of the right hand side token in the said rule. In 3.0 a convenience method has been introduced in order to directly return the IToken, given the index of the right hand side token in the rule.
In an action-block of a rule, instead of doing getIToken("dollar"getToken(i))
you should do getRhsTokenText(i)
i
- the right hand side token index
@Deprecated protected java.lang.String getTokenText(int i)
Before 3.0, this method was used with the now-deprecated "dollar"getToken macro (which provided token index in the prsStream) to obtain an IToken f a rule given the index of the right hand side token in the said rule. In 3.0 a convenience method has been introduced in order to directly return the IToken, given the index of the right hand side token in the rule.
In an action-block of a rule, instead of doing getTokenText("dollar"getToken(i))
you should do getRhsTokenText(i)
i
- the right hand side token indexprotected java.lang.String getRhsTokenText(int i)
i
- the right hand side token indexprotected final void reportErrorTokenMessage(int error_token, java.lang.String msg)
error_token
- the error taken indexmsg
- the message to reportpublic void ruleAction(int ruleNumber)
ruleAction
in interface lpg.runtime.RuleAction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |