[kelbt-users] [feature proposal] autocommit mode
Elijah Epifanov
elijah.epifanov at gmail.com
Thu Feb 12 18:05:36 UTC 2009
Hey, sorry for the long delay.
I think it should be just a flag at the end of a rule (where commit is
implied in autocommit mode).
e.g.:
autocommit;
# Second level supports multiplication.
F: tok_number tok_mult F hold try { ... };
I think hold is a correct antonym to commit in this case.
2009/1/25 Adrian Thurston <thurston at complang.org>:
> 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
>
> _______________________________________________
> 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