NAME

        poclc - parses valid OCL constraints based on OCL 1.3


SYNOPSIS

        poclc < <ocl constraint>


DESCRIPTION

	poclc       

       	parses OCL constraints passed in as ASCII code and generates an
       	abstract syntax tree containing the imformation from the 
	constraints. By default, the abstract syntax tree is outputed 
	to cout	


OPTIONS

        none


MAKEFILE OPTIONS
	
	make poclc
		produces poclc.exe from the provided files

	make clean
		removes all files generated


EXAMPLE

        ./poclc < c2f.txt

              Parses the OCL constraints of file c2f.txt and outputs
	      the abstract syntax tree to the user

	      For constraint 
		context F inv:
  			self.f = (C.c * 1.8) + 32

	      the output is

		<constraint_list>
    			<constriant>
        			context
            				<name> F
        			<stereotype_list>
            				inv
                				=
                    					.
                        					<name> self
                        					<name> f
                    					+
                       		 				*
                            						.
                                						<name> C
                                						<name> c
                            						<real> 1.800000
                       						<integer> 32


ERROR MESSAGES

	poclc outputs an error only if it cannot parse given input

	example:	

		1: syntax error, unexpected t_DIVIDE, expecting t_CONTEXT at /
	

STATUS

	Currently, poclc just has the debug print of the AST implemented; however, 
	using 	AST, one can perform any operation required.  This version of 
	poclc is used for both the COGITO parser and the DYNAMO project 
	parser.  Please see COGITO or DYNAMO for examples of how poclc is used.


FUTURE WORK

	The poclc parser does not require any future work on its own to support 
	OCL 1.3. Changes should be made to support OCL 1.4 or OCL 2.0. 
	In addition, a variety of error checking and correction can be 
	implemented in the parsing of the OCL to check not only the syntax 
	but also the symantics. As it stands, poclc can be used for any 
	project that requires a functioning OCL 1.3 parser.


AUTHOR

        Written by Jude Nagurney with changes by 
	Jonathan Gdalevich (lordebon@cc.gatech.edu)
	See ChangeLog file for complite description of changes


BUGS

        The parser only supports OCL 1.3 and only the denug 
	printout is implemented


GLOSSARY

        pwan -  project without a name, the original project 
		for which this program was built.

        OCL -   Object Constraint Language, part of UNL since UML 1.1. 
		It is used to represent constraints in class diagrams.  
		See http://www.klasse.nl/ocl/ or the OCL manual at www.omg.org 
		for further details. 

	AST -   abstract syntax tree, data structure representing something 
	      	which has been parsed. In poclc, the AST is used to 
		represent parsed OCL constraints. 

	flex -  lexical analyser generator that generates C lexical analyzer.

	bison - free parser generator computer program written for the GNU project,
		and available for virtually all common operating systems. It is 
		mostly compatible with yacc, and offers several improvements over
		the earlier program. It is commonly used in conjunction with flex. 
		(from Wikipedia)


COPYRIGHT

	Copyright (C) 1999 Jude Nagurney with changes by 
	Jonathan Gdalevich (lordebon@cc.gatech.edu)

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2, or (at your option)
	any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 

	The original author can be contacted at ocl_parser@pwan.org, 
	Jude Nagurney, 1001 North Randolph Street, #622, Arlington, 
	VA, 22201-5607, USA.

                         March 21, 2005

