diff options
| author | bringert <bringert@cs.chalmers.se> | 2005-12-01 13:11:01 +0000 |
|---|---|---|
| committer | bringert <bringert@cs.chalmers.se> | 2005-12-01 13:11:01 +0000 |
| commit | 30bb51372fa8fdb6d68d1fd1b15793940c8d4e3b (patch) | |
| tree | 3452f17bc18d7d4e22910481cec25910f665818e /examples | |
| parent | bb82938d72443349c4ea0be3747b92946454736d (diff) | |
Added binary numeral grammars.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/numerals/Binary.gf | 10 | ||||
| -rw-r--r-- | examples/numerals/BinaryDigits.gf | 11 |
2 files changed, 21 insertions, 0 deletions
diff --git a/examples/numerals/Binary.gf b/examples/numerals/Binary.gf new file mode 100644 index 000000000..f053b64ba --- /dev/null +++ b/examples/numerals/Binary.gf @@ -0,0 +1,10 @@ +abstract Binary = { + +cat Bin; + +fun End : Bin ; +fun Zero : Bin -> Bin ; +fun One : Bin -> Bin ; + + +}
\ No newline at end of file diff --git a/examples/numerals/BinaryDigits.gf b/examples/numerals/BinaryDigits.gf new file mode 100644 index 000000000..3a30a993c --- /dev/null +++ b/examples/numerals/BinaryDigits.gf @@ -0,0 +1,11 @@ +concrete BinaryDigits of Binary = { + +flags startcat=Bin ; + +lincat Bin = { s : Str } ; + +lin End = { s = "" } ; +lin Zero b = { s = "0" ++ b.s } ; +lin One b = { s = "1" ++ b.s } ; + +}
\ No newline at end of file |
