|
||||||||||
| 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 IToken |
getIToken(int i)
Deprecated. |
protected IToken |
getLeftIToken()
|
protected int |
getLeftSpan()
|
OCLBacktrackingLexer |
getLexer()
|
Environment<?,?,?,?,?,?,?,?,?,?,?,?> |
getOCLEnvironment()
|
BacktrackingParser |
getParser()
|
ParseTable |
getParseTable()
|
protected ErrorToken |
getRhsErrorIToken(int i)
|
protected int |
getRhsErrorTokenIndex(int i)
|
protected IToken |
getRhsFirstIToken(int i)
|
protected int |
getRhsFirstTokenIndex(int i)
|
protected IToken |
getRhsIToken(int i)
|
protected 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 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(Monitor monitor)
Runs the parser with the current lex and parse streams
using the given Monitor |
CSTNode |
parser(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(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, unDoubleQuote, unquote, 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 ParseTable getParseTable()
getParseTable in class AbstractParserParseTable used by the parserpublic BacktrackingParser getParser()
protected void setResult(java.lang.Object object)
setResult in class AbstractParserprotected java.lang.Object getRhsSym(int i)
getRhsSym in class AbstractParserprotected int getRhsTokenIndex(int i)
getRhsTokenIndex in class AbstractParserprotected IToken getRhsIToken(int i)
getRhsIToken in class AbstractParserprotected int getRhsFirstTokenIndex(int i)
getRhsFirstTokenIndex in class AbstractParserprotected IToken getRhsFirstIToken(int i)
getRhsFirstIToken in class AbstractParserprotected int getRhsLastTokenIndex(int i)
getRhsLastTokenIndex in class AbstractParserprotected IToken getRhsLastIToken(int i)
getRhsLastIToken in class AbstractParserprotected int getLeftSpan()
getLeftSpan in class AbstractParserprotected IToken getLeftIToken()
getLeftIToken in class AbstractParserprotected int getRightSpan()
getRightSpan in class AbstractParserprotected IToken getRightIToken()
getRightIToken in class AbstractParserprotected int getRhsErrorTokenIndex(int i)
getRhsErrorTokenIndex in class AbstractParserprotected ErrorToken getRhsErrorIToken(int i)
getRhsErrorIToken in class AbstractParserpublic void reset(ILexStream lexStream)
AbstractParserlexStream
reset in class AbstractParserpublic int numTokenKinds()
numTokenKinds in class AbstractParserpublic java.lang.String[] orderedTerminalSymbols()
orderedTerminalSymbols in class AbstractParserpublic java.lang.String getTokenKindName(int kind)
public int getEOFTokenKind()
public DerivedPrsStream getIPrsStream()
getIPrsStream in class AbstractParserparseStreampublic CSTNode parser()
AbstractParserlex and parse streams
parser in class AbstractParserCSTNode which results from the parsing processpublic CSTNode parser(Monitor monitor)
AbstractParserlex and parse streams
using the given Monitor
parser in class AbstractParserCSTNode which results from the parsing process
public CSTNode parser(Monitor monitor,
int error_repair_count)
AbstractParserlex and parse streams
using the given Monitor and error_repair_count (useful for a backtracking parser)
parser in class AbstractParserCSTNode which results from the parsing processpublic Environment<?,?,?,?,?,?,?,?,?,?,?,?> getOCLEnvironment()
public OCLBacktrackingLexer getLexer()
getLexer in class AbstractParser@Deprecated protected 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 index
protected final void reportErrorTokenMessage(int error_token,
java.lang.String msg)
error_token - the error taken indexmsg - the message to reportpublic void ruleAction(int ruleNumber)
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||