Starting from:

$30

Programming Languages Project Part II


CS 315 - Programming Languages

Project Part II

Street Network Definition and Querying Language
In Part II, we ask you to develop BNF grammars for your languages (one for the street network
definition language and one for the street network query language) and implement them using
yacc (there will be two parsers, one for the definition language and one for the query language).
The parsers will either accept a given input program (a definition or a query) as correct, or
output a list of erroneous lines.
Deliverables
• (20 pts.) The BNF grammars (one for the street network definition language and one for
the street network query language).
• (35 pts.) The parsers (including code + Makefile) (one for the street network definition
language and one for the street network query language).
• (10 pts.) 3 sample street network definitions and 5 sample street network queries that
are correct (your parsers should produce no errors for these).
• (10 pts.) Sample erroneous street network definitions illustrating 5 different kind of errors
(your street network definition parser should produce errors for these).
• (10 pts.) Sample erroneous street network queries illustrating 5 different kind of errors
(your street network query parser should produce errors for these).
• (10 pts.) The output from your parsers for the all the sample programs.
• (5 pts.) A report describing the challenges you have faced and how you addressed them.
Logistics
Once you are done, put your deliverable under a directory named group<GroupNo_proj2
and make an archive from that directory. It is important that your code should compile
1
without any issues using the make command. Once complete, it should output executables
called ‘definition_parser’ and ‘query_parser’, that can be used to parse your sample
inputs (street network definitions and street network queries). For example, the following Unix
commands could be used:
mkdir group < GroupNo _proj2
cd group < GroupNo _proj2
mkdir code # contains Makefile , lex , yacc , and C code
mkdir samples # contains the program samples
mkdir documents # contains the report
#( edit and test your files )
...
cd ..
tar - cvzf group < GroupNo _proj2 . tar . gz group < GroupNo _proj2
Then e-mail this newly generated file (named group<GroupNo_proj2.tar.gz) to your TA.
Reports in formats other than .pdf and .txt are not accepted.
2

More products