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

SCM Repository

[smlnj] Diff of /ml-burg/trunk/burg-gram.sml
ViewVC logotype

Diff of /ml-burg/trunk/burg-gram.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2114, Thu Nov 2 16:05:23 2006 UTC revision 2590, Wed May 23 15:17:31 2007 UTC
# Line 252  Line 252 
252  fn (i392,defaultPos,stack,  fn (i392,defaultPos,stack,
253      (()):arg) =>      (()):arg) =>
254  case (i392,stack)  case (i392,stack)
255  of (0,(_,(MlyValue.PPERCENT PPERCENT2,_,PPERCENT2right))::(_,(  of  ( 0, ( ( _, ( MlyValue.PPERCENT PPERCENT2, _, PPERCENT2right)) ::
256  MlyValue.rules rules,_,_))::(_,(MlyValue.PPERCENT PPERCENT1,_,_))::(_,  ( _, ( MlyValue.rules rules, _, _)) :: ( _, ( MlyValue.PPERCENT
257  (MlyValue.decls decls,decls1left,_))::rest671) => let val result=  PPERCENT1, _, _)) :: ( _, ( MlyValue.decls decls, decls1left, _)) ::
258  MlyValue.full((  rest671)) => let val  result = MlyValue.full (
259  A.SPEC{head=PPERCENT1,  A.SPEC{head=PPERCENT1,
260                                                  decls=rev decls,                                                  decls=rev decls,
261                                                  rules=rev rules,                                                  rules=rev rules,
262                                                  tail=PPERCENT2}                                                  tail=PPERCENT2}
263  ))  )
264   in (LrTable.NT 0,(result,decls1left,PPERCENT2right),rest671) end   in ( LrTable.NT 0, ( result, decls1left, PPERCENT2right), rest671)
265  | (1,rest671) => let val result=MlyValue.decls(([]))  
266   in (LrTable.NT 9,(result,defaultPos,defaultPos),rest671) end  end
267  | (2,(_,(MlyValue.decl decl,_,decl1right))::(_,(MlyValue.decls decls,  |  ( 1, ( rest671)) => let val  result = MlyValue.decls ([])
268  decls1left,_))::rest671) => let val result=MlyValue.decls((   in ( LrTable.NT 9, ( result, defaultPos, defaultPos), rest671)
269  decl :: decls))  end
270   in (LrTable.NT 9,(result,decls1left,decl1right),rest671) end  |  ( 2, ( ( _, ( MlyValue.decl decl, _, decl1right)) :: ( _, (
271  | (3,(_,(MlyValue.bindinglist bindinglist,_,bindinglist1right))::(_,(_  MlyValue.decls decls, decls1left, _)) :: rest671)) => let val  result
272  ,K_TERM1left,_))::rest671) => let val result=MlyValue.decl((   = MlyValue.decls (decl :: decls)
273  A.TERM (rev bindinglist)))   in ( LrTable.NT 9, ( result, decls1left, decl1right), rest671)
274   in (LrTable.NT 2,(result,K_TERM1left,bindinglist1right),rest671) end  end
275  | (4,(_,(MlyValue.ID ID,_,ID1right))::(_,(_,K_START1left,_))::rest671)  |  ( 3, ( ( _, ( MlyValue.bindinglist bindinglist, _,
276   => let val result=MlyValue.decl((A.START ID))  bindinglist1right)) :: ( _, ( _, K_TERM1left, _)) :: rest671)) => let
277   in (LrTable.NT 2,(result,K_START1left,ID1right),rest671) end   val  result = MlyValue.decl (A.TERM (rev bindinglist))
278  | (5,(_,(MlyValue.ID ID,_,ID1right))::(_,(_,K_TERMPREFIX1left,_))::   in ( LrTable.NT 2, ( result, K_TERM1left, bindinglist1right), rest671
279  rest671) => let val result=MlyValue.decl((A.TERMPREFIX ID))  )
280   in (LrTable.NT 2,(result,K_TERMPREFIX1left,ID1right),rest671) end  end
281  | (6,(_,(MlyValue.ID ID,_,ID1right))::(_,(_,K_RULEPREFIX1left,_))::  |  ( 4, ( ( _, ( MlyValue.ID ID, _, ID1right)) :: ( _, ( _,
282  rest671) => let val result=MlyValue.decl((A.RULEPREFIX ID))  K_START1left, _)) :: rest671)) => let val  result = MlyValue.decl (
283   in (LrTable.NT 2,(result,K_RULEPREFIX1left,ID1right),rest671) end  A.START ID)
284  | (7,(_,(MlyValue.ID ID,_,ID1right))::(_,(_,K_SIG1left,_))::rest671)   in ( LrTable.NT 2, ( result, K_START1left, ID1right), rest671)
285   => let val result=MlyValue.decl((A.SIG ID))  end
286   in (LrTable.NT 2,(result,K_SIG1left,ID1right),rest671) end  |  ( 5, ( ( _, ( MlyValue.ID ID, _, ID1right)) :: ( _, ( _,
287  | (8,(_,(MlyValue.binding binding,binding1left,binding1right))::  K_TERMPREFIX1left, _)) :: rest671)) => let val  result = MlyValue.decl
288  rest671) => let val result=MlyValue.bindinglist(([binding]))   (A.TERMPREFIX ID)
289   in (LrTable.NT 12,(result,binding1left,binding1right),rest671) end   in ( LrTable.NT 2, ( result, K_TERMPREFIX1left, ID1right), rest671)
290  | (9,(_,(MlyValue.binding binding,_,binding1right))::_::(_,(  
291  MlyValue.bindinglist bindinglist,bindinglist1left,_))::rest671) =>  end
292  let val result=MlyValue.bindinglist((binding :: bindinglist))  |  ( 6, ( ( _, ( MlyValue.ID ID, _, ID1right)) :: ( _, ( _,
293   in (LrTable.NT 12,(result,bindinglist1left,binding1right),rest671)  K_RULEPREFIX1left, _)) :: rest671)) => let val  result = MlyValue.decl
294   end   (A.RULEPREFIX ID)
295  | (10,(_,(MlyValue.ID ID,ID1left,ID1right))::rest671) => let val   in ( LrTable.NT 2, ( result, K_RULEPREFIX1left, ID1right), rest671)
296  result=MlyValue.binding(((ID, NONE)))  
297   in (LrTable.NT 3,(result,ID1left,ID1right),rest671) end  end
298  | (11,(_,(MlyValue.ID ID2,_,ID2right))::_::(_,(MlyValue.ID ID1,ID1left  |  ( 7, ( ( _, ( MlyValue.ID ID, _, ID1right)) :: ( _, ( _, K_SIG1left
299  ,_))::rest671) => let val result=MlyValue.binding(((ID1, SOME ID2)))  , _)) :: rest671)) => let val  result = MlyValue.decl (A.SIG ID)
300   in (LrTable.NT 3,(result,ID1left,ID2right),rest671) end   in ( LrTable.NT 2, ( result, K_SIG1left, ID1right), rest671)
301  | (12,rest671) => let val result=MlyValue.rules(([]))  end
302   in (LrTable.NT 10,(result,defaultPos,defaultPos),rest671) end  |  ( 8, ( ( _, ( MlyValue.binding binding, binding1left, binding1right
303  | (13,(_,(MlyValue.rule rule,_,rule1right))::(_,(MlyValue.rules rules,  )) :: rest671)) => let val  result = MlyValue.bindinglist ([binding])
304  rules1left,_))::rest671) => let val result=MlyValue.rules((   in ( LrTable.NT 12, ( result, binding1left, binding1right), rest671)
305  rule :: rules))  
306   in (LrTable.NT 10,(result,rules1left,rule1right),rest671) end  end
307  | (14,(_,(_,_,K_SEMICOLON1right))::(_,(MlyValue.cost cost,_,_))::(_,(  |  ( 9, ( ( _, ( MlyValue.binding binding, _, binding1right)) :: _ ::
308  MlyValue.rulename rulename,_,_))::_::(_,(MlyValue.pattern pattern,_,_)  ( _, ( MlyValue.bindinglist bindinglist, bindinglist1left, _)) ::
309  )::_::(_,(MlyValue.ID ID,ID1left,_))::rest671) => let val result=  rest671)) => let val  result = MlyValue.bindinglist (
310  MlyValue.rule((A.RULE(ID, pattern, rulename, cost)))  binding :: bindinglist)
311   in (LrTable.NT 11,(result,ID1left,K_SEMICOLON1right),rest671) end   in ( LrTable.NT 12, ( result, bindinglist1left, binding1right),
312  | (15,(_,(MlyValue.ID ID,ID1left,ID1right))::rest671) => let val  rest671)
313  result=MlyValue.rulename((ID))  end
314   in (LrTable.NT 6,(result,ID1left,ID1right),rest671) end  |  ( 10, ( ( _, ( MlyValue.ID ID, ID1left, ID1right)) :: rest671)) =>
315  | (16,(_,(MlyValue.ID ID,ID1left,ID1right))::rest671) => let val   let val  result = MlyValue.binding ((ID, NONE))
316  result=MlyValue.pattern((A.PAT(ID, [])))   in ( LrTable.NT 3, ( result, ID1left, ID1right), rest671)
317   in (LrTable.NT 7,(result,ID1left,ID1right),rest671) end  end
318  | (17,(_,(_,_,K_RPAREN1right))::(_,(MlyValue.patterntail patterntail,_  |  ( 11, ( ( _, ( MlyValue.ID ID2, _, ID2right)) :: _ :: ( _, (
319  ,_))::(_,(MlyValue.pattern pattern,_,_))::_::(_,(MlyValue.ID ID,  MlyValue.ID ID1, ID1left, _)) :: rest671)) => let val  result =
320  ID1left,_))::rest671) => let val result=MlyValue.pattern((  MlyValue.binding ((ID1, SOME ID2))
321  A.PAT(ID, pattern :: patterntail)))   in ( LrTable.NT 3, ( result, ID1left, ID2right), rest671)
322   in (LrTable.NT 7,(result,ID1left,K_RPAREN1right),rest671) end  end
323  | (18,rest671) => let val result=MlyValue.patterntail(([]))  |  ( 12, ( rest671)) => let val  result = MlyValue.rules ([])
324   in (LrTable.NT 8,(result,defaultPos,defaultPos),rest671) end   in ( LrTable.NT 10, ( result, defaultPos, defaultPos), rest671)
325  | (19,(_,(MlyValue.patterntail patterntail,_,patterntail1right))::(_,(  end
326  MlyValue.pattern pattern,_,_))::(_,(_,K_COMMA1left,_))::rest671) =>  |  ( 13, ( ( _, ( MlyValue.rule rule, _, rule1right)) :: ( _, (
327  let val result=MlyValue.patterntail((pattern :: patterntail))  MlyValue.rules rules, rules1left, _)) :: rest671)) => let val  result
328   in (LrTable.NT 8,(result,K_COMMA1left,patterntail1right),rest671) end   = MlyValue.rules (rule :: rules)
329  | (20,rest671) => let val result=MlyValue.cost(([]))   in ( LrTable.NT 10, ( result, rules1left, rule1right), rest671)
330   in (LrTable.NT 4,(result,defaultPos,defaultPos),rest671) end  end
331  | (21,(_,(_,_,K_RPAREN1right))::(_,(MlyValue.costtail costtail,_,_))::  |  ( 14, ( ( _, ( _, _, K_SEMICOLON1right)) :: ( _, ( MlyValue.cost
332  (_,(MlyValue.INT INT,_,_))::(_,(_,K_LPAREN1left,_))::rest671) => let  cost, _, _)) :: ( _, ( MlyValue.rulename rulename, _, _)) :: _ :: ( _,
333  val result=MlyValue.cost((INT :: costtail))   ( MlyValue.pattern pattern, _, _)) :: _ :: ( _, ( MlyValue.ID ID,
334   in (LrTable.NT 4,(result,K_LPAREN1left,K_RPAREN1right),rest671) end  ID1left, _)) :: rest671)) => let val  result = MlyValue.rule (
335  | (22,rest671) => let val result=MlyValue.costtail(([]))  A.RULE(ID, pattern, rulename, cost))
336   in (LrTable.NT 5,(result,defaultPos,defaultPos),rest671) end   in ( LrTable.NT 11, ( result, ID1left, K_SEMICOLON1right), rest671)
337  | (23,(_,(MlyValue.costtail costtail,_,costtail1right))::(_,(  
338  MlyValue.INT INT,_,_))::(_,(_,K_COMMA1left,_))::rest671) => let val  end
339  result=MlyValue.costtail((INT :: costtail))  |  ( 15, ( ( _, ( MlyValue.ID ID, ID1left, ID1right)) :: rest671)) =>
340   in (LrTable.NT 5,(result,K_COMMA1left,costtail1right),rest671) end   let val  result = MlyValue.rulename (ID)
341     in ( LrTable.NT 6, ( result, ID1left, ID1right), rest671)
342    end
343    |  ( 16, ( ( _, ( MlyValue.ID ID, ID1left, ID1right)) :: rest671)) =>
344     let val  result = MlyValue.pattern (A.PAT(ID, []))
345     in ( LrTable.NT 7, ( result, ID1left, ID1right), rest671)
346    end
347    |  ( 17, ( ( _, ( _, _, K_RPAREN1right)) :: ( _, (
348    MlyValue.patterntail patterntail, _, _)) :: ( _, ( MlyValue.pattern
349    pattern, _, _)) :: _ :: ( _, ( MlyValue.ID ID, ID1left, _)) :: rest671
350    )) => let val  result = MlyValue.pattern (
351    A.PAT(ID, pattern :: patterntail))
352     in ( LrTable.NT 7, ( result, ID1left, K_RPAREN1right), rest671)
353    end
354    |  ( 18, ( rest671)) => let val  result = MlyValue.patterntail ([])
355     in ( LrTable.NT 8, ( result, defaultPos, defaultPos), rest671)
356    end
357    |  ( 19, ( ( _, ( MlyValue.patterntail patterntail, _,
358    patterntail1right)) :: ( _, ( MlyValue.pattern pattern, _, _)) :: ( _,
359     ( _, K_COMMA1left, _)) :: rest671)) => let val  result =
360    MlyValue.patterntail (pattern :: patterntail)
361     in ( LrTable.NT 8, ( result, K_COMMA1left, patterntail1right),
362    rest671)
363    end
364    |  ( 20, ( rest671)) => let val  result = MlyValue.cost ([])
365     in ( LrTable.NT 4, ( result, defaultPos, defaultPos), rest671)
366    end
367    |  ( 21, ( ( _, ( _, _, K_RPAREN1right)) :: ( _, ( MlyValue.costtail
368    costtail, _, _)) :: ( _, ( MlyValue.INT INT, _, _)) :: ( _, ( _,
369    K_LPAREN1left, _)) :: rest671)) => let val  result = MlyValue.cost (
370    INT :: costtail)
371     in ( LrTable.NT 4, ( result, K_LPAREN1left, K_RPAREN1right), rest671)
372    
373    end
374    |  ( 22, ( rest671)) => let val  result = MlyValue.costtail ([])
375     in ( LrTable.NT 5, ( result, defaultPos, defaultPos), rest671)
376    end
377    |  ( 23, ( ( _, ( MlyValue.costtail costtail, _, costtail1right)) :: (
378     _, ( MlyValue.INT INT, _, _)) :: ( _, ( _, K_COMMA1left, _)) ::
379    rest671)) => let val  result = MlyValue.costtail (INT :: costtail)
380     in ( LrTable.NT 5, ( result, K_COMMA1left, costtail1right), rest671)
381    
382    end
383  | _ => raise (mlyAction i392)  | _ => raise (mlyAction i392)
384  end  end
385  val void = MlyValue.VOID  val void = MlyValue.VOID

Legend:
Removed from v.2114  
changed lines
  Added in v.2590

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