Commit 09512507 authored by Thorsten Wißmann's avatar Thorsten Wißmann 🐧

Implement converter for the grammar rules of the berkeleyparser

This implements a new converter utility that handles the file format
of the .grammar files generated by berkeleyparser
https://github.com/slavpetrov/berkeleyparser
Though I am not entirely sure about the semantics, this provides a source
for non-randomly generated WTAs.
parent 9c8dcff8
......@@ -293,6 +293,20 @@ executable prism-converter
if !flag(benchmark-generators)
buildable: False
executable berkeleyparser-converter
hs-source-dirs: src/berkeleyparser-converter
main-is: Main.hs
default-language: Haskell2010
build-depends: base >= 4.11
, containers ^>= 0.6
, megaparsec >= 7 && <9
, optparse-applicative ^>= 0.14.3
, text
, mtl
ghc-options: -Wall -Wno-name-shadowing
if !flag(benchmark-generators)
buildable: False
test-suite prism-converter-tests
type: exitcode-stdio-1.0
hs-source-dirs: src/prism-converter
......
This diff is collapsed.
berkeleyparser-converter
========================
This subdirectory provides a utility for converting `.grammar` files as generated by
https://github.com/slavpetrov/berkeleyparser
to the copar input format.
......@@ -144,6 +144,7 @@ data RefineOptions = RefineOptions
, refineEnableSanity :: Bool
, refineEnableOpt :: Bool
, refineInputFile :: Maybe FilePath
-- , refineInputFormat :: InputFormat
, refineOutputFile :: Maybe FilePath
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment