[DGD] Reasonable Tick Counts?
Shentino
shentino at gmail.com
Mon Jul 16 00:25:59 CEST 2007
Guess I messed up. It was only a guess...thanks for correcting my
faulty impressions.
On 7/13/07, Felix A. Croes <felix at dworkin.nl> wrote:
> Shentino <shentino at gmail.com> wrote:
>
> > Actually, having 1 real token, plus a nomatch, might be MORE efficient
> > than two explicit tokens. With nomatch, all the parser needs to try
> > is the first one, and if it doesn't work, it can default to nomatch by
> > process of elimination...whereas with TWO token rules, it has to try
> > them both, and if it doesn't match either it bombs out with a runtime
> > error.
>
> Trying them both isn't any slower than trying the longest of the two,
> whereas a nomatch token will attempt the longest possible match, and
> then fail. The reason nomatch is less efficient is that it involves
> reprocessing input that otherwise would be processed only once.
>
> Regards,
> Dworkin
> ___________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd
>
More information about the DGD
mailing list