ometa-boot-pretty.g
author Tony Garnock-Jones <tonygarnockjones@gmail.com>
Mon, 04 Jul 2011 10:59:25 -0400
changeset 37 c28094727b3d
parent 32 5deee5dae03d
permissions -rw-r--r--
Cope with no reported error when formatting error messages.
11
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     1
-- -*- text -*-
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     2
-- A copy of the automatically-produced ometa-boot.g, prettified by hand.
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     3
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     4
productions = production+;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     5
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     6
production =
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     7
	&name:n
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     8
	production-part(n):x (token(";") production-part(n))*:xs token(";") spaces
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
     9
		-> `(,n (or ,x ,@xs));
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    10
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    11
production-part :required-name =
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    12
	name:n -> (or (eq? n required-name) (error 'clause-name-mismatch))
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    13
	expr-seq:body ( token("=") expr:rhs -> `(seq ,body ,rhs)
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    14
		      |                     -> body);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    15
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    16
expr-seq = (expr3)*:xs -> `(seq ,@xs);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    17
32
5deee5dae03d Support @ for current parse position.
Tony Garnock-Jones <tonygarnockjones@gmail.com>
parents: 31
diff changeset
    18
expr3 = ( expr2:r ( token("*") -> `(many ,r)
5deee5dae03d Support @ for current parse position.
Tony Garnock-Jones <tonygarnockjones@gmail.com>
parents: 31
diff changeset
    19
		  | token("+") -> `(many1 ,r)
5deee5dae03d Support @ for current parse position.
Tony Garnock-Jones <tonygarnockjones@gmail.com>
parents: 31
diff changeset
    20
		  | 	       -> r)
5deee5dae03d Support @ for current parse position.
Tony Garnock-Jones <tonygarnockjones@gmail.com>
parents: 31
diff changeset
    21
	| token("@") -> `(position)):r
