[ragel-users] Why not prepend a prefix to variables used by ragel?

Adrian Thurston thurston at colm.net
Sat Feb 23 07:59:01 UTC 2019


 

Sorry but creating an unnecessary three-year countdown to breaking all
ragel programs ever written spectacularly fails cost-benefit analysis
over my finite time and energy on this planet. 

I do not know how many users there are. 

Lexical analysis is not the primary function of ragel. It's something it
does. It's intended for expressing a parser as a single regular (ish)
grammar. 

On 2019-02-23 14:12, Peng Yu wrote: 

> This can be easily solved but adding a command line option to enable such prefixes and the date the prefixes will be enforced (say in 3 years). So people can have time to migrate their ragel code. This kind of things has been done all the time. I don't think it should be an excuse not make the variable name more readable. "access" can solve the readability problem, but it also uses an extra structure which changes the meaning of the code. I will check "variable" later. 
> 
> BTW, how many uses of ragel anyway? It seems to have a far less user base than flex. My impression is that people uses it because it can offer something flex does not offer. However, flex can already solve a lot of lexing problems. So there will be much less users use ragel than flex. This can be shown by the numbers of questions on stack overflow and the numbers of projects on github. 
> 
> On Sat, Feb 23, 2019 at 3:52 AM Adrian Thurston <thurston at colm.net> wrote: 
> 
>> You can use the variable and access statements (section 5 of the 
>> manual).
>> 
>> Changing the default behaviour at this point would break every ragel 
>> program out there and that's not something I'm interested in doing.
>> 
>> On 2019-02-22 21:23, Peng Yu wrote:
>>> The variables mentioned in section 5.1 "Variables Used by Ragel"
>>> manual are very much like common names. It will be confusing to look
>>> at ragel code written in this way. Why not consider adding a prefix,
>>> e.g., rg_, to them to make it less confusing? Thanks.
>>> 
>>> - cs
>>> - p
>>> - ...
>> 
>> _______________________________________________
>> ragel-users mailing list
>> ragel-users at colm.net
>> http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users [1]
> -- 
> 
> Regards,
> Peng 
> 
> _______________________________________________
> ragel-users mailing list
> ragel-users at colm.net
> http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users [1]
 

Links:
------
[1] http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20190223/224272e7/attachment.html>


More information about the ragel-users mailing list