Compiler-Design-Lab-15CSE385

Repo containing my work done by me during course of Compiler Design

  1. Java Program to create a simple tokenizer that recognizes and classifies identifiers, keywords and constants and upload your solution.

  2. Table driven scanner for recognizing registers r08eof, r3r1 and r1rr and upload your code with sample screen shots of output.

  3. Consider an input file which contains input strings (lexemes) of valid and invalid South African person identification numbers. Tokenize the valid and invalid strings (lexemes) using ANTLR.

  4. Recursive Descent Parser for

            E → E or T                 
              → E nor T 
              → E xor T 
              → T 
            T → F and T 
              → F nand T 
              → F 
            F → not F 
              → P 
            P → ( E ) 
              → i 
              → true 
              → false
    

    ANTLR Specification for

            S → S(S)S | ϵ
    
  5. Semantic Rules in ANTLR for finding decimal equivalent