Question: Design phrase structure grammar for a programming language called myC with the following minimum set of features. myC is derived from C by many simplification.
Design phrase structure grammar for a programming language called myC with the following minimum set of features.
myC is derived from C by many simplification.
It has primitive data types int, float, char, boolean, string and array types. Arrays can be multi-dimensional.
It has assignment statements, conditional statements and loop statements.
It has arithmetic expressions consisting of variables, numbers and arithmetic operators. It also has string literals and string operators.
It has Boolean expressions formed using relational operations on arithmetic and string expressions, and logic conjunction, disjunction and negation.
It supports type declaration of variables.
It supports declaration and invocation of functions.
Write an unambiguous grammar for myC.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
