It's essentially "are there less than N characters after YYCURSOR in the buffer?"
Actually "are there less then N input characters remaining" is more correct,
since generic API makes no assumptions about the existence of YYCURSOR
and buffer at all.
maybe YY_HAVE_LESS_THAN(N) ?

What do you think of changing the macros so that we use underscores between the words and the YY? I find that much more readable, and since we're creating a new set we might as well improve it some.
That's a good idea.

When I experimented with different names I occasionally bumped into "YYEOF"
macro generated by bison in parser.cc. Of course, one can #undefine a macro
after re2c block or specify any name with "re2c:define:YYSMTH = ...;", but the whole situation is unpleasant. It would be better if all re2c names started with
"RE2C_" and had underscores between parts of the name.

Do you know why re2c ever started to use "YY" ?

It's ok with new names:

 * RE2C_PEEK ()
 * RE2C_SKIP ()
 * RE2C_BACKUP ()
 * RE2C_BACKUP_CTX ()
 * RE2C_RESTORE ()
 * RE2C_RESTORE_CTX ()
 * RE2C_LESS_THAN (n)

Changing old names is not that easy, the best way I can think of
is to add a compatibility switch that would enable old names
(and good error messages for those who don't expect this).

What do you think of it?
Just thinking out loud here, but I think it'd be nice if we had an easy way to measure the performance impact of changes so we could try and answer performance concerns empirically.
I'm not sure if performance tests will help to measure small codegen changes:
good benchmarking is really hard to do, especially when the changes are so
small and the tests so versatile. Comparing assembly seems like the right
approach for subtle changes (I think I'll add my bash script to re2c repo).

However, I have one interesting optimization on my mind, so the question
of benchmarking will arise soon. It's also very interesting to benchmark
re2c vs other generators (I'm especially interested in quex <https://sourceforge.net/projects/quex/>, but also flex
and others). :)

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Re2c-general mailing list
Re2c-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/re2c-general

Reply via email to