|
||||||||||
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.OCLParser
public class OCLParser
Field Summary |
---|
Fields inherited from class org.eclipse.ocl.parser.AbstractOCLParser |
---|
iteratorNames |
Constructor Summary | |
---|---|
OCLParser(OCLLexer lexer)
|
Method Summary | |
---|---|
int |
getEOFTokenKind()
|
DerivedPrsStream |
getIPrsStream()
|
protected IToken |
getIToken(int i)
Deprecated. |
protected IToken |
getLeftIToken()
|
protected int |
getLeftSpan()
|
OCLLexer |
getLexer()
|
Environment<?,?,?,?,?,?,?,?,?,?,?,?> |
getOCLEnvironment()
|
DeterministicParser |
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) |
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 OCLParser(OCLLexer lexer)
Method Detail |
---|
public ParseTable getParseTable()
getParseTable
in class AbstractParser
ParseTable
used by the parserpublic DeterministicParser 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 IToken getRhsIToken(int i)
getRhsIToken
in class AbstractParser
protected int getRhsFirstTokenIndex(int i)
getRhsFirstTokenIndex
in class AbstractParser
protected IToken getRhsFirstIToken(int i)
getRhsFirstIToken
in class AbstractParser
protected int getRhsLastTokenIndex(int i)
getRhsLastTokenIndex
in class AbstractParser
protected IToken getRhsLastIToken(int i)
getRhsLastIToken
in class AbstractParser
protected int getLeftSpan()
getLeftSpan
in class AbstractParser
protected IToken getLeftIToken()
getLeftIToken
in class AbstractParser
protected int getRightSpan()
getRightSpan
in class AbstractParser
protected IToken getRightIToken()
getRightIToken
in class AbstractParser
protected int getRhsErrorTokenIndex(int i)
getRhsErrorTokenIndex
in class AbstractParser
protected ErrorToken getRhsErrorIToken(int i)
getRhsErrorIToken
in class AbstractParser
public void reset(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(Monitor monitor)
AbstractParser
lex
and parse
streams
using the given Monitor
parser
in class AbstractParser
CSTNode
which results from the parsing processpublic CSTNode parser(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 OCLLexer 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 indexpublic 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 |