Related articles |
---|
Java Comment-Preserving Grammar matthew-google@faredge.com.au (2004-05-24) |
RE: Java Comment-Preserving Grammar quinn-j@shaw.ca (Quinn Tyler Jackson) (2004-05-30) |
RE: Java Comment-Preserving Grammar matt@faredge.com.au (Matthew Herrmann) (2004-05-30) |
RE: Java Comment-Preserving Grammar matt@faredge.com.au (Matthew Herrmann) (2004-05-30) |
RE: Java Comment-Preserving Grammar quinn-j@shaw.ca (Quinn Tyler Jackson) (2004-06-21) |
From: | "Matthew Herrmann" <matt@faredge.com.au> |
Newsgroups: | comp.compilers |
Date: | 30 May 2004 13:17:56 -0400 |
Organization: | Compilers Central |
References: | 04-05-075 04-05-077 |
Keywords: | Java, parse |
Posted-Date: | 30 May 2004 13:17:56 EDT |
Hi Quinn,
Thanks for your detailed response. It does look like these solutions
are outside the scope of my work. It is interesting that something
with obvious applications in hypertext markup of source code is still
in theoretical development -- but the wheels are turning as you show!
I have found a relatively cheap way to handle comments, which involves
pre-filtering those of interest and making them first class elements of
my parse tree.
The standard java grammar has then been augmented to support these new
elements.
ie:
public /*#result*/ int x;
becomes
public result int x;
when I parse it. It looks like this area of grammars and parsing
is still in (active) development.
It's not what I was originally after, but at least it can automatically
catch mistyped /*# ... */ comments at the parsing phase, which wouldn't be
possible by my original idea.
Many thanks again,
Matt
Return to the
comp.compilers page.
Search the
comp.compilers archives again.