3460:430/530  Theory of Programming Languages                                              Fall 2005

Dr. C.-C. Chan                                                                                                                                   Due:  10/9/05

Project #3 (20 pts)

 

Problem:  Based on Project 2, extend the language to allow the following features:

 

            1.  Dynamic typed variables with the values:  integers, float, characters, and character strings.

            Characters are delimited by single quotes and strings are delimited by double quotes as in C++.

            Maximum string length is assumed to be 256 with ‘\0’ terminator.

 

            2.  Only operation of char allowed is assignment.  Operations of strings include:  assignment and cancatenation (using ‘+’ symbol),

 

                       

 

 

           

Implementation:

            1.  Add new token types for built-in functions.

            2.  Add new rules and corresponding actions to reflect the new features.

3.      Extend yylex function to recognize new features.

4.      You must create a symbol.c source file to implement the symbol table.

 

Error Checking:

Add operation of strings with numbers

 

Submissions:

1.  Name your source files as "LastName_p3.y". "LastName_p3.h", and "LastName_symbol.c".

2.  Send the source file by e-mail to sk39@uakron.edu   and chan@cs.uakron.edu

3.  The project is due by midnight of the due day.