Given the following grammar for a subset of Ada:
Prog -> procedure idt Args is
DeclarativePart
Procedures
begin
SeqOfStatements
end idt;
DeclarativePart -> IdentifierList : TypeMark ; DeclarativePart | e
IdentifierList -> idt |
IdentifierList , idt
TypeMark -> integert | realt | chart | const assignop Value
Value -> NumericalLiteral
Procedures -> Prog Procedures | e
Args -> ( ArgList ) | e
ArgList -> Mode IdentifierList : TypeMark MoreArgs
MoreArgs -> ; ArgList | e
Mode -> in | out | inout | e
SeqOfStatments -> e
Draw the parse trees for the following programs (PLEASE UNDERLINE ALL TOKENS):
begin
end two;
end six;
begin
end three;
Hint: You will probably want to use your paper sideways. Save this grammar, as it will be used in the next assignment.

![[SOLVED] Csc 446 assign #2 given the following grammar for a subset of ada: prog -> procedure idt args is](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[SOLVED] Cop 2220 assignment 4](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.