Actions: * could be per state or per transition - either would work - maybe you could allow both * needs some more punctuation - e.g. action in {...} * could be C code (like lex/yacc) or could just be characters to output - I suggest the latter, as the former is hard, and at least you can write simple filters * use a special symbol to indicate the character just recognised - e.g. $ You may need to change the system in other ways e.g. make newline processing explicit, . = anything as in lex. actions per state: 1: 'a' 2; 2: 'a' 2, '\n' 3; 3{just read a+ on a line}@ ; *1 actions per transition: 1: 'a' 1, '\n' 3 {just read a* on a line}; 3@ ; *1 and you could have transitions and messages e.g. for blank line, unexpected characters etc. you could even have variables & simple boolean expressions but this requires you to drastically change the parse trees. e.g. to recognise 1 or more of any 1 character on a line: 1: . 2 {$a=$}; 2: . 2 {$a==$}, '\n' 3; 3{just read $a+ on a line}@ ; *1 Another example would be a filter, like ze sveedish chef - see link on extras page 1: 'a' 2 {ah}, 'e' 2 {ee}, '.' 1 {$}; etc.