syntax changes in 5.15

Adrian Thurston thurs... at cs.queensu.ca
Fri Oct 27 17:14:17 UTC 2006


Hi, version 5.15 will have some syntax changes which should affect only a 
small number of users (if any). They are trivial to fix. They were made in 
the interest of making Ragel's rather cryptic syntax easier to remember.

1. The state-based embedding operators which access states that are not the 
start state and are not final (the 'middle' states) have changed.

They were:

<@/    eof action into middle states
<@!    error action into middle states
<@^    local error action into middle states
<@~    to-state action into middle states
<@*    from-state action into middle states

They are now:

<>/    eof action into middle states
<>!    error action into middle states
<>^    local error action into middle states
<>~    to-state action into middle states
<>*    from-state action into middle states

2. The verbose form of embeddings using the <- operator have been removed. 
This syntax was impossible to remember.

3. New verbose forms of state-based embedding operators have been added. 
These are like the symbol versions, except they replace the symbols

/  !  ^  ~  *

with literal keywords

eof err lerr to from

For example:

$/ { /*code*/ }
$eof { /*code*/ }

both embed an eof action into all states.

 >* { /*code*/ }
 >from { /*code*/ }

both embed a from-state action into a machine's start state.

4. The following new keywords have been added:

when eof err lerr to from


-Adrian



More information about the ragel-users mailing list