mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
Glue things
This commit is contained in:
@@ -80,4 +80,9 @@ oper
|
|||||||
Predef.PFalse => False ; Predef.PTrue => True
|
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} ;
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -456,10 +456,10 @@ getHarmony : Str -> Str = \u ->
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- The possessive suffixes will be needed in syntax. It will show up
|
-- The possessive suffixes will be needed in syntax. It will show up
|
||||||
-- as a separate word ("auto &ni"), which needs unlexing. Unlexing also
|
-- as a separate word ("auto &+ ni"), which needs unlexing. Unlexing also
|
||||||
-- has to fix the vowel harmony in cases like "äiti &nsä".
|
-- 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 =>
|
possSuffix : Number => Person => Str = \\n,p =>
|
||||||
suff (case <n,p> of {
|
suff (case <n,p> of {
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ concrete ResFin of ResAbs = open Prelude, SyntaxFin in {
|
|||||||
|
|
||||||
flags
|
flags
|
||||||
startcat=Phr ;
|
startcat=Phr ;
|
||||||
parser=chart ;
|
lexer=unglue ;
|
||||||
|
unlexer=glue ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
N = CommNoun ;
|
N = CommNoun ;
|
||||||
|
|||||||
Reference in New Issue
Block a user