public class OCLParser extends AbstractOCLParser
iteratorNames| Modifier and Type | Method and Description |
|---|---|
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 Object |
getRhsSym(int i) |
protected int |
getRhsTokenIndex(int i) |
protected String |
getRhsTokenText(int i)
A convenience method to obtain the text of a right hand side IToken.
|
protected IToken |
getRightIToken() |
protected int |
getRightSpan() |
String |
getTokenKindName(int kind) |
protected String |
getTokenText(int i)
Deprecated.
|
int |
numTokenKinds() |
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(Object object) |
createArrowOperationCallExpCS, createBooleanLiteralExpCS, createClassifierContextDeclCS, createCollectionLiteralExpCS, createCollectionLiteralPartCS, createCollectionRangeCS, createCollectionTypeCS, createConceptualOperationNameCS, createDefCS, createDefExpressionCS, createDerValueCS, createDotOperationCallExpCS, createFeatureCallExpCS, createIfExpCS, createInitValueCS, createIntegerLiteralExpCS, createInvalidLiteralExpCS, createInvCS, createIsMarkedPreCS, createIterateExpCS, createIteratorExpCS, createIteratorNames, createLetExpCS, createMessageExpCS, createNullLiteralExpCS, createOCLDocumentCS, createOCLMessageArgCS, createOperationCallExpCS, createOperationContextDeclCS, createOperationCS, createOperationCS, createPackageDeclarationCS, createPathNameCS, createPathNameCS, createPathNamePrefixCS, createPrePostOrBodyDeclCS, createPrimitiveTypeCS, createPropertyContextCS, createQuotedSimpleNameCS, createRealLiteralExpCS, createSimpleNameCS, createStringLiteralExpCS, createTupleLiteralExpCS, createTupleTypeCS, createUnlimitedNaturalLiteralExpCS, createVariableCS, createVariableExpCS, extendPathNameCS, extendQuotedSimpleNameCS, extendStringLiteralExpCS, getPathNameSuffixCS, isAtPre, isIterator, isNonStdSQSupported, unescapecomputeInputString, decodeEscapeSequence, decodeHexCharacter, decodeOctalCharacter, decodeString, getDefaultRepairCount, getEnvironment, parseTokensToCST, resetLexStream, setDefaultRepairCount, setLexStream, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, unDoubleQuote, unquote, unSingleQuotepublic OCLParser(OCLLexer lexer)
public ParseTable getParseTable()
getParseTable in class AbstractParserParseTable used by the parserpublic DeterministicParser getParser()
protected void setResult(Object object)
setResult in class AbstractParserprotected 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)
AbstractParserlexStreamreset in class AbstractParserpublic int numTokenKinds()
numTokenKinds in class AbstractParserpublic String[] orderedTerminalSymbols()
orderedTerminalSymbols in class AbstractParserpublic String getTokenKindName(int kind)
public int getEOFTokenKind()
public DerivedPrsStream getIPrsStream()
getIPrsStream in class AbstractParserparseStreampublic CSTNode parser()
AbstractParserlex and parse streamsparser in class AbstractParserCSTNode which results from the parsing processpublic CSTNode parser(Monitor monitor)
AbstractParserlex and parse streams
using the given Monitorparser in class AbstractParserCSTNode which results from the parsing processpublic 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 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 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 String getRhsTokenText(int i)
i - the right hand side token indexpublic void ruleAction(int ruleNumber)
Copyright © 2015 Open eHealth Foundation. All rights reserved.