SELECT CParser.ProductionNames[
VAL[rule]]
FROM
Two operand productions:
Expressionmore, AssignmentExpressioneq, AssignmentExpressionmuleq,
AssignmentExpressiondiveq,
AssignmentExpressionmodeq, AssignmentExpressionaddeq, AssignmentExpressionsubeq,
AssignmentExpressionshiftleq, AssignmentExpressionshiftreq,
AssignmentExpressionandeq, AssignmentExpressionxoreq, AssignmentExpressionoreq,
LogicalOrExpressionmore, LogicalAndExpressionmore, InclusiveOrExpressionmore,
ExclusiveOrExpressionmore, AndExpressionmore, EqualityExpressioneq,
EqualityExpressionneq, RelationalExpressionlt, RelationalExpressiongt,
RelationalExpressionle, RelationalExpressionge, ShiftExpressionleft,
ShiftExpressionright, AdditiveExpressionadd, AdditiveExpressionsub,
MultiplicativeExpressionmul, MultiplicativeExpressiondiv,
MultiplicativeExpressionmod, CastExpressioncast,
PostfixExpressionarray, PostfixExpressioncall, PostfixExpressionrecord,
PostfixExpressionrecptr, ArgumentExpressionListmore => {
IO.PutF[newOut,"Two operand\n"];
temp ← NEW[CParser.CParseTreeBody[2]];
← [production:ProductionNames[VAL[rule]], children:NULL]];
temp^.production ← CParser.ProductionNames[VAL[rule]];
temp^.children[1] ← partialValues.first;
temp^.children[0] ← partialValues.rest.first;
partialValues ← CONS[temp, partialValues.rest.rest]
};
One operand productions:
UnaryExpressioninc, UnaryExpressiondec, UnaryExpressionand, UnaryExpressionptr,
UnaryExpressionsub, UnaryExpressionbnot, UnaryExpressionlnot,
UnaryExpressionsizeexpr, UnaryExpressionsizetype, PostfixExpressioninc,
PostfixExpressiondec => {
temp ← NEW[CParser.CParseTreeBody[1]];
← [production:ProductionNames[VAL[rule]], children:NULL]];
temp^.production ← CParser.ProductionNames[VAL[rule]];
temp^.children[0] ← partialValues.first;
partialValues ← CONS[temp, partialValues.rest]
};
No operand productions:
Start, TypeNamevoid, TypeNamechar, TypeNameshort, TypeNameint, TypeNamelong,
TypeNamefloat, TypeNamedouble, TypeNamesigned, TypeNameunsigned, UnaryExpressionadd => {
temp ← NEW[CParser.CParseTreeBody[0]];
← [production:ProductionNames[VAL[rule]], children:NULL]];
temp^.production ← CParser.ProductionNames[VAL[rule]];
partialValues ← CONS[temp, partialValues]
};
Three operand productions:
ConditionalExpressionmore => {
temp ← NEW[CParser.CParseTreeBody[3]];
← [production:ProductionNames[VAL[rule]], children:NULL]];
temp^.production ← CParser.ProductionNames[VAL[rule]];
temp^.children[2] ← partialValues.first;
temp^.children[1] ← partialValues.rest.first;
temp^.children[0] ← partialValues.rest.rest.first;
partialValues ← CONS[temp, partialValues.rest.rest.rest]
};
No operation productions:
PrintResult, Expressionone, AssignmentExpressioncond,
ConditionalExpressionone,
LogicalOrExpressionone, LogicalAndExpressionone,
InclusiveOrExpressionone, ExclusiveOrExpressionone,
AndExpressionone, EqualityExpressionrel, RelationalExpressionone,
ShiftExpressionadd, AdditiveExpressionmul, MultiplicativeExpressioncast,
CastExpressionunary, UnaryExpressionpost, PostfixExpressionprimary,
PrimaryExpressionid, PrimaryExpressionconst,
PrimaryExpressionstring, PrimaryExpressionparen, ArgumentExpressionListone,
Constantint, Constantchar, Constantfloat, Constantenum => {};
ENDCASE => ERROR;
IO.PutF[newOut,"Reduce rule %g\n",IO.rope[ProductionNameRopes[ORD[rule]]]]