1
0
forked from GitHub/gf-core

Added "bnf" output format for debugging.

This commit is contained in:
bjorn
2008-06-03 19:32:42 +00:00
parent c974ce4345
commit 5dea982489
4 changed files with 7 additions and 1 deletions

View File

@@ -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 ++"\"")
--