CParser.mesa
Copyright Ó 1992 by Xerox Corporation. All rights reserved.
Hopcroft, June 8, 1989 3:47:08 pm PDT
DIRECTORY
IO USING [STREAM],
OneCasabaParser USING [ParserTable];
CParser: CEDAR DEFINITIONS =
BEGIN
CParseTreeBody: TYPE = RECORD [
production: ProductionNames,
children: SEQUENCE size:CARDINAL OF REF ANY];
CParseTree: TYPE = REF CParseTreeBody;
this declaration text was produced by GenOneCasabaParser
ProductionNames: TYPE = {
Start, PrintResult, Expressionone, Expressionmore, AssignmentExpressioncond,
AssignmentExpressioneq, AssignmentExpressionmuleq, AssignmentExpressiondiveq,
AssignmentExpressionmodeq, AssignmentExpressionaddeq, AssignmentExpressionsubeq,
AssignmentExpressionshiftleq, AssignmentExpressionshiftreq, AssignmentExpressionandeq,
AssignmentExpressionxoreq, AssignmentExpressionoreq, ConditionalExpressionone,
ConditionalExpressionmore, LogicalOrExpressionone, LogicalOrExpressionmore,
LogicalAndExpressionone, LogicalAndExpressionmore, InclusiveOrExpressionone,
InclusiveOrExpressionmore, ExclusiveOrExpressionone, ExclusiveOrExpressionmore,
AndExpressionone, AndExpressionmore, EqualityExpressionrel, EqualityExpressioneq,
EqualityExpressionneq, RelationalExpressionone, RelationalExpressionlt,
RelationalExpressiongt, RelationalExpressionle, RelationalExpressionge,
ShiftExpressionadd, ShiftExpressionleft, ShiftExpressionright, AdditiveExpressionmul,
AdditiveExpressionadd, AdditiveExpressionsub, MultiplicativeExpressioncast,
MultiplicativeExpressionmul, MultiplicativeExpressiondiv, MultiplicativeExpressionmod,
CastExpressionunary, CastExpressioncast, UnaryExpressionpost, UnaryExpressioninc,
UnaryExpressiondec, UnaryExpressionand, UnaryExpressionptr, UnaryExpressionadd,
UnaryExpressionsub, UnaryExpressionbnot, UnaryExpressionlnot, UnaryExpressionsizeexpr,
UnaryExpressionsizetype, PostfixExpressionprimary, PostfixExpressionarray,
PostfixExpressioncall, PostfixExpressionrecord, PostfixExpressionrecptr, PostfixExpressioninc,
PostfixExpressiondec, PrimaryExpressionid, PrimaryExpressionconst, PrimaryExpressionstring,
PrimaryExpressionparen, TypeNamevoid, TypeNamechar, TypeNameshort, TypeNameint,
TypeNamelong, TypeNamefloat, TypeNamedouble, TypeNamesigned, TypeNameunsigned,
ArgumentExpressionListone, ArgumentExpressionListmore, Constantint, Constantchar,
Constantfloat, Constantenum,
Terminal type names must be added after the production type elements
IntegerConstant, CharacterConstant, FloatingConstant, String, Identifier
};
MakeCParseTree: PROC[table: OneCasabaParser.ParserTable, source: IO.STREAM, out:IO.STREAM] RETURNS [parseTree:CParseTree];
PrintParseTree: PROC [outStream:IO.STREAM, parseTree:REF ANY, depth:INT ¬ 0] RETURNS [] ;
END..