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
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.