Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 625 Bytes

README.md

File metadata and controls

12 lines (8 loc) · 625 Bytes

Compiler

Compiler for almost any CFG-Compatible Language

This is an academic project which contains Lexical Analysis and Parser for given DFA & CFG (BNF Representation of a Language).

You can get the DFA with this tool: http://hackingoff.com/compilers/scanner-generator

Sample

There is a Sample folder corresponding to these projects, which can clarify usage of this program. For Lexer, you have to declare your DFA and Patterns inside DFA.cpp and place source.swift alongside compiled binary. Also for Parser, you need to provide token.txt and grammar.txt as Input files alongside compiled binary.