summaryrefslogtreecommitdiff
path: root/old-examples/unix/Unix.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-06-25 16:54:35 +0000
committeraarne <aarne@cs.chalmers.se>2008-06-25 16:54:35 +0000
commite9e80fc389365e24d4300d7d5390c7d833a96c50 (patch)
treef0b58473adaa670bd8fc52ada419d8cad470ee03 /old-examples/unix/Unix.gf
parentb96b36f43de3e2f8b58d5f539daa6f6d47f25870 (diff)
changed names of resource-1.3; added a note on homepage on release
Diffstat (limited to 'old-examples/unix/Unix.gf')
-rw-r--r--old-examples/unix/Unix.gf43
1 files changed, 43 insertions, 0 deletions
diff --git a/old-examples/unix/Unix.gf b/old-examples/unix/Unix.gf
new file mode 100644
index 000000000..ea5e2c2af
--- /dev/null
+++ b/old-examples/unix/Unix.gf
@@ -0,0 +1,43 @@
+abstract Unix = Char ** {
+
+ cat
+ S ; -- whole command line
+ Command ; -- one command
+ File ; -- file name
+ Word ; -- string e.g. in grep
+ [Word] {1} ; --
+
+ fun
+
+-- Catch-all: command dictated letter by letter.
+
+ CommWords : [Word] -> Command ;
+
+-- General command-line structure.
+
+ Redirect : S -> File -> S ; -- cs >f
+ Pipe : S -> Command -> S ; -- cs | c
+ Comm : Command -> S ; -- c
+
+--- This would be cool, but is it supported by speech recognition?
+--- CommOpt : (c : Command) -> [Option c] -> S ; -- c -o -k
+
+ WhatTime : Command ;
+ WhatDate : Command ;
+ WhereNow : Command ;
+ Remove : File -> Command ;
+ Copy : File -> File -> Command ;
+ Linecount : File -> Command ;
+ Wordcount : File -> Command ;
+ Grep : Word -> File -> Command ;
+ Cat : File -> Command ;
+
+ It : File ; -- no file name - contents received from pipe
+
+ FileChars : [Chr] -> File ;
+ WordChars : [Chr] -> Word ;
+
+ FileSuffix : Word -> File ; -- *suff
+ FilePrefix : Word -> File ; -- pref*
+
+}