From c84ce99de2e9a17e2413f2f81cae0088170cc3b9 Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 10 Nov 2003 12:50:22 +0000 Subject: [PATCH] Glue things --- grammars/prelude/Prelude.gf | 5 +++++ grammars/resource/finnish/MorphoFin.gf | 6 +++--- grammars/resource/finnish/ResFin.gf | 3 ++- 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 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 ;