Adrian Thurston
2012-12-08 21:55:12 UTC
Hello All,
I'm closing in on a reference code generator for Ragel 7. This major
version of Ragel has a completely rewritten "condition" implementation.
Conditions in Ragel 6 were an add-on with respect to the primary Ragel
data structures and algorithms. Upon processing the current state,
conditions were tested first, and the current character was transcribed
to include the condition result. The transcribed value was then used in
the transition search.
When conditions were first introduced, this technique had a minimal
impact on the existing data structures and algorithms, however, it
resulted in the infamous "character space exhausted" error because we
were using up bits in the key space for the condition information.
In Ragel 7, the order of operations is swapped; transitions are located
using the current character, then conditions are tested and the result
narrows down the transition search. No character transcription takes
place. This is a more natural implementation that does not rely on use
of the key space for condition test results.
I have been working on the core data structures, the NFA-DFA conversion,
and the C/C++ code generator. Next comes the code generators for the
other languages. They are all currently disabled because they do not
compile as is.
If there is anyone interested in migrating the remaining code generators
then give me a shout. I will work with you to achieve the porting.
Thanks,
Adrian
I'm closing in on a reference code generator for Ragel 7. This major
version of Ragel has a completely rewritten "condition" implementation.
Conditions in Ragel 6 were an add-on with respect to the primary Ragel
data structures and algorithms. Upon processing the current state,
conditions were tested first, and the current character was transcribed
to include the condition result. The transcribed value was then used in
the transition search.
When conditions were first introduced, this technique had a minimal
impact on the existing data structures and algorithms, however, it
resulted in the infamous "character space exhausted" error because we
were using up bits in the key space for the condition information.
In Ragel 7, the order of operations is swapped; transitions are located
using the current character, then conditions are tested and the result
narrows down the transition search. No character transcription takes
place. This is a more natural implementation that does not rely on use
of the key space for condition test results.
I have been working on the core data structures, the NFA-DFA conversion,
and the C/C++ code generator. Next comes the code generators for the
other languages. They are all currently disabled because they do not
compile as is.
If there is anyone interested in migrating the remaining code generators
then give me a shout. I will work with you to achieve the porting.
Thanks,
Adrian