Skip to content
This repository was archived by the owner on Nov 18, 2023. It is now read-only.

RaulSeganfreddo/simplePascalParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimplePascalParser

Parser generation to check the syntax of Pascal code.

Table of contents:

Files description:

  • Makefile: self explanatory, the file for the make command;
  • Pascal.g4: the file that contains the grammar that the parser will use;
  • Syncheck.cpp: the file that use the parser to see if the Pascal code has one or more syntax errors;
  • Test: directory that contains some tests.

Set up:

You need to download ANTLR v4 from the official page and the c++ runtime dev, libantlr4-runtime-dev.

Usage:

First use the command make (to reverse it use make clean). Then when all files are created, you can execute the syncheck output file and use a test file as argument Example:

./syncheck test/valid.pas

Usage note:

If you try to use tests that you find in the test directory, it's normal that test from 5 to 8 output "1 syntax error found".

Credits:

This is a little project I made as a test for my university (Universita' Degli Studi di Padova), so part of the project is the foundation they gave me to build all.

About

Simple Pascal Parser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published