Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/benchmarks/programs/mlyacc/parser2.sml
ViewVC logotype

Annotation of /sml/trunk/benchmarks/programs/mlyacc/parser2.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 193 - (view) (download)

1 : monnier 193 (* ML-Yacc Parser Generator (c) 1989 Andrew W. Appel, David R. Tarditi
2 :     *
3 :     * $Log$
4 :     * Revision 1.3 1996/10/03 03:36:58 jhr
5 :     * Qualified identifiers that are no-longer top-level (quot, rem, min, max).
6 :     *
7 :     * Revision 1.2 1996/02/26 15:02:29 george
8 :     * print no longer overloaded.
9 :     * use of makestring has been removed and replaced with Int.toString ..
10 :     * use of IO replaced with TextIO
11 :     *
12 :     * Revision 1.1.1.1 1996/01/31 16:01:42 george
13 :     * Version 109
14 :     *
15 :     *)
16 :    
17 :     (* parser.sml: This is a parser driver for LR tables with an error-recovery
18 :     routine added to it. The routine used is described in detail in this
19 :     article:
20 :    
21 :     'A Practical Method for LR and LL Syntactic Error Diagnosis and
22 :     Recovery', by M. Burke and G. Fisher, ACM Transactions on
23 :     Programming Langauges and Systems, Vol. 9, No. 2, April 1987,
24 :     pp. 164-197.
25 :    
26 :     This program is an implementation is the partial, deferred method discussed
27 :     in the article. The algorithm and data structures used in the program
28 :     are described below.
29 :    
30 :     This program assumes that all semantic actions are delayed. A semantic
31 :     action should produce a function from unit -> value instead of producing the
32 :     normal value. The parser returns the semantic value on the top of the
33 :     stack when accept is encountered. The user can deconstruct this value
34 :     and apply the unit -> value function in it to get the answer.
35 :    
36 :     It also assumes that the lexer is a lazy stream.
37 :    
38 :     Data Structures:
39 :     ----------------
40 :    
41 :     * The parser:
42 :    
43 :     The state stack has the type
44 :    
45 :     (state * (semantic value * line # * line #)) list
46 :    
47 :     The parser keeps a queue of (state stack * lexer pair). A lexer pair
48 :     consists of a terminal * value pair and a lexer. This allows the
49 :     parser to reconstruct the states for terminals to the left of a
50 :     syntax error, and attempt to make error corrections there.
51 :    
52 :     The queue consists of a pair of lists (x,y). New additions to
53 :     the queue are cons'ed onto y. The first element of x is the top
54 :     of the queue. If x is nil, then y is reversed and used
55 :     in place of x.
56 :    
57 :     Algorithm:
58 :     ----------
59 :    
60 :     * The steady-state parser:
61 :    
62 :     This parser keeps the length of the queue of state stacks at
63 :     a steady state by always removing an element from the front when
64 :     another element is placed on the end.
65 :    
66 :     It has these arguments:
67 :    
68 :     stack: current stack
69 :     queue: value of the queue
70 :     lexPair ((terminal,value),lex stream)
71 :    
72 :     When SHIFT is encountered, the state to shift to and the value are
73 :     are pushed onto the state stack. The state stack and lexPair are
74 :     placed on the queue. The front element of the queue is removed.
75 :    
76 :     When REDUCTION is encountered, the rule is applied to the current
77 :     stack to yield a triple (nonterm,value,new stack). A new
78 :     stack is formed by adding (goto(top state of stack,nonterm),value)
79 :     to the stack.
80 :    
81 :     When ACCEPT is encountered, the top value from the stack and the
82 :     lexer are returned.
83 :    
84 :     When an ERROR is encountered, fixError is called. FixError
85 :     takes the arguments to the parser, fixes the error if possible and
86 :     returns a new set of arguments.
87 :    
88 :     * The distance-parser:
89 :    
90 :     This parser includes an additional argument distance. It pushes
91 :     elements on the queue until it has parsed distance tokens, or an
92 :     ACCEPT or ERROR occurs. It returns a stack, lexer, the number of
93 :     tokens left unparsed, a queue, and an action option.
94 :     *)
95 :    
96 :     signature FIFO =
97 :     sig type 'a queue
98 :     val empty : 'a queue
99 :     exception Empty
100 :     val get : 'a queue -> 'a * 'a queue
101 :     val put : 'a * 'a queue -> 'a queue
102 :     end
103 :    
104 :     (* drt (12/15/89) -- the functor should be used in development work, but
105 :     it wastes space in the release version.
106 :    
107 :     functor ParserGen(structure LrTable : LR_TABLE
108 :     structure Stream : STREAM) : LR_PARSER =
109 :     *)
110 :    
111 :     structure LrParser :> LR_PARSER =
112 :     struct
113 :     structure LrTable = LrTable
114 :     structure Stream = Stream
115 :    
116 :     structure Token : TOKEN =
117 :     struct
118 :     structure LrTable = LrTable
119 :     datatype ('a,'b) token = TOKEN of LrTable.term * ('a * 'b * 'b)
120 :     val sameToken = fn (TOKEN(t,_),TOKEN(t',_)) => t=t'
121 :     end
122 :    
123 :     open LrTable
124 :     open Token
125 :    
126 :     val DEBUG1 = false
127 :     val DEBUG2 = false
128 :     exception ParseError
129 :     exception ParseImpossible of int
130 :    
131 :     structure Fifo :> FIFO =
132 :     struct
133 :     type 'a queue = ('a list * 'a list)
134 :     val empty = (nil,nil)
135 :     exception Empty
136 :     fun get(a::x, y) = (a, (x,y))
137 :     | get(nil, nil) = raise Empty
138 :     | get(nil, y) = get(rev y, nil)
139 :     fun put(a,(x,y)) = (x,a::y)
140 :     end
141 :    
142 :     type ('a,'b) elem = (state * ('a * 'b * 'b))
143 :     type ('a,'b) stack = ('a,'b) elem list
144 :     type ('a,'b) lexv = ('a,'b) token
145 :     type ('a,'b) lexpair = ('a,'b) lexv * (('a,'b) lexv Stream.stream)
146 :     type ('a,'b) distanceParse =
147 :     ('a,'b) lexpair *
148 :     ('a,'b) stack *
149 :     (('a,'b) stack * ('a,'b) lexpair) Fifo.queue *
150 :     int ->
151 :     ('a,'b) lexpair *
152 :     ('a,'b) stack *
153 :     (('a,'b) stack * ('a,'b) lexpair) Fifo.queue *
154 :     int *
155 :     action option
156 :    
157 :     type ('a,'b) ecRecord =
158 :     {is_keyword : term -> bool,
159 :     preferred_change : (term list * term list) list,
160 :     error : string * 'b * 'b -> unit,
161 :     errtermvalue : term -> 'a,
162 :     terms : term list,
163 :     showTerminal : term -> string,
164 :     noShift : term -> bool}
165 :    
166 :     local
167 :     val print = fn s => TextIO.output(TextIO.stdOut,s)
168 :     val println = fn s => (print s; print "\n")
169 :     val showState = fn (STATE s) => "STATE " ^ (Int.toString s)
170 :     in
171 :     fun printStack(stack: ('a,'b) stack, n: int) =
172 :     case stack
173 :     of (state,_) :: rest =>
174 :     (print("\t" ^ Int.toString n ^ ": ");
175 :     println(showState state);
176 :     printStack(rest, n+1))
177 :     | nil => ()
178 :    
179 :     fun prAction showTerminal
180 :     (stack as (state,_) :: _, next as (TOKEN (term,_),_), action) =
181 :     (println "Parse: state stack:";
182 :     printStack(stack, 0);
183 :     print(" state="
184 :     ^ showState state
185 :     ^ " next="
186 :     ^ showTerminal term
187 :     ^ " action="
188 :     );
189 :     case action
190 :     of SHIFT state => println ("SHIFT " ^ (showState state))
191 :     | REDUCE i => println ("REDUCE " ^ (Int.toString i))
192 :     | ERROR => println "ERROR"
193 :     | ACCEPT => println "ACCEPT")
194 :     | prAction _ (_,_,action) = ()
195 :     end
196 :    
197 :     (* ssParse: parser which maintains the queue of (state * lexvalues) in a
198 :     steady-state. It takes a table, showTerminal function, saction
199 :     function, and fixError function. It parses until an ACCEPT is
200 :     encountered, or an exception is raised. When an error is encountered,
201 :     fixError is called with the arguments of parseStep (lexv,stack,and
202 :     queue). It returns the lexv, and a new stack and queue adjusted so
203 :     that the lexv can be parsed *)
204 :    
205 :     val ssParse =
206 :     fn (table,showTerminal,saction,fixError,arg) =>
207 :     let val prAction = prAction showTerminal
208 :     val action = LrTable.action table
209 :     val goto = LrTable.goto table
210 :     fun parseStep(args as
211 :     (lexPair as (TOKEN (terminal, value as (_,leftPos,_)),
212 :     lexer
213 :     ),
214 :     stack as (state,_) :: _,
215 :     queue)) =
216 :     let val nextAction = action (state,terminal)
217 :     val _ = if DEBUG1 then prAction(stack,lexPair,nextAction)
218 :     else ()
219 :     in case nextAction
220 :     of SHIFT s =>
221 :     let val newStack = (s,value) :: stack
222 :     val newLexPair = Stream.get lexer
223 :     val (_,newQueue) =Fifo.get(Fifo.put((newStack,newLexPair),
224 :     queue))
225 :     in parseStep(newLexPair,(s,value)::stack,newQueue)
226 :     end
227 :     | REDUCE i =>
228 :     (case saction(i,leftPos,stack,arg)
229 :     of (nonterm,value,stack as (state,_) :: _) =>
230 :     parseStep(lexPair,(goto(state,nonterm),value)::stack,
231 :     queue)
232 :     | _ => raise (ParseImpossible 197))
233 :     | ERROR => parseStep(fixError args)
234 :     | ACCEPT =>
235 :     (case stack
236 :     of (_,(topvalue,_,_)) :: _ =>
237 :     let val (token,restLexer) = lexPair
238 :     in (topvalue,Stream.cons(token,restLexer))
239 :     end
240 :     | _ => raise (ParseImpossible 202))
241 :     end
242 :     | parseStep _ = raise (ParseImpossible 204)
243 :     in parseStep
244 :     end
245 :    
246 :     (* distanceParse: parse until n tokens are shifted, or accept or
247 :     error are encountered. Takes a table, showTerminal function, and
248 :     semantic action function. Returns a parser which takes a lexPair
249 :     (lex result * lexer), a state stack, a queue, and a distance
250 :     (must be > 0) to parse. The parser returns a new lex-value, a stack
251 :     with the nth token shifted on top, a queue, a distance, and action
252 :     option. *)
253 :    
254 :     val distanceParse =
255 :     fn (table,showTerminal,saction,arg) =>
256 :     let val prAction = prAction showTerminal
257 :     val action = LrTable.action table
258 :     val goto = LrTable.goto table
259 :     fun parseStep(lexPair,stack,queue,0) = (lexPair,stack,queue,0,NONE)
260 :     | parseStep(lexPair as (TOKEN (terminal, value as (_,leftPos,_)),
261 :     lexer
262 :     ),
263 :     stack as (state,_) :: _,
264 :     queue,distance) =
265 :     let val nextAction = action(state,terminal)
266 :     val _ = if DEBUG1 then prAction(stack,lexPair,nextAction)
267 :     else ()
268 :     in case nextAction
269 :     of SHIFT s =>
270 :     let val newStack = (s,value) :: stack
271 :     val newLexPair = Stream.get lexer
272 :     in parseStep(newLexPair,(s,value)::stack,
273 :     Fifo.put((newStack,newLexPair),queue),distance-1)
274 :     end
275 :     | REDUCE i =>
276 :     (case saction(i,leftPos,stack,arg)
277 :     of (nonterm,value,stack as (state,_) :: _) =>
278 :     parseStep(lexPair,(goto(state,nonterm),value)::stack,
279 :     queue,distance)
280 :     | _ => raise (ParseImpossible 240))
281 :     | ERROR => (lexPair,stack,queue,distance,SOME nextAction)
282 :     | ACCEPT => (lexPair,stack,queue,distance,SOME nextAction)
283 :     end
284 :     | parseStep _ = raise (ParseImpossible 242)
285 :     in parseStep : ('_a,'_b) distanceParse
286 :     end
287 :    
288 :     (* mkFixError: function to create fixError function which adjusts parser state
289 :     so that parse may continue in the presence of an error *)
290 :    
291 :     fun mkFixError({is_keyword,terms,errtermvalue,
292 :     preferred_change,noShift,
293 :     showTerminal,error,...} : ('_a,'_b) ecRecord,
294 :     distanceParse : ('_a,'_b) distanceParse,
295 :     minAdvance,maxAdvance)
296 :    
297 :     (lexv as (TOKEN (term,value as (_,leftPos,_)),_),stack,queue) =
298 :     let val _ = if DEBUG2 then
299 :     error("syntax error found at " ^ (showTerminal term),
300 :     leftPos,leftPos)
301 :     else ()
302 :    
303 :     fun tokAt(t,p) = TOKEN(t,(errtermvalue t,p,p))
304 :    
305 :     val minDelta = 3
306 :    
307 :     (* pull all the state * lexv elements from the queue *)
308 :    
309 :     val stateList =
310 :     let fun f q = let val (elem,newQueue) = Fifo.get q
311 :     in elem :: (f newQueue)
312 :     end handle Fifo.Empty => nil
313 :     in f queue
314 :     end
315 :    
316 :     (* now number elements of stateList, giving distance from
317 :     error token *)
318 :    
319 :     val (_, numStateList) =
320 :     List.foldr (fn (a,(num,r)) => (num+1,(a,num)::r)) (0, []) stateList
321 :    
322 :     (* Represent the set of potential changes as a linked list.
323 :    
324 :     Values of datatype Change hold information about a potential change.
325 :    
326 :     oper = oper to be applied
327 :     pos = the # of the element in stateList that would be altered.
328 :     distance = the number of tokens beyond the error token which the
329 :     change allows us to parse.
330 :     new = new terminal * value pair at that point
331 :     orig = original terminal * value pair at the point being changed.
332 :     *)
333 :    
334 :     datatype ('a,'b) change = CHANGE of
335 :     {pos : int, distance : int, leftPos: 'b, rightPos: 'b,
336 :     new : ('a,'b) lexv list, orig : ('a,'b) lexv list}
337 :    
338 :    
339 :     val showTerms = concat o map (fn TOKEN(t,_) => " " ^ showTerminal t)
340 :    
341 :     val printChange = fn c =>
342 :     let val CHANGE {distance,new,orig,pos,...} = c
343 :     in (print ("{distance= " ^ (Int.toString distance));
344 :     print (",orig ="); print(showTerms orig);
345 :     print (",new ="); print(showTerms new);
346 :     print (",pos= " ^ (Int.toString pos));
347 :     print "}\n")
348 :     end
349 :    
350 :     val printChangeList = app printChange
351 :    
352 :     (* parse: given a lexPair, a stack, and the distance from the error
353 :     token, return the distance past the error token that we are able to parse.*)
354 :    
355 :     fun parse (lexPair,stack,queuePos : int) =
356 :     case distanceParse(lexPair,stack,Fifo.empty,queuePos+maxAdvance+1)
357 :     of (_,_,_,distance,SOME ACCEPT) =>
358 :     if maxAdvance-distance-1 >= 0
359 :     then maxAdvance
360 :     else maxAdvance-distance-1
361 :     | (_,_,_,distance,_) => maxAdvance - distance - 1
362 :    
363 :     (* catList: concatenate results of scanning list *)
364 :    
365 :     fun catList l f = List.foldr (fn(a,r)=> f a @ r) [] l
366 :    
367 :     fun keywordsDelta new = if List.exists (fn(TOKEN(t,_))=>is_keyword t) new
368 :     then minDelta else 0
369 :    
370 :     fun tryChange{lex,stack,pos,leftPos,rightPos,orig,new} =
371 :     let val lex' = List.foldr (fn (t',p)=>(t',Stream.cons p)) lex new
372 :     val distance = parse(lex',stack,pos+length new-length orig)
373 :     in if distance >= minAdvance + keywordsDelta new
374 :     then [CHANGE{pos=pos,leftPos=leftPos,rightPos=rightPos,
375 :     distance=distance,orig=orig,new=new}]
376 :     else []
377 :     end
378 :    
379 :    
380 :     (* tryDelete: Try to delete n terminals.
381 :     Return single-element [success] or nil.
382 :     Do not delete unshiftable terminals. *)
383 :    
384 :    
385 :     fun tryDelete n ((stack,lexPair as (TOKEN(term,(_,l,r)),_)),qPos) =
386 :     let fun del(0,accum,left,right,lexPair) =
387 :     tryChange{lex=lexPair,stack=stack,
388 :     pos=qPos,leftPos=left,rightPos=right,
389 :     orig=rev accum, new=[]}
390 :     | del(n,accum,left,right,(tok as TOKEN(term,(_,_,r)),lexer)) =
391 :     if noShift term then []
392 :     else del(n-1,tok::accum,left,r,Stream.get lexer)
393 :     in del(n,[],l,r,lexPair)
394 :     end
395 :    
396 :     (* tryInsert: try to insert tokens before the current terminal;
397 :     return a list of the successes *)
398 :    
399 :     fun tryInsert((stack,lexPair as (TOKEN(_,(_,l,_)),_)),queuePos) =
400 :     catList terms (fn t =>
401 :     tryChange{lex=lexPair,stack=stack,
402 :     pos=queuePos,orig=[],new=[tokAt(t,l)],
403 :     leftPos=l,rightPos=l})
404 :    
405 :     (* trySubst: try to substitute tokens for the current terminal;
406 :     return a list of the successes *)
407 :    
408 :     fun trySubst ((stack,lexPair as (orig as TOKEN (term,(_,l,r)),lexer)),
409 :     queuePos) =
410 :     if noShift term then []
411 :     else
412 :     catList terms (fn t =>
413 :     tryChange{lex=Stream.get lexer,stack=stack,
414 :     pos=queuePos,
415 :     leftPos=l,rightPos=r,orig=[orig],
416 :     new=[tokAt(t,r)]})
417 :    
418 :     (* do_delete(toks,lexPair) tries to delete tokens "toks" from "lexPair".
419 :     If it succeeds, returns SOME(toks',l,r,lp), where
420 :     toks' is the actual tokens (with positions and values) deleted,
421 :     (l,r) are the (leftmost,rightmost) position of toks',
422 :     lp is what remains of the stream after deletion
423 :     *)
424 :     fun do_delete(nil,lp as (TOKEN(_,(_,l,_)),_)) = SOME(nil,l,l,lp)
425 :     | do_delete([t],(tok as TOKEN(t',(_,l,r)),lp')) =
426 :     if t=t'
427 :     then SOME([tok],l,r,Stream.get lp')
428 :     else NONE
429 :     | do_delete(t::rest,(tok as TOKEN(t',(_,l,r)),lp')) =
430 :     if t=t'
431 :     then case do_delete(rest,Stream.get lp')
432 :     of SOME(deleted,l',r',lp'') =>
433 :     SOME(tok::deleted,l,r',lp'')
434 :     | NONE => NONE
435 :     else NONE
436 :    
437 :     fun tryPreferred((stack,lexPair),queuePos) =
438 :     catList preferred_change (fn (delete,insert) =>
439 :     if List.exists noShift delete then [] (* should give warning at
440 :     parser-generation time *)
441 :     else case do_delete(delete,lexPair)
442 :     of SOME(deleted,l,r,lp) =>
443 :     tryChange{lex=lp,stack=stack,pos=queuePos,
444 :     leftPos=l,rightPos=r,orig=deleted,
445 :     new=map (fn t=>(tokAt(t,r))) insert}
446 :     | NONE => [])
447 :    
448 :     val changes = catList numStateList tryPreferred @
449 :     catList numStateList tryInsert @
450 :     catList numStateList trySubst @
451 :     catList numStateList (tryDelete 1) @
452 :     catList numStateList (tryDelete 2) @
453 :     catList numStateList (tryDelete 3)
454 :    
455 :     val findMaxDist = fn l =>
456 :     foldr (fn (CHANGE {distance,...},high) => Int.max(distance,high)) 0 l
457 :    
458 :     (* maxDist: max distance past error taken that we could parse *)
459 :    
460 :     val maxDist = findMaxDist changes
461 :    
462 :     (* remove changes which did not parse maxDist tokens past the error token *)
463 :    
464 :     val changes = catList changes
465 :     (fn(c as CHANGE{distance,...}) =>
466 :     if distance=maxDist then [c] else [])
467 :    
468 :     in case changes
469 :     of (l as change :: _) =>
470 :     let fun print_msg (CHANGE {new,orig,leftPos,rightPos,...}) =
471 :     let val s =
472 :     case (orig,new)
473 :     of (_::_,[]) => "deleting " ^ (showTerms orig)
474 :     | ([],_::_) => "inserting " ^ (showTerms new)
475 :     | _ => "replacing " ^ (showTerms orig) ^
476 :     " with " ^ (showTerms new)
477 :     in error ("syntax error: " ^ s,leftPos,rightPos)
478 :     end
479 :    
480 :     val _ =
481 :     (if length l > 1 andalso DEBUG2 then
482 :     (print "multiple fixes possible; could fix it by:\n";
483 :     app print_msg l;
484 :     print "chosen correction:\n")
485 :     else ();
486 :     print_msg change)
487 :    
488 :     (* findNth: find nth queue entry from the error
489 :     entry. Returns the Nth queue entry and the portion of
490 :     the queue from the beginning to the nth-1 entry. The
491 :     error entry is at the end of the queue.
492 :    
493 :     Examples:
494 :    
495 :     queue = a b c d e
496 :     findNth 0 = (e,a b c d)
497 :     findNth 1 = (d,a b c)
498 :     *)
499 :    
500 :     val findNth = fn n =>
501 :     let fun f (h::t,0) = (h,rev t)
502 :     | f (h::t,n) = f(t,n-1)
503 :     | f (nil,_) = let exception FindNth
504 :     in raise FindNth
505 :     end
506 :     in f (rev stateList,n)
507 :     end
508 :    
509 :     val CHANGE {pos,orig,new,...} = change
510 :     val (last,queueFront) = findNth pos
511 :     val (stack,lexPair) = last
512 :    
513 :     val lp1 = foldl(fn (_,(_,r)) => Stream.get r) lexPair orig
514 :     val lp2 = foldr(fn(t,r)=>(t,Stream.cons r)) lp1 new
515 :    
516 :     val restQueue =
517 :     Fifo.put((stack,lp2),
518 :     foldl Fifo.put Fifo.empty queueFront)
519 :    
520 :     val (lexPair,stack,queue,_,_) =
521 :     distanceParse(lp2,stack,restQueue,pos)
522 :    
523 :     in (lexPair,stack,queue)
524 :     end
525 :     | nil => (error("syntax error found at " ^ (showTerminal term),
526 :     leftPos,leftPos); raise ParseError)
527 :     end
528 :    
529 :     val parse = fn {arg,table,lexer,saction,void,lookahead,
530 :     ec=ec as {showTerminal,...} : ('_a,'_b) ecRecord} =>
531 :     let val distance = 15 (* defer distance tokens *)
532 :     val minAdvance = 1 (* must parse at least 1 token past error *)
533 :     val maxAdvance = Int.max(lookahead,0)(* max distance for parse check *)
534 :     val lexPair = Stream.get lexer
535 :     val (TOKEN (_,(_,leftPos,_)),_) = lexPair
536 :     val startStack = [(initialState table,(void,leftPos,leftPos))]
537 :     val startQueue = Fifo.put((startStack,lexPair),Fifo.empty)
538 :     val distanceParse = distanceParse(table,showTerminal,saction,arg)
539 :     val fixError = mkFixError(ec,distanceParse,minAdvance,maxAdvance)
540 :     val ssParse = ssParse(table,showTerminal,saction,fixError,arg)
541 :     fun loop (lexPair,stack,queue,_,SOME ACCEPT) =
542 :     ssParse(lexPair,stack,queue)
543 :     | loop (lexPair,stack,queue,0,_) = ssParse(lexPair,stack,queue)
544 :     | loop (lexPair,stack,queue,distance,SOME ERROR) =
545 :     let val (lexPair,stack,queue) = fixError(lexPair,stack,queue)
546 :     in loop (distanceParse(lexPair,stack,queue,distance))
547 :     end
548 :     | loop _ = let exception ParseInternal
549 :     in raise ParseInternal
550 :     end
551 :     in loop (distanceParse(lexPair,startStack,startQueue,distance))
552 :     end
553 :     end;
554 :    
555 :     (* drt (12/15/89) -- needed only when the code above is functorized
556 :    
557 :     structure LrParser = ParserGen(structure LrTable=LrTable
558 :     structure Stream=Stream);
559 :     *)

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0