version 1.2, 2000/01/21 03:01:26 |
version 1.4, 2002/11/28 01:25:36 |
|
|
/* $OpenXM$ */ |
/* $OpenXM: OpenXM/src/k097/simple.y,v 1.3 2001/01/13 12:40:56 takayama Exp $ */ |
/* simple.y 1996, 1/1 --- 1/6 */ |
/* simple.y 1996, 1/1 --- 1/6 */ |
/* simple.y.ccc, 1996, 4/1 --- */ |
/* simple.y.ccc, 1996, 4/1 --- */ |
%{ |
%{ |
|
|
; |
; |
|
|
break : BREAK { pkkan(" exit "); } |
break : BREAK { pkkan(" exit "); } |
|
; |
|
|
list_prefix |
list_prefix |
: |
: |
'[' { pkkan("[ "); } |
'[' { pkkan("[ "); } |
; |
; |
|
|
: for_prefix curryBrace |
: for_prefix curryBrace |
{ pkkan("} %% end of B part. {B}\n"); |
{ pkkan("} %% end of B part. {B}\n"); |
pkkan(" 2 1 roll] {exec} map pop\n} loop %%end of for\n"); } |
pkkan(" 2 1 roll] {exec} map pop\n} loop %%end of for\n"); } |
|
; |
PSfor_prefix |
PSfor_prefix |
: PSFOR '(' ID '=' exp ';' |
: PSFOR '(' ID '=' exp ';' |
{ pkkan("%%PSfor initvalue.\n (integer) data_conversion \n"); |
{ pkkan("%%PSfor initvalue.\n (integer) data_conversion \n"); |
|
|
| LOAD ID { loadFile($2); } |
| LOAD ID { loadFile($2); } |
| LOAD QUOTE { loadFile($2); } |
| LOAD QUOTE { loadFile($2); } |
| LOAD '[' QUOTE ']' { loadFileWithCpp($3); } |
| LOAD '[' QUOTE ']' { loadFileWithCpp($3); } |
|
; |
sm1ArgList : |
sm1ArgList : |
| sm1ArgList ',' QUOTE { pkkan(" "); printObjectSymbol($3); pkkan(" "); } |
| sm1ArgList ',' QUOTE { pkkan(" "); printObjectSymbol($3); pkkan(" "); } |
| QUOTE { pkkan(" "); printObjectSymbol($1); pkkan(" "); } |
| QUOTE { pkkan(" "); printObjectSymbol($1); pkkan(" "); } |
Line 460 class_definition |
|
Line 461 class_definition |
|
/* debug */ K00foo1(); |
/* debug */ K00foo1(); |
K00toPrimitiveClass(); |
K00toPrimitiveClass(); |
} |
} |
| |
|
class_definition_prefix globalstatements '}' |
|
{ pkkan(" PrimitiveContextp setcontext "); |
|
K00putIncetanceVariable(IEXIT," "); |
|
/* debug */ K00foo1(); |
|
K00toPrimitiveClass(); |
|
} |
|
; |
; |
|
|
class_definition_prefix |
class_definition_prefix |
Line 486 class_definition_prefix |
|
Line 480 class_definition_prefix |
|
K00putIncetanceVariable(IRESET," "); |
K00putIncetanceVariable(IRESET," "); |
} |
} |
} |
} |
|
; |
incetance_variables |
incetance_variables |
: LOCAL incetance_variables_list ';' |
: LOCAL incetance_variables_list ';' |
{ |
{ |
K00putIncetanceVariable(IEXIT," "); |
K00putIncetanceVariable(IEXIT," "); |
} |
} |
|
| LOCAL ';' |
|
{ |
|
K00putIncetanceVariable(IEXIT," "); |
|
} |
; |
; |
incetance_variables_list |
incetance_variables_list |
: incetance_variables_list ',' ID |
: incetance_variables_list ',' ID |
Line 502 incetance_variables_list |
|
Line 500 incetance_variables_list |
|
{ |
{ |
K00putIncetanceVariable(IPUT,objectSymbolToString($1)); |
K00putIncetanceVariable(IPUT,objectSymbolToString($1)); |
} |
} |
|
; |
operatorfunctionHead |
operatorfunctionHead |
: DEF OPERATOR ID |
: DEF OPERATOR ID |
{ pkkan("/"); printObjectSymbol($3); pkkan(" {\n"); ips($3); |
{ pkkan("/"); printObjectSymbol($3); pkkan(" {\n"); ips($3); |