[antlr-interest] New user

Matt Benson gudnabrsam at yahoo.com
Fri Aug 30 06:37:23 PDT 2002


Hi, Bogdan!  I remember you from the Jext list  :) 
Anyway, Transmogrify was actually a set of APIs that
were designed to plug into various IDEs.  I never
finished porting Transmogrify to Jext because its
refactorings were imperfect and development on it had
stopped.  Therefore I took the parts I needed (once
called Transmogrify-analytics) and have been adapting
them for my specific needs.  I do plan to parse on
demand for code completion, and yes, my hope is that I
can modify the Java grammar such that Antlr will allow
incomplete statements (within reason) while retaining
as much information as possible about those incomplete
statements.

Anyway, thanks for the link!  I will be taking a look
and I will let you know if it seems helpful.

-Matt


--- Bogdan Mitu <bogdan_mt at yahoo.com> wrote:
> 
> --- Matt Benson <gudnabrsam at yahoo.com> wrote:
> > As promised, I have come up with a question!  :)
> > 
> > Now, so we know, my interest in Antlr is, thus
> far,
> > restricted to java.g.  Right now I am interested
> in
> > comments.  I am parsing a Java file with both
> single
> > and multiline comments, and running it through a
> > TokenStreamHiddenTokenFilter using my own modified
> > version of the Transmogrify framework.  
> 
> Transmogrify is a plugin for Jext, isn't it? Do you
> want it to parse
> documents statically (when you save them, or when
> the user hit a button) or
> dinamically, as the user types the code? The later
> is more tricky, because
> ANTLR is unforgiveable with incomplete code, it
> returns you no AST if it
> couldn't finish it. But there are workarounds for
> this. You may want to take
> a look at the code here:
> 
>
http://groups.yahoo.com/group/antlr-interest/files/satc-20020620.zip
> 
> where you can see syntax highlight and AST
> construction for documents under
> editing. You can not apply it directly to Jext, as
> Jext uses a custom
> TextArea, but you may find it interesting anyway.
> 
> Best regards,
> Bogdan
> 
> 
> 
> 
> 
> I have
> > disabled the code that sets SL_COMMENT and
> ML_COMMENT
> > to be hidden in the TokenStreamHiddenTokenFilter;
> > however I still cannot see them when I display my
> > syntax tree using an ASTFrame.  Does anyone have
> any
> > clue why?
> > 
> > Sorry for the too-specific problem... :)
> > 
> > -Matt
> > 
> > 
> > --- Matt Benson <gudnabrsam at yahoo.com> wrote:
> > > I had pretty much determined the meanings of ()*
> and
> > > ()+  but what, then, is the origin of the terms
> > > "closure subrule" and "positive closure subrule"
> ? 
> > > Have I just not read enough yet?  :)
> > > 
> > > Anyway, I just upgraded to the newer version and
> it
> > > seems to have solved my compilation problem. 
> > > Tomorrow
> > > I'll probably come up with more!
> > > 
> > > Thanks a lot,
> > > Matt
> > > 
> > > --- Terence Parr <parrt at jguru.com> wrote:
> > > > 
> > > > On Wednesday, August 28, 2002, at 02:13  PM,
> Matt
> > > > Benson wrote:
> > > > 
> > > > > I had looked in the FAQ and seen the
> relevant
> > > > article.
> > > > >  I had not seen the Getting started with
> Antlr
> > > > > article.  I guess my biggest problem is
> unifying
> > > > the
> > > > > table in the manual that shows the
> punctuation
> > > and
> > > > > keywords with English descriptions. 
> > > Understanding
> > > > the
> > > > > difference between a subrule, a closure
> subrule,
> > > > and a
> > > > > positive subrule seems like something that's
> > > only
> > > > > going to come with much perusal of the
> > > > documentation,
> > > > > or more education in the field of parsing in
> > > > general.
> > > > 
> > > > Ah.  well a subrule just lets you put
> alternatives
> > > > in-line instead of 
> > > > making another rule like this:
> > > > 
> > > > a : A (B|C) ;
> > > > 
> > > > The "(...)*" closure means zero more times
> around
> > > > the loop and (...)+ 
> > > > means at least once :)
> > > > 
> > > > >
> > > > > The biggest problem I am facing at the
> moment is
> > > > this:
> > > > >  if I run Antlr on the latest java.g from
> John
> > > > Pybus
> > > > > via the ant-interest list, its declared
> > > > charVocabulary
> > > > > fills JavaLexer.java with various
> unicode/octal
> > > > escape
> > > > > sequences that will not compile with Sun's
> javac
> > > > for
> > > > > either 1.3 or 1.4.  I get various "empty
> > > character
> > > > > literal", "unclosed character literal", and
> > > > "illegal
> > > > > unicode escape" errors.  I am using Antlr
> 2.7.1.
> > > 
> > > > Do I
> > > > > need to upgrade to the new alpha?
> > > > 
> > > > Yup...the 2.7.2a2 release (nearly the final
> thing)
> > > > will fix lots of 
> > > > that.
> > > > 
> > > > Ter
> > > > 
> > > > 
> > > >  
> > > > 
> > > > Your use of Yahoo! Groups is subject to
> > > > http://docs.yahoo.com/info/terms/ 
> > > > 
> > > > 
> > > 
> > > 
> > >
> __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Finance - Get real-time stock quotes
> > > http://finance.yahoo.com
> > > 
> > >  
> > > 
> > > Your use of Yahoo! Groups is subject to
> > > http://docs.yahoo.com/info/terms/ 
> > > 
> > > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Finance - Get real-time stock quotes
> > http://finance.yahoo.com
> > 
> >  
> > 
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/ 
> > 
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
> 
>  
> 
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/ 
> 
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

 

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



More information about the antlr-interest mailing list