mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-12 04:32:50 -06:00
Added "bnf" output format for debugging.
This commit is contained in:
@@ -270,7 +270,7 @@ countRules = length . allRules
|
||||
prCFG :: CFG -> String
|
||||
prCFG = unlines . map prRule . allRules
|
||||
where
|
||||
prRule r = lhsCat r ++ " --> " ++ unwords (map prSym (ruleRhs r))
|
||||
prRule r = lhsCat r ++ " ::= " ++ unwords (map prSym (ruleRhs r))
|
||||
prSym = symbol id (\t -> "\""++ t ++"\"")
|
||||
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user