Question: Please help me with that problem for exam Give a grammar that defines the language of simple (non-method) function prototypes in C++. Examples of these
Give a grammar that defines the language of simple (non-method) function prototypes in C++. Examples of these would be "int f (int x);", "void g2 (int jim, float x);", "char abc (void);". In general, you must have a data type, an identifier, a parameter list which consists of zero or more typeame pairs separated by comma's., and a terminating semicolon. For data types, you should allow char, int, and float. For identifiers (function and parameter names), you should allow any combination of one or more character, where the first character must be a letter and all other characters may be a letter or a numeric digit. Only include spaces where they must occur (between types and identifiers)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
