1
0
forked from GitHub/gf-core

Use _cat category as root in SRGS ABNF and JSGF. SRGS XML already did this.

This commit is contained in:
bringert
2007-01-21 17:10:10 +00:00
parent 71111e0a7c
commit abeb18fb20
2 changed files with 6 additions and 2 deletions

View File

@@ -60,7 +60,9 @@ prABNF sisr probs srg@(SRG{grammarName=name,grammarLanguage=ml,
language = maybe empty (\l -> text "language" <+> text l <> char ';') ml
tagFormat | isJust sisr = text "tag-format" <+> text "<semantics/1.0>" <> char ';'
| otherwise = empty
mainCat = text "root" <+> prCat start <> char ';'
mainCat = case cfgCatToGFCat origStart of
Just c -> text "root" <+> prCat (catFormId c) <> char ';'
Nothing -> empty
prRule (SRGRule cat origCat rhs) =
comment origCat $$
rule False cat (map prAlt (ebnfSRGAlts rhs))