Gents,

If this is going to be an active project (and I hope so!), then you should
use the ANTLR Perforce directory as this is the definitive SCCS - everything
else is a mirror and it seems that people set up these mirrors and then
don't look after them, so they are out of sync. Perforce is much better than
the other systems anyway ;-) Also, the target code will then be built in to
the ANTLR tool correctly (there is a java class that is invoked by the code
generator to give it a chance to perform certain things (such as escape
strings) before the string template is used).

All you need to do is ask on this dev list for a perforce login (just need a
login name that you want to use). Then install the perforce client and
follow the getting started text.

Jim



> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Yauhen Yakimovich
> Sent: Thursday, September 09, 2010 3:50 AM
> To: ANTLR-dev Dev
> Subject: Re: [antlr-dev] Improvements to the Antlr PHP Target
> 
> On Wed, Sep 8, 2010 at 10:12 PM, Benjamin Eberlei <[email protected]>
> wrote:
> > Hello,
> >
> > I have sent this to antlr-interest before, i didn't realize that there
> > is also a dev list, so here is that mail again.
> >
> > We are currently building an open-source PHP ORM
> > (http://www.doctrine-project.org) that utilizes a hand-written
> > Top-Down, Recursive-Descent Parser for our Query Language. That is why
> > we are looking for ways how to automate the parser generation for a
> > future major release to increase maintainability. This his going to be
> > a potential long-run refactoring for our project, so we are looking
> > into possible solutions as early as possible.
> >
> > We know Antlr exists and have found the ongoing effort to write an
> > Antlr Target for PHP at http://code.google.com/p/antlrphpruntime/.
> > However it seems development of that target has come to halt.
> 
> Please take a look at yy branch
> http://code.google.com/p/antlrphpruntime/source/browse/#svn/branches/
> yy
> 
> > Additionally we had doubts with regard to some design decisions in the
> Runtime engine.
> 
> Well, there have been no crucial decisions made, since this is a pure
mirroring
> effort.
> 
> > Over the weekend I have forked that project at
> > http://github.com/beberlei/antlr-php-runtime and changed the following
> > stuff:
> >
> > * Migrated Runtime to PHP 5.3 Namespaces (Antlr\Runtime\*)
> 
> Already done in yy target
> 
> > * Fixed formatting of all files to comply to PEAR/Zend Coding
> > Standards (Php.stg is not yet generation compliant code)
> 
> Did you used a codesniffer for this one?
> 
> > * Fixed functional testsuite to pass up to test 41 of the Python
> > testsuite (with the exception of Test 22)
> > * Refactored testsuite to have distinct sub-directories for grammer
> > and generated code to enhance readibility/maintainability.
> > * Removed class "Set" and implemented follow sets with simple PHP
> > arrays for performance reasons.
> > * Removed "public static" token and "constants" and used PHP class
> > constants for performance reasons (compile vs runtime generation)
> > * Rewrote DFA code (although this still does not support unicode and
> > probably has other bugs)
> > * Lots of other refactorings to make use of PHP internal features.
> will have to take a more closer look at last changes
> 
> > How should the development of this target continue given that the
> > original code is in the Google SVN? For the namespace and test-cleanup
> > refactoring I moved almost all files to new directories, so this could
> > be a bit cumbersome to merge back (sorry for that! :()
> 
> How troubling this could be to merge your code with yy branch? Please give
> some estimate.
> 
> 
> > Additionally for further development it would be helpful if anyone
> > could help me with these questions:
> >
> > 1. Is it really required to have a Runtime of "StringTemplate" library
> > in PHP? What is it used for at runtime? When is the ST.stg template
> > used at all?
> 
> Yes. It is a very important point. Features like template substitute in
ANTLR
> grammars require this.
> I am currently occupied with porting StringTemplate to PHP.
> 
> > 3. How stable are the runtimes? I see very little commits to them, so
> > probably very stable. But how will that change with Antlr v4 in
> > development?
> 
> a lot. We will have to rewrite a lot of things. But v3 is stable and
popular
> enough, so it is worth the effort.
> Libraries like StringTemplate can be exploited by v4 but written for v3.
> Such "legacy" is a part of ANTLR design.
> 
> > 4. After the basic Parser/Lexer support, what would be the next step
> > in target development? AST support with the Tree Runtime namespace?
> 
> Yes. AST rewrite and StringTemplate support.
> 
> There have been some email correspondence in June regarding the PHP
> target.
> Probably I can forward it to you if you like. Little activity has been
seen since.
> I was working in isolated mode on StringTemplate.
> 
> The GIT target you have been working with was a bad place to resume.
> As I've said take a look at yy branch.
> As far as I know from Sidharth Kuruvila, he has no plans for further
> contributing. I have not seen further activity from Geoff Speicher or
Rolland
> (rollxx). So if you want to coordinate your effort regarding the target, I
am
> probably the best person to talk to.
> 
> --
> With best regards,
> Y.Y.
> _______________________________________________
> antlr-dev mailing list
> [email protected]
> http://www.antlr.org/mailman/listinfo/antlr-dev

_______________________________________________
antlr-dev mailing list
[email protected]
http://www.antlr.org/mailman/listinfo/antlr-dev

Reply via email to