11
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    22
	( $: name:n -> `(bind ,n ,r)
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    23
	|    	    -> r);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    24
expr3 = token(":") name:n -> `(bind ,n (anything));
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    25
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    26
expr2 = token("~") expr2:x -> `(not ,x);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    27
expr2 = token("&") expr1:x -> `(follow ,x);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    28
expr2 = expr1;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    29
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    30
expr1 = token("<{") host-language-expression:s token("}>") -> `(sequence ,s);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    31
expr1 = name:prod-exp apply-arguments:arg-exps -> `(apply ,prod-exp ,@arg-exps);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    32
expr1 = token("->") host-language-expression:r -> `(action ,r);
31
dd9850e5e4fc Apply some of the changes from the previous commit to the .g files
Tony Garnock-Jones <tonygarnockjones@gmail.com>
parents: 11
diff changeset
    33
expr1 = token("?") host-language-expression:r -> `(action (or ,r (error)));
11
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    34
expr1 = literal:x -> `(exactly ,x);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    35
expr1 = token("_") -> `(anything);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    36
expr1 = token("(") expr:x token(")") -> x;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    37
expr1 = token("{") expr-seq:xs token("}") -> `(nest ,xs);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    38
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    39
apply-arguments = $( ( token(")") -> '()
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    40
		     | scheme-term:a1 (token(",") scheme-term)*:aa token(")") -> (cons a1 aa));
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    41
apply-arguments = -> '();
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    42
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    43
literal = okeyword("nil", ());
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    44
literal = okeyword("true", #t);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    45
literal = okeyword("false", #f);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    46
literal = onumber;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    47
literal = ostring(#\');
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    48
literal = token("$") ochar;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    49
literal = token("#") (name | ostring(#\'):s -> (string->symbol s));
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    50
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    51
onumber = spaces (digit)+:ip
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    52
	  ( $. (digit)+:fp -> (string->number (string-append (list->string ip)
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    53
							     "." (list->string fp)))
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    54
	  |                -> (string->number (list->string ip)));
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    55
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    56
ostring ochar:quo =
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    57
	spaces
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    58
	ochar:s1 -> (or (eqv? s1 quo) (error 'expected 'string-open-quote))
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    59
	( ($\ ($\ | ochar:c -> (if (eqv? c quo) c (error 'expected 'escaped-quote))))
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    60
	| ochar:c -> (if (eqv? c quo) (error 'expected 'string-char) c))*:cs
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    61
	ochar:s2 -> (if (eqv? s2 quo)
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    62
		    	(list->string cs)
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    63
			(error 'expected 'string-close-quote));
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    64
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    65
ochar = :c -> (if (char? c) c (error 'expected 'char?));
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    66
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    67
expr = expr-seq:x (token("|") expr-seq)*:xs -> `(or ,x ,@xs);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    68
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    69
okeyword :xs :val = spaces <{xs}> ~name-subsequent('(#\- #\? #\! #\* #\+ #\/ #\= #\: #\')) -> val;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    70
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    71
token :xs = spaces <{xs}>;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    72
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    73
name = generic-name('(), '(#\- #\_));
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    74
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    75
generic-name :initial-chars :subsequent-chars =
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    76
	spaces name-initial(initial-chars):x name-subsequent(subsequent-chars)*:xs
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    77
	       -> (string->symbol (list->string (cons x xs)));
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    78
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    79
name-initial :initial-chars =
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    80
	ochar:c -> (if (or (char-alphabetic? c)
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    81
		       	   (memv c initial-chars))
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    82
		       c
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    83
		       (error 'expected 'name-initial));
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    84
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    85
name-subsequent :subsequent-chars =
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    86
	ochar:x -> (if (or (char-alphabetic? x)
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    87
		       	   (char-numeric? x)
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    88
			   (memv x subsequent-chars))
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    89
		       x
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    90
		       (error 'expected 'name-subsequent));
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    91
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    92
digit = ochar:c -> (if (char-numeric? c) c (error 'expected 'char-numeric?));
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    93
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    94
spaces = (ochar:c -> (if (char-whitespace? c) c (error 'expected 'char-whitespace?)))+ spaces;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    95
spaces = $- $- (:x -> (if (memv x '(#\return #\newline)) (error 'expected 'non-eol) x))* spaces;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    96
spaces = -> #t;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    97
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    98
host-language-expression = scheme-term;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
    99
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   100
scheme-term = scheme-atom;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   101
scheme-term = scheme-quoted("'", 'quote);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   102
scheme-term = scheme-quoted("`", 'quasiquote);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   103
scheme-term = scheme-quoted(",", 'unquote);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   104
scheme-term = scheme-quoted(",@", 'unquote-splicing);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   105
scheme-term = token("(") scheme-sequence:xs token(")") -> xs;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   106
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   107
scheme-quoted :quo :sym = spaces <{quo}> scheme-term:x -> `(,sym ,x);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   108
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   109
scheme-atom = okeyword("#t", #t);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   110
scheme-atom = okeyword("#f", #f);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   111
scheme-atom = onumber;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   112
scheme-atom = ostring(#\");
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   113
scheme-atom = token("#\\") ( token("return") ->#\return
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   114
	      		   | token("newline") ->#\newline
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   115
			   | ochar);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   116
scheme-atom = scheme-symbol;
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   117
scheme-atom = ostring(#\|):s -> (string->symbol s);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   118
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   119
scheme-symbol = generic-name('(#\? #\! #\* #\+ #\/ #\= #\: #\< #\>),
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   120
	      		     '(#\? #\! #\* #\+ #\/ #\= #\: #\< #\> #\' #\-));
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   121
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   122
scheme-sequence = scheme-term:a token(".") scheme-term:d -> (cons a d);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   123
scheme-sequence = scheme-term:a scheme-sequence:d -> (cons a d);
a64376b9365d Add prettified version of the bootstrap grammar.
Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
parents:
diff changeset
   124
scheme-sequence = -> '();