code generation styles, C and Java??

Stephen Bannasch stephen.banna... at deanbrook.org
Mon Mar 24 03:16:22 UTC 2008


I'm trying to setup some tasks that can benchmark 
size and speed for all the different ragel code 
generation styles.

In my RakeFile I've got these constants defined:

RAGEL_CODE_GENERATION_STYLES = {
   "table_driven" => 'T0',
   "faster_table_driven" => 'T1',
   "flat_table_driven" => 'F0',
   "faster_flat_table_driven" => 'F1',
   "goto_driven" => 'G0',
   "faster_goto_driven" => 'G1',
   "really_fast goto_driven" => 'G2'
   # "n_way_split_really_fast_goto_driven" => 'P<N>'
}
DEFAULT_RAGEL_CODE_GENERATION = "really_fast goto_driven"

I assume they can all be used with C generation.

The manual states:

   In the case of Java and Ruby, table-based code generation is the
   only code style supported.

There appear to be two types of table-base code generation:

   -F0 þat table-driven
   -F1 þat table, expanded actions

But neither of these works:

   ragel -J -F0 -o test.java test.rl
   ragel -J -F1 -o test.java test.rl

Only this:

   ragel -J -o test.java test.rl

Is there only one style of Java code generation?



More information about the ragel-users mailing list