254 |
| structOrUnionSpecifier of specifier |
| structOrUnionSpecifier of specifier |
255 |
| fDefDeclaration of (decltype * declarator) |
| fDefDeclaration of (decltype * declarator) |
256 |
| declarationList of declaration seq |
| declarationList of declaration seq |
257 |
| identlist of string seq |
| identlist of (string * int * int) seq |
258 |
| functionDefinition of externalDecl |
| functionDefinition of externalDecl |
259 |
| declaration of declaration |
| declaration of declaration |
260 |
| declaration1 of declaration |
| declaration1 of declaration |
409 |
(* original code: changed for "let" statements in D *) |
(* original code: changed for "let" statements in D *) |
410 |
compoundStatement: |
compoundStatement: |
411 |
LCURLY pushScope declarationList ostatementlist popScope RCURLY |
LCURLY pushScope declarationList ostatementlist popScope RCURLY |
412 |
(Compound ((map Decl (seqToList declarationList)) @ ostatementlist)) |
(markStatement srcMap (Compound ((map Decl (seqToList declarationList)) @ ostatementlist), LCURLYleft, RCURLYright)) |
413 |
| LCURLY ostatementlist RCURLY |
| LCURLY ostatementlist RCURLY |
414 |
(Compound (ostatementlist)) |
(markStatement srcMap (Compound (ostatementlist), LCURLYleft, RCURLYright)) |
415 |
(* *) |
(* *) |
416 |
|
|
417 |
|
|
729 |
(PointerDecr(loopQd(typeQualifierList,pointer))) |
(PointerDecr(loopQd(typeQualifierList,pointer))) |
730 |
|
|
731 |
aftertypeDirectDeclarator: |
aftertypeDirectDeclarator: |
732 |
TYPE_NAME (VarDecr TYPE_NAME) |
TYPE_NAME (markDeclarator srcMap (VarDecr TYPE_NAME,TYPE_NAMEleft,TYPE_NAMEright)) |
733 |
| LPAREN aftertypeDeclarator RPAREN |
| LPAREN aftertypeDeclarator RPAREN |
734 |
(aftertypeDeclarator) |
(aftertypeDeclarator) |
735 |
| aftertypeDirectDeclarator LBRACE RBRACE %prec DOT |
| aftertypeDirectDeclarator LBRACE RBRACE %prec DOT |
742 |
(FuncDecr (aftertypeDirectDeclarator,parameterTypeList)) |
(FuncDecr (aftertypeDirectDeclarator,parameterTypeList)) |
743 |
| aftertypeDirectDeclarator LPAREN identlist RPAREN %prec DOT |
| aftertypeDirectDeclarator LPAREN identlist RPAREN %prec DOT |
744 |
(FuncDecr (aftertypeDirectDeclarator, |
(FuncDecr (aftertypeDirectDeclarator, |
745 |
map (fn x => (unknown,VarDecr x)) (seqToList identlist))) |
map (fn (x,y,z) => (unknown,markDeclarator srcMap (VarDecr x,y,z))) (seqToList identlist))) |
746 |
|
|
747 |
notypeDirectDeclarator: |
notypeDirectDeclarator: |
748 |
ID (VarDecr ID) |
ID (markDeclarator srcMap (VarDecr ID,IDleft,IDright)) |
749 |
| LPAREN notypeDeclarator RPAREN |
| LPAREN notypeDeclarator RPAREN |
750 |
(notypeDeclarator) |
(notypeDeclarator) |
751 |
| notypeDirectDeclarator LBRACE RBRACE %prec DOT |
| notypeDirectDeclarator LBRACE RBRACE %prec DOT |
758 |
(FuncDecr (notypeDirectDeclarator,parameterTypeList)) |
(FuncDecr (notypeDirectDeclarator,parameterTypeList)) |
759 |
| notypeDirectDeclarator LPAREN identlist RPAREN %prec DOT |
| notypeDirectDeclarator LPAREN identlist RPAREN %prec DOT |
760 |
(FuncDecr (notypeDirectDeclarator, |
(FuncDecr (notypeDirectDeclarator, |
761 |
map (fn x => (unknown,VarDecr x)) (seqToList identlist))) |
map (fn (x,y,z) => (unknown,markDeclarator srcMap (VarDecr x,y,z))) (seqToList identlist))) |
762 |
|
|
763 |
parmDirectDeclarator: |
parmDirectDeclarator: |
764 |
TYPE_NAME (VarDecr TYPE_NAME) |
TYPE_NAME (markDeclarator srcMap (VarDecr TYPE_NAME,TYPE_NAMEleft,TYPE_NAMEright)) |
765 |
| parmDirectDeclarator LBRACE RBRACE %prec DOT |
| parmDirectDeclarator LBRACE RBRACE %prec DOT |
766 |
(ArrayDecr (parmDirectDeclarator,EmptyExpr)) |
(ArrayDecr (parmDirectDeclarator,EmptyExpr)) |
767 |
| parmDirectDeclarator LBRACE expr RBRACE %prec DOT |
| parmDirectDeclarator LBRACE expr RBRACE %prec DOT |
772 |
(FuncDecr (parmDirectDeclarator,parameterTypeList)) |
(FuncDecr (parmDirectDeclarator,parameterTypeList)) |
773 |
| parmDirectDeclarator LPAREN identlist RPAREN %prec DOT |
| parmDirectDeclarator LPAREN identlist RPAREN %prec DOT |
774 |
(FuncDecr (parmDirectDeclarator, |
(FuncDecr (parmDirectDeclarator, |
775 |
map (fn x => (unknown,VarDecr x)) (seqToList identlist))) |
map (fn (x,y,z) => (unknown,markDeclarator srcMap (VarDecr x,y,z))) (seqToList identlist))) |
776 |
|
|
777 |
initializer: |
initializer: |
778 |
expr (expr) |
expr (expr) |
794 |
declarationList)) |
declarationList)) |
795 |
|
|
796 |
identlist: |
identlist: |
797 |
ID (singletonSeq ID) |
ID (singletonSeq (ID,IDleft,IDright)) |
798 |
| identlist COMMA ID (addToSeq(ID, identlist)) |
| identlist COMMA ID (addToSeq((ID,IDleft,IDright),identlist)) |
799 |
|
|
800 |
(* Put function name in the current scope and param names in a pushed scope. *) |
(* Put function name in the current scope and param names in a pushed scope. *) |
801 |
fDefDeclaration: |
fDefDeclaration: |