uk.ac.ucl.cs.emofocl.ocl.parser
Class OCL2Parser
java.lang.Object
uk.ac.ucl.cs.emofocl.ocl.parser.OCL2Parser
- All Implemented Interfaces:
- OCL2ParserConstants
public class OCL2Parser
- extends Object
- implements OCL2ParserConstants
Fields inherited from interface uk.ac.ucl.cs.emofocl.ocl.parser.OCL2ParserConstants |
AND, ANY, ARROW, AT_PRE, BAG, BOOLEAN, COLLECT, COLLECT_NESTED, COLLECTION, COLON, COLON_COLON, COMMA, DEFAULT, DIVIDE, DOT, DOT_DOT, DOUBLE_QUOTE, DREAL, ELSE, ENDIF, EOF, EQUALS, EXISTS, FOR_ALL, FPREAL, GREATER_THAN, GREATER_THAN_EQUALS, IF, IMPLIES, IN, INT, INTEGER, INVALID, IS_UNIQUE, ITERATE, LB, LESS_THAN, LESS_THAN_EQUALS, LET, LINE_COMMENT, LP, MINUS, NAME, NOT, NULL, OCL_ANY, OCL_AS_TYPE, OCL_INVALID, OCL_IS_KIND_OF, OCL_IS_TYPE_OF, OCL_MESSAGE, OCL_VOID, ONE, OR, ORDERED_SET, PARA_COMMENT, PLUS, RB, REAL, REJECT, RP, SELECT, SEMI_COLON, SEQUENCE, SET, SORTED_BY, STRIKE, STRING, THEN, TIMES, tokenImage, TUPLE, UNEQUALS, WS, XOR |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
token_source
public OCL2ParserTokenManager token_source
token
public Token token
jj_nt
public Token jj_nt
lookingAhead
public boolean lookingAhead
OCL2Parser
public OCL2Parser()
OCL2Parser
public OCL2Parser(InputStream stream)
OCL2Parser
public OCL2Parser(Reader stream)
OCL2Parser
public OCL2Parser(OCL2ParserTokenManager tm)
parseExpression
public OclExpression parseExpression(MOFClass context,
String expression)
throws ParseException
- Parses a valid prefix of the expression in the context of a class.
- Throws:
ParseException
parseCompleteExpression
public OclExpression parseCompleteExpression(MOFClass context,
String expression)
throws ParseException
- Parses an expression in the context of a class, ensuring that there
is no invalid suffix to the expression.
- Throws:
ParseException
completeExpression
public final OclExpression completeExpression(Environment env)
throws ParseException
- Throws:
ParseException
expression
public final OclExpression expression(Environment env)
throws ParseException
- Throws:
ParseException
clause
public final OclExpression clause(Environment env)
throws ParseException
- Throws:
ParseException
strongerRelation
public final OclExpression strongerRelation(Environment env)
throws ParseException
- Throws:
ParseException
weakerRelation
public final OclExpression weakerRelation(Environment env)
throws ParseException
- Throws:
ParseException
conditionalExpression
public final OclExpression conditionalExpression(Environment env)
throws ParseException
- Throws:
ParseException
sumOrDifference
public final OclExpression sumOrDifference(Environment env)
throws ParseException
- Throws:
ParseException
productOrDividend
public final OclExpression productOrDividend(Environment env)
throws ParseException
- Throws:
ParseException
negation
public final OclExpression negation(Environment env)
throws ParseException
- Throws:
ParseException
navigation
public final OclExpression navigation(Environment env)
throws ParseException
- Throws:
ParseException
argumentsCS
public final List argumentsCS(Environment env)
throws ParseException
- Throws:
ParseException
variableDeclaration
public final VariableDeclaration variableDeclaration(Environment env)
throws ParseException
- Throws:
ParseException
initialisedVariableDeclaration
public final VariableDeclaration initialisedVariableDeclaration(Environment env)
throws ParseException
- Throws:
ParseException
letExpression
public final LetExp letExpression(Environment env)
throws ParseException
- Throws:
ParseException
ifExpCS
public final IfExp ifExpCS(Environment env)
throws ParseException
- Throws:
ParseException
literalExpCS
public final LiteralExp literalExpCS(Environment env)
throws ParseException
- Throws:
ParseException
collectionLiteralCS
public final CollectionLiteralExp collectionLiteralCS(Environment env)
throws ParseException
- Throws:
ParseException
collectionTypeIdentifierCS
public final CollectionKind collectionTypeIdentifierCS()
throws ParseException
- Throws:
ParseException
collectionLiteralPartCS
public final CollectionLiteralPart collectionLiteralPartCS(Environment env)
throws ParseException
- Throws:
ParseException
tupleLiteralCS
public final TupleLiteralExp tupleLiteralCS(Environment env)
throws ParseException
- Throws:
ParseException
primitiveLiteralCS
public final PrimitiveLiteralExp primitiveLiteralCS(Environment env)
throws ParseException
- Throws:
ParseException
voidLiteralCS
public final LiteralExp voidLiteralCS(Environment env)
throws ParseException
- Throws:
ParseException
typeCS
public final Type typeCS(Environment env)
throws ParseException
- Throws:
ParseException
modelTypeCS
public final Type modelTypeCS(Environment env)
throws ParseException
- Throws:
ParseException
collectionTypeCS
public final CollectionType collectionTypeCS(Environment env)
throws ParseException
- Throws:
ParseException
tupleTypeCS
public final TupleType tupleTypeCS(Environment env)
throws ParseException
- Throws:
ParseException
ReInit
public void ReInit(InputStream stream)
ReInit
public void ReInit(Reader stream)
ReInit
public void ReInit(OCL2ParserTokenManager tm)
getNextToken
public final Token getNextToken()
getToken
public final Token getToken(int index)
generateParseException
public final ParseException generateParseException()
enable_tracing
public final void enable_tracing()
disable_tracing
public final void disable_tracing()