On Monday 11 October 2010 17:01:26 Dave Benjamin wrote:
> Hi all,
>
> I'm writing a PHP parser with PLY, which you can find here:
> http://github.com/ramen/phply
>
> The lexer is designed to be as close as possible to the one built into
> PHP (http://php.net/token_get_all), which means that there are tokens
> for WHITESPACE, OPEN_TAG, CLOSE_TAG, and a few other syntactical
> elements that are ignored by the parser, but still available in case
> someone wants to use the lexer for color syntax highlighting, etc.
I would write another lexer that calls the full lexer (the color syntax
highliting one), but ignores the mentioned tokens. The parser should not care
about something like whitespaces or comments.
Oldřich.
Cheers,
Dave
> --
> You received this message because you are subscribed to the Google Groups "ply-hack" group.
> To post to this group, send email to ply-...@googlegroups.com.
> To unsubscribe from this group, send email to ply-hack+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ply-hack?hl=en.
>