Skip to content

Contains a lexical and syntactic analysis programs (c++) for SNL programming language.

Notifications You must be signed in to change notification settings

thechentr/SNL-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SNL Compiler

This project includes:

  • Lexical analysis program for the SNL language written in C
  • Recursive descent parser for the SNL language written in C
  • LL(1) parser for the SNL language written in C

Written in Python:

  • Program to compute the Predict set for any language production rule
  • Program to automatically generate the three C programs above for any language's production rules

Additionally:

  • A txt document containing 104 production rules for the SNL language

For detailed information, please refer to my blog:
中文版
English version

In addition, this project provides test samples and executable program files. You can directly run SNL_compiler\analyse.exe to see the program's functionality.

For the automatic generation program, you can delete SNL_compiler and run SNL Syntax Analyzer Code Generator.py to regenerate the C language code. (This will regenerate a version of SNL_compiler identical to the previous one, but without the test samples and executable program files. You will need to recompile it.)

About

Contains a lexical and syntactic analysis programs (c++) for SNL programming language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published