- all programs must start with “begin” and end with “end”
- all commands must be ended by “;”
- all variables must be declared just after “begin” in the following format;
int: i num;
- three types exist; “int”, “float”, “char”
- variables names may be any alphanumeric string, but they must start with a letter
- statements between “begin” and “end” can be either a variable declaration or an assignment
- an assignment includes four type of operators; +,-,*,/.
- the number of variables or constants in an expression is unlimited
- the presedence of operators given as..............
Your PL should include a well-defined regular grammar for variable names, rules for
variable declarations including their type, at least 4 arithmetic and 3 logical operators with
their precedence and associativity rules with and without parenthesis, indefinite number of
assignments with expressions having unlimited number of operands.
How can i do? I have to use C language and ANTLR