org.eclipse.ocl.internal.parser
Class AbstractOCLParser<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
java.lang.Object
org.eclipse.ocl.internal.parser.AbstractParser
org.eclipse.ocl.internal.parser.AbstractOCLParser<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
- All Implemented Interfaces:
- LexerErrorHandler, ParserErrorHandler
- Direct Known Subclasses:
- OCLParser
public abstract class AbstractOCLParser<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
- extends AbstractParser
The OCLLpgParser
parses an OCL expression into a CST.
Once the CST is created, the OCLParser
walks the CST
and creates the OCL AST. It is necessary that this be done in two steps
because LPG is a bottom up parser and cannot provide enough contextual
information to create the AST on the first pass.
- Author:
- Christian Vogt (cvogt)
Constructor Summary |
AbstractOCLParser(org.eclipse.ocl.Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> environment)
|
Method Summary |
static boolean |
isIdentifierOrKeyword(int tokenKind)
Returns true if the token kind is an identifier or keyword,
othewise false. |
Methods inherited from class org.eclipse.ocl.internal.parser.AbstractParser |
computeInputString, computeInputString, dumpTokens, ERROR, formatClass, formatEClassName, formatName, formatPath, formatPath, formatString, formatType, getCharOffset, getErrorHandler, getInputChars, getLexStream, getMonitor, getPrsStream, getTraceFlag, isCancelled, lexerError, parserError, setCharacterOffset, setErrorHandler, setFileName, setInputChars, setInputReader, setMonitor, setTab, setTraceFlag |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
errorMessages
public static final java.lang.String[] errorMessages
AbstractOCLParser
public AbstractOCLParser(org.eclipse.ocl.Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> environment)
isIdentifierOrKeyword
public static boolean isIdentifierOrKeyword(int tokenKind)
- Returns true if the token kind is an identifier or keyword,
othewise false.
- Parameters:
tokenKind
- the token kind to compare
- Returns:
- true if the token kind is an identifier or keyword,
otherwise false