[antlr-interest] Is ANTLR suitable for wiki grammar parsing?

Collin VanDyck collin.vandyck at hannonhill.com
Wed Jun 6 14:55:46 PDT 2007


On Jun 6, 2007, at 2:26 PM, Randall R Schulz wrote:

> 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.

Yes, this is what I'm beginning to feel is true about my quest to use  
ANTLR for this purpose.  No shame on ANTLR of course, it's seeming  
like it's simply a case of a great tool, but for a different job.  If  
anyone does have any recommendations on tools to accomplish what I'm  
trying to do, I would certainly appreciate it, though it is not my  
intent to throw this list's traffic off-topic.

-Collin


-----
Collin VanDyck
CTO - Hannon Hill




More information about the antlr-interest mailing list