implemented support for null (OclInvalid) literal

git-svn-id: https://projects.brucker.ch/su4sml/svn/su4sml/trunk@8384 3260e6d1-4efc-4170-b0a7-36055960796d
This commit is contained in:
Achim D. Brucker 2009-01-05 00:30:57 +00:00
parent 71afa7a1a8
commit 62d0aeaab1
5 changed files with 2124 additions and 2043 deletions

View File

@ -119,6 +119,7 @@ exception NotYetSupported of string
| ENDIF of string
| ENDPACKAGE of string
| FALSE of string
| NULL of string
| FORALL of string
| TRUE of string
| IF of string
@ -243,6 +244,7 @@ exception NotYetSupported of string
| numeric_literal_exp_cs of OclTerm
| string_literal_exp_cs of OclTerm
| boolean_literal_exp_cs of OclTerm
| invalid_literal_exp_cs of OclTerm
| integer_literal of OclTerm
| real_literal of OclTerm
| string_literal of OclTerm
@ -530,15 +532,18 @@ literal_exp_cs : primitive_literal_exp_cs (Logger.d
primitive_literal_exp_cs : numeric_literal_exp_cs (Logger.debug3 ("numeric_literal_exp_cs..." ^ "\n");numeric_literal_exp_cs)
| string_literal_exp_cs (Logger.debug3 ("string_literal_exp_cs..." ^ "\n");string_literal_exp_cs)
| boolean_literal_exp_cs (boolean_literal_exp_cs)
| invalid_literal_exp_cs (invalid_literal_exp_cs)
numeric_literal_exp_cs : INTEGER_LITERAL (Logger.debug3 ("INTEGER_LITERAL..." ^ "\n");Literal (INTEGER_LITERAL,Integer))
| REAL_LITERAL (Literal (REAL_LITERAL,Real))
string_literal_exp_cs : STRING_LITERAL (Literal (STRING_LITERAL,String))
boolean_literal_exp_cs : TRUE (Literal ("true",Boolean))
| FALSE (Literal ("false",Boolean))
invalid_literal_exp_cs : NULL (Literal ("null",DummyT))
(* NOT SUPPORTED YET
tuple_literal_exp_cs : TUPLE BRACE_OPEN initialized_variable_list_cs BRACE_CLOSE
*)
(* RETURN: OclTerm *)
logical_exp_cs : relational_exp_cs (Logger.debug3 ("logical_exp_cs..." ^ "\n");relational_exp_cs)
| relational_exp_cs logical_exp_tail_cs_p (Logger.debug3 ("logical_exp_cs..." ^ "\n");OperationCall(relational_exp_cs,Boolean,[OclLibPackage,"Boolean",#1(logical_exp_tail_cs_p)],[(#2(logical_exp_tail_cs_p),Boolean)],Boolean))

View File

@ -56,6 +56,7 @@ val IN: (string) * 'a * 'a -> (svalue,'a) token
val IF: (string) * 'a * 'a -> (svalue,'a) token
val TRUE: (string) * 'a * 'a -> (svalue,'a) token
val FORALL: (string) * 'a * 'a -> (svalue,'a) token
val NULL: (string) * 'a * 'a -> (svalue,'a) token
val FALSE: (string) * 'a * 'a -> (svalue,'a) token
val ENDPACKAGE: (string) * 'a * 'a -> (svalue,'a) token
val ENDIF: (string) * 'a * 'a -> (svalue,'a) token

File diff suppressed because it is too large Load Diff

View File

@ -113,6 +113,7 @@ ws = [\ \t];
"endif" => (Tokens.ENDIF(yytext,inputPos_half yypos,inputPos_half yypos));
"endpackage" => (Tokens.ENDPACKAGE(yytext,inputPos_half yypos,inputPos_half yypos));
"false" => (Tokens.FALSE(yytext,inputPos_half yypos,inputPos_half yypos));
"null" => (Tokens.NULL(yytext,inputPos_half yypos,inputPos_half yypos));
"if" => (Tokens.IF(yytext,inputPos_half yypos,inputPos_half yypos));
"in" => (Tokens.IN(yytext,inputPos_half yypos,inputPos_half yypos));
"init" => (Tokens.INIT(init,inputPos_half yypos,inputPos_half yypos));

File diff suppressed because it is too large Load Diff