Find file
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (23 sloc) 1.11 KB
A grammar for GHC External Core.
(c) Aarne Ranta 2003 under GNU GPL.
The grammar is in and it is compiled with
bnfc -m ; make
To test it on an ext-core file, either do
hugs -P.:/home/aarne/BNFC: TestCore.hs
hugsprompt> runFile pModule "<file.hcr>"
or, if the file is big,
ghc --make -i/home/aarne/BNFC TopCore.hs -o TopCore
./TopCore <file.hcr>
replacing /home/aarne/BNFC with your BNFC directory in both cases.
I guess there will be some problems with qualified/unqualified
identifiers depending on GHC version. Mine is fairly old, 5.02.2.
The .hcr files in the package core.tgz are generated by that,
so they will work at least.
BNF Converter grammar for GHC External Core.
(c) Aarne Ranta 6/11/2003 under GNU GPL
on the basis of ExternalCore.lhs and ParserExternalCore.y
from the University of Glasgow (2001)
Differences from source abstract syntax are marked with ---
Grammar in a broad sense fetched automatically by Vadim Zaytsev,