Now we have to specify the syntactic structure of RLA well-formed programs.
By means of Cup, we’ll then transform the parser specification (grammar, conflict resolution directives, ...) into a Java program implementing an LALR parser.
The parser specification of the RLA language is reported in the rla.cup file, that uses the scanner generated by rla.flex to perform lexical analysis and then generates the interface sym.java and the parser rlac.java.
We have slightly modified the previous version of mjava.flex, by introducing the class JavaSymbol.java to retrieve more detailed information about lexical tokens.
· run rla.bat
· you will get something like SampleParsingResult.txt printed to your Java console.