static char sccsid[] = "@(#)courier.y 4.2 (Berkeley) 7/7/83";
ARRAY _BEGIN BOOLEAN CARDINAL
INTEGER LONG OF PROCEDURE
PROGRAM RECORD REPORTS RETURNS
SEQUENCE STRING TYPE UNSPECIFIED
ConstructedType DesignatorType MaximumNumber
NumericValue PredefinedType ProgramHeader
ReferencedConstant ReferencedType Type
ArgumentList Candidate CandidateList
Correspondence CorrespondenceList Designator
DesignatorList ErrorList Field
FieldList NameList ResultList
ProgramHeader ProgramBody
identifier ':' PROGRAM '='
identifier ':' PROGRAM number VERSION number '='
_BEGIN DependencyList DeclarationList END '.'
| DEPENDS UPON ReferencedProgramList ';'
yyerror("Dependencies on other Courier programs are not supported");
| ReferencedProgramList ',' ReferencedProgram
identifier '(' number ')' VERSION number
| DeclarationList Declaration
identifier ':' TYPE '=' Type ';'
| identifier ':' Type '=' NumericValue ';'
if (type_check($3, $5)) {
yyerror("Type clash in declaration of %s",
$$ = LongUnspecified_type;
'{' CorrespondenceList '}'
$$ = construct_type1(C_ENUMERATION, $2);
| ARRAY NumericValue OF Type
$$ = construct_type2(C_ARRAY, $2, $4);
| SEQUENCE MaximumNumber OF Type
$$ = construct_type2(C_SEQUENCE, $2, $4);
$$ = construct_type1(C_RECORD, $2);
| CHOICE DesignatorType OF '{' CandidateList '}'
$$ = construct_choice($2, $5);
| PROCEDURE ArgumentList ResultList ErrorList
$$ = construct_procedure($2, $3, $4);
$$ = construct_type1(C_ERROR, $2);
| identifier '.' identifier
yyerror("References to types in other Courier programs are not supported");
| CorrespondenceList ',' Correspondence
$$ = nconc($1, cons($3, NIL));
identifier '(' NumericValue ')'
| CandidateList ',' Candidate
$$ = nconc($1, cons($3, NIL));
DesignatorList '=''>' Type
| DesignatorList ',' Designator
$$ = nconc($1, cons($3, NIL));
| RETURNS '[' FieldList ']'
| REPORTS '[' NameList ']'
$$ = nconc($1, cons($3, NIL));
| identifier '.' identifier
yyerror("References to constants in other Courier programs are not supported");
| NameList ',' identifier
$$ = nconc($1, cons($3, NIL));