[antlr-interest] expressing URL in ANTLR grammar

Ketan Maheshwari ketancmaheshwari at gmail.com
Tue Mar 30 11:20:29 PDT 2010


Bart,
Thanks for your suggestion. I think its a really involved task to define URL
per the specification. For the timebeing I will do with my lightweight spec
:)

Ron
Thanks for the insight. Indeed, it would be interesting to dig into java's
URL class spec to get some info on how they manage it.

cheers
Ketan

On Tue, Mar 30, 2010 at 7:01 PM, Ron Burk <ronburk at gmail.com> wrote:

> > Actually this is my lame attempt to ask if someone can help me express
> URL
> > in ANTLR grammar. :-)
>
> It's a bit of a fuzzy goal, since the URL spec is kinda hierarchical,
> branched by numerous different "schemes".  For example, if you
> want to parse the detailed bits out of a Windows file: scheme,
> that's a whole other spec to chase down and decipher (introducing
> drive letters, share names,  UNC, different length restrictions
> depending on the context and syntax, ugh).
>
> If you "just" want to parse http: URLs, that seems like more of a
> regular expression than a grammar. The library for your favorite
> interpreted language probably already has a function (or regular
> expression) to do it for you...
>


More information about the antlr-interest mailing list