Skip to content

facumolina/c-tdscompiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C-TDS Compiler

It's a compiler for a simple programming language.

Stack

C-TDS Compiler will use the following open source tools:

  • Java - Java programming language.
  • Junit - Framework to write repeatable tests.
  • JFlex - Lexical analyzer generator (also known as scanner generator) for Java, written in Java.
  • Cup - CUP stands for Construction of Useful Parsers and is an LALR parser generator for Java.

Installation

  • After cloning the repository, compile the sources ./compile.sh

  • The compilation will generate the following classes:

  	CTdsScanner.java (Representing the lexical analyzer defined in the file src/main/jflex/ctdsscanner.flex)
  	CtdsScannerStandalone.java (Representing the lexical analyzaer for testing purposes)
  	CTdsParser.java (Representing the parser defined in the file src/main/cup/ctdsparser.cup)
  	CTdsSymbol.java (Representing the symbols of the language defined in the same file as the parser)
   CTdsCompiler.java (Representing the entire compiler)

Running

  • Run the defined tests ./test.sh

  • Run only the parser with your own file ./runParser.sh file.ctds

  • Run the entire compiler ./runCompiler.sh file.ctds

About

Compiler of a subset of the C programming language

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published