Added support for cf and ebnf formats

This commit is contained in:
aarne
2004-03-31 12:30:34 +00:00
parent f0cbb89778
commit 8d828c46d5
17 changed files with 280 additions and 31 deletions

View File

@@ -40,9 +40,9 @@ cf2rule (fun, (cat, items)) = (def,ldef) where
ldef = (f, CncFun
Nothing
(yes (mkAbs (map fst args)
(mkRecord linLabel [foldconcat (map mkIt args0)])))
(mkRecord (const theLinLabel) [foldconcat (map mkIt args0)])))
nope)
mkIt (v, CFNonterm _) = P (Vr v) (linLabel 0)
mkIt (v, CFNonterm _) = P (Vr v) theLinLabel
mkIt (_, CFTerm (RegAlts [a])) = K a
mkIt _ = K "" --- regexp not recognized in input CF ; use EBNF for this
foldconcat [] = K ""