A compiler for a subset of Pascal (called MiniPas / MiniPascal), written in Rascal, a meta-programming language.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
channa 705249bfae Made progress on the AST 6 months ago
META-INF New project 6 months ago
src/main/rascal Made progress on the AST 6 months ago
test/input Made progress on the AST 6 months ago
.gitignore Syntax Finished 6 months ago
README.md New project 6 months ago
pom.xml New project 6 months ago

README.md

A compiler for MiniPas using Rascal

  • In my compiler construction subject, we made a compiler for a language called MiniPas (a subset of Pascal) in C. It generates LLIR code from a .pas file.

Grammar

  • The grammar of the langauge can be found in src/Syntax.rsc. We make some comments here.
  • Since MiniPas has notions of both functions and procedures, we refer to either as a SubProg.
  • Keywords are case insensitive but identifiers are case sensitive.

Acknowledgements

  • The grammar of MiniPas is from the course Compiler Construction in the University of Groningen. The programs in test/input for MiniPas are from this course as well.
  • The structure of the Rascal code comes from the course Software Language Engineering in the University of Groningen