Split the XML parsing, reduced fsm, and the code generation data structures out
[external/ragel.git] / TODO
1 An expression of the form:
2     expr1 <: expr2 . expr3
3 Is parsed as:
4     ( expr1 <: expr2 ) . expr3
5 If expr2 contains the empty string then it's possible for the machine to escape
6 to expr3. This can be confusing. Perhaps <: should behave like
7     expr1 <: ( expr2 . expr3 )
8 By using the implementation:
9     expr1 $1 %0 . expr2 . expr3
10
11 The |> guarded operator and the <| guarded operator need to be added.
12
13 The fixed size stack is a problem for manual recursion of unlimited depth.
14
15 An option to turn off the removal of duplicate actions might be useful for
16 analyzing unintentional nondeterminism.
17
18 To avoid confusion, there should be a correspondence between state numbers in
19 the generated code, graphviz and the XML.
20
21 Might be a good idea to add in some protection against using up all of a
22 system's memory. This protection could then be removed by people when someone
23 is sure they want to use a lot of memory.
24
25 fbreak should advance the current char. Depreciate fbreak and add
26     fctl_break;
27     fctl_return <expr>;
28     fctl_goto <label>;
29
30 It should be possible to import/export definitions.
31
32 If a scanner can be optimized into a pure state machine, maybe permit it to be
33 referenced as a machine definition. Alternately: inline scanners with an
34 explicit exit pattern.
35
36 The split codegen needs a profiler connected to a graph partitioning algorithm.
37
38 Die a graceful death when rlcodegen -F receives large alphabets.
39
40 It's not currently possible to have more than one machine in a single function
41 because of label conflicts. Labels should have a unique prefix.
42
43 Emit a warning when a subtraction has no effect.
44
45 Emit a warning when unnamed priorities are used in longest match machines.
46 These priorities may unexpectedly interact across longest-match items. Changing
47 the language such that unwated interaction cannot happen would require naming
48 longest-match items.
49
50 Testing facilities: Quick easy way to query which strings are accepted.
51 Enumerate all accepted strings. From Nicholas Maxwell Lester.
52
53 Add more examples, add more tests and write more documentation.
54
55 A debugger would be nice. Ragel could emit a special debug version that
56 prompted for debug commands that allowed the user to step through the machine
57 and get details about where they are in their RL.
58
59 Frontend should allow the redefinition of fsm section delimiters.
60
61 Do more to obscure ragel's private variables. Just a leading underscore is not
62 enough. Maybe something more like __ri__.
63
64 Some talk about capturing data:
65
66 Separate tokstart/tokend from the backtracking.  One var for preservation,
67 called preserve.  Write delcarations;  produces the necessary variables used by
68 ragel.  Move pattern start pattern end concepts into the general?  The
69 variables which may need to influence the preserve is dependent on the state.
70 States have a concept of which variables are in use.  Can be used for length
71 restrictions.  If there is an exit pattern, it is the explicit way out,
72 otherwise the start state and all final states are a way out.