home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / compiler / 1423 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  2.0 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!usc!cs.utexas.edu!rutgers!faatcrl!iecc!compilers-sender
  2. From: locks@cs.sun.ac.za (Graeme Lockley)
  3. Newsgroups: comp.compilers
  4. Subject: L-attribute grammars VS a more general class
  5. Keywords: attribute, question
  6. Message-ID: <92-08-123@comp.compilers>
  7. Date: 20 Aug 92 14:35:42 GMT
  8. Sender: compilers-sender@iecc.cambridge.ma.us
  9. Reply-To: locks@cs.sun.ac.za (Graeme Lockley)
  10. Organization: Compilers Central
  11. Lines: 33
  12. Approved: compilers@iecc.cambridge.ma.us
  13.  
  14. This is a problem which has kept me thinking for a while now.
  15.  
  16.    The attribute grammar community can be roughly divided into two camps.
  17. The first camp believe that L-attribute grammars are not only simple, but
  18. are powerful enough to specify real programming languages. The second camp
  19. refute this by expending a lot of resources towards building attribute
  20. evaluators for the larger classes; pseudo-circular, non-circular, ordered
  21. AG to name the most popular.
  22.  
  23.    My question is:
  24.      Can languages that require identifiers be defined before use, be 
  25.      specified more compactly and/or clearly using the larger than
  26.      L-attribute grammars?
  27.  
  28.   Should this be the case, then most modern languages (don't take the term
  29. `modern' too literaly) can be specified using L-attribute grammars. The
  30. languages I have in mind being Modula-2, K&R C and ANSI C (granted, the
  31. PIM definition of Modula-2 does not allow the FORWARD keyword, although
  32. most of the Modula-2 compilers require the FORWARD definition if a
  33. procedure is used before being defined).
  34.  
  35.    I don't want to start a language or attribute grammar war; I am
  36. primarily intrested in the benefits of using a general class of attribute
  37. grammar above L-attribute grammar for the languages in question. A REAL
  38. example accompanying each response would be greatly appreciated.
  39.  
  40.    Please don't respond to the net but post to my e-mail address. Should
  41. anybody request for a summary, I'll post.
  42.  
  43. Graeme Lockley
  44. -- 
  45. Send compilers articles to compilers@iecc.cambridge.ma.us or
  46. {ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
  47.