mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-07 02:02:51 -06:00
Karin C's example
This commit is contained in:
32
grammars/video/System/general.Prolog.gf
Normal file
32
grammars/video/System/general.Prolog.gf
Normal file
@@ -0,0 +1,32 @@
|
||||
-- File name system.Prolog.gf
|
||||
|
||||
include
|
||||
general.Abs.gf ;
|
||||
../icm100.Prolog.gf ;
|
||||
|
||||
|
||||
pattern
|
||||
greet = "greet" ;
|
||||
quit = "quit" ;
|
||||
|
||||
lin
|
||||
ask q = {s = app "ask" q.s} ;
|
||||
|
||||
lin
|
||||
---Language
|
||||
change_language = {s = "change_language"} ;
|
||||
language_alt = {s = "[" ++ "language" ++ "(" ++ "X" ++ ")" ++ "]" } ; -- hack!
|
||||
|
||||
---Actions
|
||||
pattern
|
||||
actionQ = "action" ;
|
||||
|
||||
lin
|
||||
whQuestion f = {s = "X" ++ "^" ++ app f.s "X"} ;
|
||||
altQuestion a1 a2 = {s = a1.s ++ a2.s};
|
||||
|
||||
--- Issue
|
||||
issue i = {s = app "issue" i.s} ;
|
||||
|
||||
pattern
|
||||
nil = "[]" ;
|
||||
Reference in New Issue
Block a user