summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraarne <unknown>2003-11-10 12:50:22 +0000
committeraarne <unknown>2003-11-10 12:50:22 +0000
commitc84ce99de2e9a17e2413f2f81cae0088170cc3b9 (patch)
treeb1ccdf00e62655a6115330da88cc13ff5c673752
parent47c029be3d92c5cdf7cf60ca1622dfbbfa1d2e30 (diff)
Glue things
-rw-r--r--grammars/prelude/Prelude.gf5
-rw-r--r--grammars/resource/finnish/MorphoFin.gf6
-rw-r--r--grammars/resource/finnish/ResFin.gf3
3 files changed, 10 insertions, 4 deletions
diff --git a/grammars/prelude/Prelude.gf b/grammars/prelude/Prelude.gf
index f5903d7ec..bda2f5f6d 100644
--- a/grammars/prelude/Prelude.gf
+++ b/grammars/prelude/Prelude.gf
@@ -80,4 +80,9 @@ oper
Predef.PFalse => False ; Predef.PTrue => True
} ;
+-- bind together two tokens in the lexer, either obligatorily or optionally
+
+ oper
+ bind : Str -> Str -> Str = \x,y -> x ++ "&+" ++ y ;
+ bindOpt : Str -> Str -> Str = \x,y -> variants {bind x y ; x ++ y} ;
} ;
diff --git a/grammars/resource/finnish/MorphoFin.gf b/grammars/resource/finnish/MorphoFin.gf
index 1eb43cf7c..c634999b4 100644
--- a/grammars/resource/finnish/MorphoFin.gf
+++ b/grammars/resource/finnish/MorphoFin.gf
@@ -456,10 +456,10 @@ getHarmony : Str -> Str = \u ->
} ;
-- The possessive suffixes will be needed in syntax. It will show up
--- as a separate word ("auto &ni"), which needs unlexing. Unlexing also
--- has to fix the vowel harmony in cases like "äiti &nsä".
+-- as a separate word ("auto &+ ni"), which needs unlexing. Unlexing also
+-- has to fix the vowel harmony in cases like "äiti &+ nsä".
- suff : Str -> Str = \ni -> "&" + ni ;
+ suff : Str -> Str = \ni -> "&+" ++ ni ;
possSuffix : Number => Person => Str = \\n,p =>
suff (case <n,p> of {
diff --git a/grammars/resource/finnish/ResFin.gf b/grammars/resource/finnish/ResFin.gf
index 9b154b9b5..d29eb7195 100644
--- a/grammars/resource/finnish/ResFin.gf
+++ b/grammars/resource/finnish/ResFin.gf
@@ -21,7 +21,8 @@ concrete ResFin of ResAbs = open Prelude, SyntaxFin in {
flags
startcat=Phr ;
- parser=chart ;
+ lexer=unglue ;
+ unlexer=glue ;
lincat
N = CommNoun ;