[antlr-interest] Re: Translators Should Use Tree Grammars

atripp54321 atripp at comcast.net
Tue Nov 23 08:23:14 PST 2004



Anakreon,
OK, thanks. Now I see.
So you have, for example, this rule in XML:
  <!-- Check w3 for header name -->
  <property name="CacheControl" type="DSTRING">
    <arg type="DSTRING" />
    <read>
      <ast name="METHOD_CALL" text="session_cache_limiter" />
    </read>
    <write>
      <ast name="METHOD_CALL" text="session_cache_limiter">
          <ast name="ARGLIST_VALUES">
              <arg index="1" />
          </ast>
      </ast>
    </write>
  </property>

...which says to replace this:
Response.CacheControl = "X"
...with this:
session_cache_limiter("X");


I'm still not seeing how you do the more complicated stuff like
accessing information that's in different parts of the AST.
Do you have a symbol table? And can you get a list of all
the references to a particular variable? In other words,
the XML files in the object directory specify the simpler
types of transformations, but where is the code for
the more complicated cases?

I'll send future questions (if any) in email.
Thanks again,
Andy





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list