[kelbt-users] [feature proposal] autocommit mode
Adrian Thurston
thurston at complang.org
Sun Jan 25 00:57:42 UTC 2009
I'm curious if it would be hard to tell where to put the 'noncommit'
flags. What do you think?
-Adrian
Elijah Epifanov wrote:
> 2009/1/23 Adrian Thurston <thurston at complang.org>:
>> So let me see if I understand ... autocommit would cause all alternative
>> parses to be discarded on every reduction, with the option to disable it
>> on specific reductions? This would make Kelbt behave like standard Yacc
>> by default, with the kelbt behaviour turned on only where needed?
>
> exactly, like any ordinary lalr parser
>
>> -Adrian
>>
>> Elijah Epifanov wrote:
>>> There's no need to delay commit when parsing an unambiguous language,
>>> therefore every rule will need (if efficiency is of concern) to commit
>>> after reduce.
>>>
>>> It would be convenient to set an auto-commit mode on on per-grammar
>>> basis and (rarely, if at all) disable it for specific portions when
>>> needed.
>>>
>>> %%
>>> # Second level supports multiplication.
>>> F: tok_number tok_mult F commit try { ... };
>>> F: tok_number commit try { ... );
>>> };
>>> %%
>>> ->
>>> %%
>>> autocommit;
>>>
>>> # Second level supports multiplication.
>>> F: tok_number tok_mult F try { ... };
>>> F: tok_number try { ... };
>>> %%
>>>
>>> _______________________________________________
>>> kelbt-users mailing list
>>> kelbt-users at complang.org
>>> http://www.complang.org/mailman/listinfo/kelbt-users
>> _______________________________________________
>> kelbt-users mailing list
>> kelbt-users at complang.org
>> http://www.complang.org/mailman/listinfo/kelbt-users
>>
>
> _______________________________________________
> kelbt-users mailing list
> kelbt-users at complang.org
> http://www.complang.org/mailman/listinfo/kelbt-users
More information about the kelbt-users
mailing list