diff options
| author | aarne <unknown> | 2004-09-16 14:47:18 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2004-09-16 14:47:18 +0000 |
| commit | ecc132dccfc7617ed413f21ee37539475081f8ec (patch) | |
| tree | f6fe589eb3881e36b9a94d36aaba49fe4d4087e4 /grammars/video/System | |
| parent | 7769d0fb00a34fb4499017a4aec01a59246b69a1 (diff) | |
Karin C's example
Diffstat (limited to 'grammars/video/System')
| -rw-r--r-- | grammars/video/System/genSystem.gf | 37 | ||||
| -rw-r--r-- | grammars/video/System/genSystemProlog.gf | 32 | ||||
| -rw-r--r-- | grammars/video/System/genSystemSwe.gf | 32 | ||||
| -rw-r--r-- | grammars/video/System/general.Prolog.gf | 32 | ||||
| -rw-r--r-- | grammars/video/System/re2specific.Swe.gf | 60 | ||||
| -rw-r--r-- | grammars/video/System/specSystem.gf | 59 | ||||
| -rw-r--r-- | grammars/video/System/specSystemProlog.gf | 45 | ||||
| -rw-r--r-- | grammars/video/System/specSystemSwe.gf | 49 | ||||
| -rw-r--r-- | grammars/video/System/specific.Prolog.gf | 46 |
9 files changed, 392 insertions, 0 deletions
diff --git a/grammars/video/System/genSystem.gf b/grammars/video/System/genSystem.gf new file mode 100644 index 000000000..d25fb0fee --- /dev/null +++ b/grammars/video/System/genSystem.gf @@ -0,0 +1,37 @@ +-- general.Abs.gf + +abstract genSystem = general ** { + + +cat +Empty ; -- whatever this is good for? +Question ; +YNQuestion ; +WHQuestion ; +AltQuestion ; +PropQ ; + + +fun +greet : DMove ; -- "Welcome" +quit : DMove ; -- "Goodbye" + +ask : Question -> DMove ; + +--- Language +change_language : Action ; +language_alt : Question ; + +--- Actions +actionQ : WHQuestion ; + +--- Questions +whQuestion : WHQuestion -> Question ; +altQuestion : YNQuestion -> YNQuestion -> AltQuestion ; + +--- Issue +issue : Question -> PropQ ; + +--- Lists +nil : Empty ; +} diff --git a/grammars/video/System/genSystemProlog.gf b/grammars/video/System/genSystemProlog.gf new file mode 100644 index 000000000..511c80b7e --- /dev/null +++ b/grammars/video/System/genSystemProlog.gf @@ -0,0 +1,32 @@ +-- File name system.Prolog.gf + +concrete genSystemProlog of genSystem = generalProlog ** + open prologResource in { + + +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 = "[]" ; +} diff --git a/grammars/video/System/genSystemSwe.gf b/grammars/video/System/genSystemSwe.gf new file mode 100644 index 000000000..8b9a93b0d --- /dev/null +++ b/grammars/video/System/genSystemSwe.gf @@ -0,0 +1,32 @@ +-- File name System/general.Swe.gf + +concrete genSystemSwe of genSystem = generalSwe ** open icm100ResSwe in { + +---- flags lexer=codelit ; unlexer=codelit ; startcat=DMoveList ; + +pattern +greet = ["Välkommen till videobandspelaren"] ; +quit = "hejdå" ; + +lin +ask a = {s = a.s} ; + +lin +---Language +change_language = {s = "byt" ++ "språk"} ; +language_alt = {s = ["vill du använda svenska eller engelska"]} ; + +---Actions +lin +actionQ = {s = "Vad" ++ "kan" ++ "jag" ++ "stå" ++ "till" ++ "tjänst" ++ "med"} ; + +lin +whQuestion w = {s = w.s }; +altQuestion a1 a2 = {s = "vill" ++ "du" ++ "spela" ++ "in" ++ a1.s ++ "eller" ++ a2.s}; + +--- Issue +issue i = {s = i.s} ; + +pattern +nil = "[]" ; +}
\ No newline at end of file diff --git a/grammars/video/System/general.Prolog.gf b/grammars/video/System/general.Prolog.gf new file mode 100644 index 000000000..942d43e9c --- /dev/null +++ b/grammars/video/System/general.Prolog.gf @@ -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 = "[]" ;
\ No newline at end of file diff --git a/grammars/video/System/re2specific.Swe.gf b/grammars/video/System/re2specific.Swe.gf new file mode 100644 index 000000000..664f3ef95 --- /dev/null +++ b/grammars/video/System/re2specific.Swe.gf @@ -0,0 +1,60 @@ +-- File name System/specific.Swe.gf + +include + specific.Abs.gf ; + +lin +-- Confirm recording job +confirmRecJob act = {s = ["bekräftar"] ++ act.s } ; +-- programmet är inspelat -- spela in +-- inspelningen är tillagd -- lägga till +-- programmet är borttaget -- ta bort + +q_lambdaActionDel dact = {s = ["vilket programnummer vill du ta bort"]}; + + + +vcr_add_rec_job_no_args = {s = ["spela in"]} ; -- hack!!! + + + +--- Time in question +startTimeToStoreQ st = {s = "från" ++ st.s } ; +-- prep Time +endTimeToStoreQ et = {s = "till" ++ et.s } ; +-- prep Time + +--- Channel and Weekday in question +channelToStoreQ ch = {s = "på" ++ ch.s } ; +-- prep Channel +weekdayToStoreQ wd = {s = "på" ++ wd.s } ; +--prep Weekday + + +--- WHQuestions --- Lambdas +q_lambdaWeekday wdts = {s = ["vilken dag vill du spela in på"]}; +q_lambdaChannel chts = {s = ["vilken kanal vill du spela in från"]}; +q_lambdaStartTime stts = {s = ["vilken tid vill du påbörja inspelningen"]}; +q_lambdaEndTime etts = {s = ["vilken tid vill du avsluta inspelningen"]}; + + + +--- Constructions for ynquestions +lin +ynQuST y = {s = y.s} ; +ynQuET y = {s = y.s} ; +ynQuCH y = {s = y.s} ; +ynQuWD y = {s = y.s} ; + +lin +--- Props +startTimeToStoreProp st = {s = st.s } ; +endTimeToStoreProp et = {s = et.s } ; +channelToStoreProp chst = {s = chst.s } ; +weekdayToStoreProp wdts = {s = wdts.s } ; + +channelListing chs = {s = chs.s } ; +channels1 ch = {s = ch.s } ; +channels2 ch chs = {s = ch.s ++ "," ++ chs.s } ; +channelListAction ch = {s = ch.s } ; +channelListActionDMove ch = {s = ch.s } ;
\ No newline at end of file diff --git a/grammars/video/System/specSystem.gf b/grammars/video/System/specSystem.gf new file mode 100644 index 000000000..0b5f6957e --- /dev/null +++ b/grammars/video/System/specSystem.gf @@ -0,0 +1,59 @@ +-- File name System/specific.Abs.gf + +abstract specSystem = specific, genSystem ** { + +cat +StartTimeQ ; +EndTimeQ ; +ChToStoreQ ; +WdToStoreQ ; + +fun +confirmRecJob : Action -> DMove; +---- vcr_add_rec_job_no_args : Action ; -- spela in! moved to specific + +q_lambdaActionDel : DelAction -> WHQuestion ; + +-- Time in question +startTimeToStoreQ : Time -> StartTimeQ ; +endTimeToStoreQ : Time -> EndTimeQ ; + +--- Channel and Weekday in question +channelToStoreQ : Channel -> ChToStoreQ ; +weekdayToStoreQ : Weekday -> WdToStoreQ ; + +--- WHQuestions --- Lambdas +q_lambdaStartTime : StartTime -> WHQuestion ; +q_lambdaEndTime : EndTime -> WHQuestion ; +q_lambdaWeekday : WdToStore -> WHQuestion ; +q_lambdaChannel : ChToStore -> WHQuestion ; + + +--- Constructions for ynquestions +ynQuST : StartTimeQ -> YNQuestion ; +ynQuET : EndTimeQ -> YNQuestion ; +ynQuCH : ChToStoreQ -> YNQuestion ; +ynQuWD: WdToStoreQ -> YNQuestion ; + + +--- Props +startTimeToStoreProp : StartTime -> Prop ; +endTimeToStoreProp : EndTime -> Prop ; +channelToStoreProp : ChToStore -> Prop ; +weekdayToStoreProp : WdToStore -> Prop ; + + +cat +ChannelList ; +Channels ; +ChannelAction ; + +fun +channelListing : Channels -> ChannelList ; +channels1 : Channel -> Channels ; +channels2 : Channel -> Channels -> Channel ; +channelListAction : ChannelList -> ChannelAction ; +--channelListAction : ChannelList -> DMove ; +channelListActionDMove : ChannelAction -> DMove ; + +} diff --git a/grammars/video/System/specSystemProlog.gf b/grammars/video/System/specSystemProlog.gf new file mode 100644 index 000000000..6ee65c4e3 --- /dev/null +++ b/grammars/video/System/specSystemProlog.gf @@ -0,0 +1,45 @@ +-- File name System/specific.Prolog.gf + +concrete specSystemProlog of specSystem = genSystemProlog, specificProlog ** + open prologResource in { + +lin +-- Confirm recording job +confirmRecJob act = {s = app "confirm" act.s } ; + +q_lambdaActionDel dact = {s = ["rec_job_to_delete"]} ; + +--- Time in question +startTimeToStoreQ st = {s = app "start_time_to_store" st.s } ; +endTimeToStoreQ et = {s = app "stop_time_to_store" et.s } ; + +--- Channel and Weekday in question +channelToStoreQ ch = {s = app "channel_to_store" ch.s } ; +weekdayToStoreQ wd = {s = app "weekday_to_store" wd.s } ; + +--- WHQuestions --- Lambdas +q_lambdaWeekday wdts = {s = ["weekday_to_store"]} ; +q_lambdaChannel chts = {s = ["channel_to_store"]} ; +q_lambdaStartTime stts = {s = ["start_time_to_store"]} ; +q_lambdaEndTime etts = {s = ["stop_time_to_store"]} ; + + +--- Constructions for ynquestions +lin +ynQuST y = {s = y.s} ; +ynQuET y = {s = y.s} ; +ynQuCH y = {s = y.s} ; +ynQuWD y = {s = y.s} ; + +--- Props +startTimeToStoreProp st = {s = st.s } ; +endTimeToStoreProp et = {s = et.s } ; +channelToStoreProp chst = {s = chst.s } ; +weekdayToStoreProp wdts = {s = wdts.s } ; + +channelListing chs = {s = chs.s } ; +channels1 ch = {s = ch.s } ; +channels2 ch chs = {s = ch.s ++ "," ++ chs.s } ; +channelListAction ch = {s = ch.s } ; +channelListActionDMove ch = {s = ch.s } ; +}
\ No newline at end of file diff --git a/grammars/video/System/specSystemSwe.gf b/grammars/video/System/specSystemSwe.gf new file mode 100644 index 000000000..e2f59cb89 --- /dev/null +++ b/grammars/video/System/specSystemSwe.gf @@ -0,0 +1,49 @@ +--# -path=.:..:../Shared:../Weekday:../Time:../Channel + +-- File name System/specific.Swe.gf + +concrete specSystemSwe of specSystem = specificSwe, genSystemSwe ** { + +lin +-- Confirm recording job +confirmRecJob act = {s = ["bekräftar"] ++ act.s } ; + +q_lambdaActionDel dact = {s = ["vilket programnummer vill du ta bort"]}; + +---- vcr_add_rec_job_no_args = {s = ["spela in"]} ; -- hack!!! + +--- Time in question +startTimeToStoreQ st = {s = "från" ++ st.s } ; +endTimeToStoreQ et = {s = "till" ++ et.s } ; + +--- Channel and Weekday in question +channelToStoreQ ch = {s = "på" ++ ch.s } ; +weekdayToStoreQ wd = {s = "på" ++ wd.s } ; + +--- WHQuestions --- Lambdas +q_lambdaWeekday wdts = {s = ["vilken dag vill du spela in på"]}; +q_lambdaChannel chts = {s = ["vilken kanal vill du spela in från"]}; +q_lambdaStartTime stts = {s = ["vilken tid vill du påbörja inspelningen"]}; +q_lambdaEndTime etts = {s = ["vilken tid vill du avsluta inspelningen"]}; + + +--- Constructions for ynquestions +lin +ynQuST y = {s = y.s} ; +ynQuET y = {s = y.s} ; +ynQuCH y = {s = y.s} ; +ynQuWD y = {s = y.s} ; + +lin +--- Props +startTimeToStoreProp st = {s = st.s } ; +endTimeToStoreProp et = {s = et.s } ; +channelToStoreProp chst = {s = chst.s } ; +weekdayToStoreProp wdts = {s = wdts.s } ; + +channelListing chs = {s = chs.s } ; +channels1 ch = {s = ch.s } ; +channels2 ch chs = {s = ch.s ++ "," ++ chs.s } ; +channelListAction ch = {s = ch.s } ; +channelListActionDMove ch = {s = ch.s } ; +} diff --git a/grammars/video/System/specific.Prolog.gf b/grammars/video/System/specific.Prolog.gf new file mode 100644 index 000000000..80f9d0764 --- /dev/null +++ b/grammars/video/System/specific.Prolog.gf @@ -0,0 +1,46 @@ +-- File name System/specific.Prolog.gf + +include + specific.Abs.gf ; + +lin +-- Confirm recording job +confirmRecJob act = {s = app "confirm" act.s } ; + +q_lambdaActionDel dact = {s = ["rec_job_to_delete"]} ; + +vcr_add_rec_job_no_args = {s = ["add_rec_job"]} ; -- hack!!! + +--- Time in question +startTimeToStoreQ st = {s = app "start_time_to_store" st.s } ; +endTimeToStoreQ et = {s = app "stop_time_to_store" et.s } ; + +--- Channel and Weekday in question +channelToStoreQ ch = {s = app "channel_to_store" ch.s } ; +weekdayToStoreQ wd = {s = app "weekday_to_store" wd.s } ; + +--- WHQuestions --- Lambdas +q_lambdaWeekday wdts = {s = ["weekday_to_store"]} ; +q_lambdaChannel chts = {s = ["channel_to_store"]} ; +q_lambdaStartTime stts = {s = ["start_time_to_store"]} ; +q_lambdaEndTime etts = {s = ["stop_time_to_store"]} ; + + +--- Constructions for ynquestions +lin +ynQuST y = {s = y.s} ; +ynQuET y = {s = y.s} ; +ynQuCH y = {s = y.s} ; +ynQuWD y = {s = y.s} ; + +--- Props +startTimeToStoreProp st = {s = st.s } ; +endTimeToStoreProp et = {s = et.s } ; +channelToStoreProp chst = {s = chst.s } ; +weekdayToStoreProp wdts = {s = wdts.s } ; + +channelListing chs = {s = chs.s } ; +channels1 ch = {s = ch.s } ; +channels2 ch chs = {s = ch.s ++ "," ++ chs.s } ; +channelListAction ch = {s = ch.s } ; +channelListActionDMove ch = {s = ch.s } ;
\ No newline at end of file |
