home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / compiler / 1517 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.3 KB

  1. Path: sparky!uunet!gatech!rutgers!faatcrl!iecc!compilers-sender
  2. From: bburshte@pyramid.com (Boris Burshteyn)
  3. Newsgroups: comp.compilers
  4. Subject: Re: Parsing wars
  5. Keywords: parse, LR(1)
  6. Message-ID: <92-09-036@comp.compilers>
  7. Date: 3 Sep 92 17:53:15 GMT
  8. References: <92-09-027@comp.compilers> <92-09-006@comp.compilers>
  9. Sender: compilers-sender@iecc.cambridge.ma.us
  10. Reply-To: bburshte@pyramid.com (Boris Burshteyn)
  11. Organization: Compilers Central
  12. Lines: 20
  13. Approved: compilers@iecc.cambridge.ma.us
  14.  
  15. Andrew Bromage writes:
  16. >Pushing nonterminals onto the token stream, however, is a new one to me.
  17. >I suppose that this would optimise the GOTO tables a bit, but there are
  18. >better ways of doing this, like creating distinct reduce and lookahead
  19. >states (IMHO).
  20.  
  21. The USSA parser generator builds tables which make no distinction between
  22. terminals and nonterminals. In most cases tables are better or comparable
  23. with YACC. USSA also builds tables for a generator which produces sample
  24. sentences from the described language, like 
  25.  
  26.     int ident() { int ident = function_call; }
  27.  
  28. These sentences can be accepted due to equivalent treatment of terminals
  29. and nonterminals.
  30.  
  31. Thanks - Boris Burshteyn (bburshte@pyramid.com)
  32. -- 
  33. Send compilers articles to compilers@iecc.cambridge.ma.us or
  34. {ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
  35.