[antlr-interest] parsing rules

George Soom george.soom at siria.cc
Mon May 31 00:18:57 PDT 2010



Randall R Schulz <rschulz at sonic.net> wrote on 28 May 2010, 04:25 PM:
Subject: Re: [antlr-interest] parsing rules
>On Wednesday May 26 2010, George Soom wrote:
>> Hi,
>>
>> I have to rewrite several files with mathematical text in them. Text
>> substitutions are really simple (e.g. 'a=4' -> 'a:=4;' and similar).
>> Input is in form:
>> ----
>> a=4
>> b=3
>> draw(a)
>> draw(b)
>> ----
>>
>> Needed output
>> -----
>> a:=4;
>> b:=3;
>> draw(a, "constant arguments")
>> draw(b, "constant arguments")
>> ----
>
>Why don't you just use sed?
>
>
>Randall Schulz

This process is using sed for several years. But as input syntax is
constantly changing, managing all these ~100line sed scripts is quite a
mess. 



More information about the antlr-interest mailing list