Syntax Analyzer using Recursive Descent Method in Java

Java Program

Development Period

1 day

Project Summary

This project involves writing a syntax analyzer using the recursive descent method in Java. It implements grammar rules to parse and analyze input strings based on two different grammars.

Objective

The objective of this project was to implement a syntax analyzer using the recursive descent method in Java. The analyzer needed to correctly parse and validate input strings according to the specified grammars (G1 and Exercise2). This exercise aimed to demonstrate understanding and proficiency in recursive descent parsing techniques.

Features & Details

Recursive Descent Implementation

  • Implemented recursive descent parsing to handle grammar rules and parse input strings accordingly.
  • Grammar 1 & 2 Implementation

  • Developed parsing rules based on Grammar G1 (S -> x/y/(T), T -> S/SA, A -> SA/ε) and Exercise 2 (S-->CSd/AB A-->aAb/ε B-->bB/ε C-->cC/ε).
  • Java Programming

  • Utilized Java for its object-oriented capabilities and implemented parsing algorithms efficiently.
  • project-img-1

    Results

    The Syntax Analyzer project successfully implements a recursive descent parser in Java, capable of parsing input strings according to specified grammars (G1 and Exercise2). It demonstrates proficiency in parsing techniques, grammar implementation, and Java programming.