forked from GitHub/gf-core
SRG always has RE rhs.
This commit is contained in:
@@ -65,9 +65,9 @@ prABNF sisr probs srg@(SRG{grammarName=name,grammarLanguage=ml,
|
||||
Nothing -> empty
|
||||
prRule (SRGRule cat origCat rhs) =
|
||||
comment origCat $$
|
||||
rule False cat (map prAlt (ebnfSRGAlts rhs))
|
||||
rule False cat (map prAlt rhs)
|
||||
-- FIXME: use the probability
|
||||
prAlt (EBnfSRGAlt mp n rhs) = sep [initTag, parens (prItem sisr n rhs), finalTag]
|
||||
prAlt (SRGAlt mp n rhs) = sep [initTag, parens (prItem sisr n rhs), finalTag]
|
||||
where initTag = tag sisr (profileInitSISR n)
|
||||
finalTag = tag sisr (profileFinalSISR n)
|
||||
|
||||
@@ -80,7 +80,7 @@ catFormId = (++ "_cat")
|
||||
prCat :: SRGCat -> Doc
|
||||
prCat c = char '$' <> text c
|
||||
|
||||
prItem :: Maybe SISRFormat -> CFTerm -> EBnfSRGItem -> Doc
|
||||
prItem :: Maybe SISRFormat -> CFTerm -> SRGItem -> Doc
|
||||
prItem sisr t = f 1
|
||||
where
|
||||
f _ (REUnion []) = text "$VOID"
|
||||
|
||||
Reference in New Issue
Block a user