Skip to content
/ Coberon Public

Compiler Frontend for Oberon-0 written in C with Flex and Bison.

License

Notifications You must be signed in to change notification settings

rsarky/Coberon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coberon ✨

A compiler front end for Oberon-0.
NOTE: Coberon is an Academic Project and it is still WIP.

Compilation

$ make all

Where in.txt is the test input.

Branches

master : A simple lexer and parser.
implement-ast : Adds on to master by implementing a basic AST for a subset of the grammar along with a Symbol Table.

Usage

master branch:

$ ./parser [-t] -f

implement-ast

$ ./parser [-t] [-a] [-s] -f

Options

  • -t Print the tokens extracted from the input by the lexer.
  • -a Print the Abstract Syntax Tree.
  • -s Print the contents of the Symbol Table.
  • -f Input File (Mandatory)

Future Goals

The project has a lot of scope for enhancements, namely:

  • Extending support for the AST and Symbol Table to the entire Oberon-0 grammar.
  • Implementing a Symbol Table for multiple scopes.
  • Including better Error Recovery methods.
  • Implementing a backend for the Compiler using LLVM.

Contributing

I intend to make Coberon into a fully functional Oberon-0 compiler and all contributions are welcome.

About

Compiler Frontend for Oberon-0 written in C with Flex and Bison.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published