Loading ...
Sorry, an error occurred while loading the content.

Attribute grammar-style analysis in ANTLR

Expand Messages
  • Steven Atkinson
    Hello there, I am working on a project to implement the semantic analysis phase of a compiler using ANTLR. I have working parsers and blank (no-action) tree
    Message 1 of 1 , Nov 6, 1998
    View Source
    • 0 Attachment
      Hello there,

      I am working on a project to implement the semantic analysis
      phase of a compiler using ANTLR. I have working parsers and "blank"
      (no-action) tree parsers for each compilation unit.

      AFAIK, semantics involves
      (1) tree node attribute (a) definition and (b) evaluation
      (2) error/warning (a) detection and (b) reporting

      Questions:
      1. Can anyone recommend a good book on object-oriented compiler
      construction, besides the PCCTS book?

      2. Has anyone implemented an "attribute-grammar" style system for ANTLR?
      (allowing one to specify on-a per-node-type basis a set of attributes and
      actions to calculate their values?)

      3. Do I have an advantage by inheriting the blank tree-parsers
      and adding actions to only those rules for which I am interested in?

      Cheers,
      Steve


      Dr Steven Atkinson, Research Associate
      Department of Computer Science and Electrical Engineering
      P.O. Box 6109, West Virginia University, Morgantown WV 26506
      http://www.cs.wvu.edu/~atkinson
    Your message has been successfully submitted and would be delivered to recipients shortly.