Skip to content

This is the repository for a lexer and parser implemented in Ply (https://www.dabeaz.com/ply/) for the CICOM language. This language is a made up language for a Programming Languages Course.

License

Notifications You must be signed in to change notification settings

agSant01/cicom-lang-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PLY Lexer and Parser

Usage

This is a guide for this project.

Makefile

For conviniece this project comes with a Makefile. To run execute de shell command

$ make test

and it will lex and parse the default test file, which is prof-test.txt and compare its output with the expected.

The compilation of python commands for running this the files directly can be found in the Makefile.

There are rules for runing the lexer and parser individually and for testing the output against expected outputs.

Parser

To run the parser:

$ make parse

Default input file can be modified by changing IN variable.

$ make parse IN=./file/path/file.txt

Output

Default outputs will be in out/. Can be modified by changing the OUT in the Makefile execution.

make test OUT=./relative-or-full/path/file.txt

About

This is the repository for a lexer and parser implemented in Ply (https://www.dabeaz.com/ply/) for the CICOM language. This language is a made up language for a Programming Languages Course.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published