de.tuberlin.cs.cis.ocl.parser
Class OclParser

java.lang.Object
  |
  +--de.tuberlin.cs.cis.ocl.parser.parser.Parser
        |
        +--de.tuberlin.cs.cis.ocl.parser.OclParser

public class OclParser
extends de.tuberlin.cs.cis.ocl.parser.parser.Parser

Represents a parser for OCL constraints. The original OCL grammar has been transformed to an LALR(1)-parseable grammar. Based on this grammar a parser is generated using the SableCC compiler generator framework. The generated parser accepts a concrete syntax that can still express a larger language than OCL. The parsing tree is transformed into an abstract syntax tree. During this phase the offending constructs are identified and rejected.

Author:
fchabar
See Also:
Fadi Chabarek's diploma thesis

Field Summary
 
Fields inherited from class de.tuberlin.cs.cis.ocl.parser.parser.Parser
ignoredTokens
 
Constructor Summary
OclParser(de.tuberlin.cs.cis.ocl.parser.lexer.Lexer lexer)
          Constructs an Ocl parser with a given lexer.
 
Methods inherited from class de.tuberlin.cs.cis.ocl.parser.parser.Parser
parse
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OclParser

public OclParser(de.tuberlin.cs.cis.ocl.parser.lexer.Lexer lexer)
Constructs an Ocl parser with a given lexer.

Parameters:
lexer - the lexer providing the input token stream.