Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Coding:
1. Define a syntax in term of token sequence for each statement type in your program i.e.
declaration statement, assignment statements, loops etc
2. Use the optimized transition diagram for parsing each statement and making a Predictive
Parser. You will be dealing with a procedural approach.
Documentation
1. You will make a separate chapter for each phase of compiler.
Presentation
5. Each group member should speak in the
presentation turn by turn
Modify the code to make the lexical analyzer more friendly and informative
1. Allow nested levels in the code and store accordingly in the symbol table
2. Mention the total number of words and lines in the source code
3. Generate informative errors in the code along with the line numbers.
How can a lexical analyzer specify and recognize the following patterns?
3. Identifiers over {$, c, ., 0, … ,9} that are legal descriptions of monetary quantities. e.g $43 ,
$5.22, 54c, and so on
5. Identifiers over {/, 0, … ,9} that contain date values in the format dd/mm/yyyy
2. B= (( c + a) * d ) / f
3. While ( a < 5 )
a= a+1
4. Char MyCourse[5];
5. if ( a< b)
a=a*a;
else
b=b*b;
int kk = 0;
proc doFoo {
return kk * x17;