Extra Credit

0 comments

Given the attached documents for lex and yacc (using flex and bison on edoras), update this parser.l downloadlex specification file and this parser.y downloadyacc specification file to include the following grammar rule:

statement ::= <letter(s)> <number(s)> <‘ = ‘> <letter(s)> <number(s)><;>

Note, these specification files already implements the following rules (and compiles and runs cleanly):

letters ::= [a-z] | [A-Z]

numbers ::= [0-9]

To run the program, just type “parser” (the executable file) followed by the file for it to read and apply the rules to evaluate (e.g: $ parser state.txt).

This file, state.txt download runs cleanly with the two rules (letters and numbers). This file statements-1.txt download should run cleanly when you add the rule for statement.

This Makefile downloadwill cleanly compiler your project and generate the executable file, “parser”.

This is an individual assignment. Leave the files in your edoras account and upload the specification files to your turnin for this assignment.

——————————————————————————–

I attached all the files below, please help me out

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}