1
0
forked from GitHub/gf-core

added some new pattern forms, incl. pattern macros, to testgf3

This commit is contained in:
aarne
2008-02-01 22:01:10 +00:00
parent 3addf256bc
commit 4889558137
10 changed files with 66 additions and 7 deletions

View File

@@ -105,6 +105,9 @@ data Term =
| C Term Term -- ^ concatenation: @s ++ t@
| Glue Term Term -- ^ agglutination: @s + t@
| EPatt Patt
| EPattType Term
| FV [Term] -- ^ free variation: @variants { s ; ... }@
| Alts (Term, [(Term, Term)]) -- ^ prefix-dependent: @pre {t ; s\/c ; ...}@
@@ -130,6 +133,11 @@ data Patt =
| PAlt Patt Patt -- ^ disjunctive pattern: p1 | p2
| PSeq Patt Patt -- ^ sequence of token parts: p + q
| PRep Patt -- ^ repetition of token part: p*
| PChar -- ^ string of length one
| PChars String -- ^ list of characters
| PMacro Ident --
| PM Ident Ident
deriving (Read, Show, Eq, Ord)