[antlr-interest] Is ANTLR suitable for wiki grammar parsing?
Randall R Schulz
rschulz at sonic.net
Wed Jun 6 11:26:07 PDT 2007
On Wednesday 06 June 2007 11:16, Martin d'Anjou wrote:
> >However, I cannot match something like:
> >
> >*bold* abc*de
> >
> >As it fails because there is no following '*' after de.
> >
> >And I think that this is essentially my problem. I do want
> > something like
> >
> >*bold* abc*de
> >
> >To be accepted, and i'd like for the *bold* to be matched in the
> >bolded parser rule, but since the rest of the line doesn't match, to
> >simply count abc*de as a regular phrase.
> >
> >Is this possible?
>
> I am very interested in knowing if this is possible as well. I have
> many problems where input is very unstructured, and I am not
> convinced ANTLR is the right solution for those problems.
My original feeling about the OP's problem is just this. Context-free
grammars are all about structured. Rigid structure, precisely defined.
I don't see a parser generator as the tool of choice for loosely
structured or imprecisely defined inputs.
The problem is that the number of rules you'd need and the difficulty in
preventing unwanted interactions between those rules make this a
problem that verges on the insoluble with what a CFG parser generator
gives you.
IMO, of course.
> Martin
Randall Schulz
More information about the antlr-interest
mailing list