Added an item.
[external/ragel.git] / TODO
1 Should be possible to include scanner definitions in another scanner.
2
3 Need a "write entry name;" feature.
4
5 Should be possible to embed the negative sense of a condition.
6
7 Possibly bring back the old semantics of > in a new operator, or allow it to be
8 defined somehow.
9
10 When priorities are embedded without a name, the name of the current machine is
11 used. Perhaps a unique name for each instance of the current machine should be
12 used instead. This idea could work well if applied to user-defined embeddings. 
13
14 User defined embeddings <-name(a1,a2,...).
15 User defined operators expr1 <name> expr2.
16
17 Doesn't make make sense for [] to be the lambda (zero-length) machine. This
18 should be the empty set (the empty machine). But then would it be invalid in a
19 regular expression?
20
21 Expressions of the form: expr1 <: expr2 . expr3
22 sometimes don't behave as expected. If expr2 contains the empty string then
23 it's possible for the machine to escape to expr3. This is somewhat unexpected.
24 The empty string does count as moving through the right machine so there should
25 not be an exception for this case.
26 Using the stronger implementation: ( expr1 $1 %0 . expr2 ) will solve the problem.
27
28 Also, there is potential for nondeterminism to persist via the empty string
29 with the :> and :>> operators. Should also guard against this using leaving
30 priorities.
31
32 The |> guarded operator and the <| guarded operator need to be added.
33
34 The fixed size stack is a problem for manual recursion of unlimited depth.
35
36 An option to turn off the removal of duplicate actions might be useful for
37 analyzing unintentional nondeterminism.
38
39 Might be a good idea to add in some protection against using up all of a
40 system's memory. This protection could then be removed by people when someone
41 is sure they want to use a lot of memory.
42
43 fbreak should advance the current char. Depreciate fbreak and add
44     fctl_break;
45     fctl_return <expr>;
46     fctl_goto <label>;
47
48 Should the fbreak functions execute the to-state actions of the target state?
49
50 It should be possible to import/export definitions.
51
52 If a scanner can be optimized into a pure state machine, maybe permit it to be
53 referenced as a machine definition. Alternately: inline scanners with an
54 explicit exit pattern.
55
56 The split codegen needs a profiler connected to a graph partitioning algorithm.
57
58 Die a graceful death when rlcodegen -F receives large alphabets.
59
60 It's not currently possible to have more than one machine in a single function
61 because of label conflicts. Labels should have a unique prefix.
62
63 Emit a warning when a subtraction has no effect.
64
65 Emit a warning when unnamed priorities are used in longest match machines.
66 These priorities may unexpectedly interact across longest-match items. Changing
67 the language such that unwated interaction cannot happen would require naming
68 longest-match items.
69
70 Testing facilities: Quick easy way to query which strings are accepted.
71 Enumerate all accepted strings. From Nicholas Maxwell Lester.
72
73 Add more examples, add more tests and write more documentation.
74
75 A debugger would be nice. Ragel could emit a special debug version that
76 prompted for debug commands that allowed the user to step through the machine
77 and get details about where they are in their RL.
78
79 A quick and easy alternative would be a trace code generation option. This
80 would open a trace file and list all the active machines at each step of the
81 input.
82
83 Frontend should allow the redefinition of fsm section delimiters.
84
85 Do more to obscure ragel's private variables. Just a leading underscore is not
86 enough. Maybe something more like __ri__.
87
88 Some talk about capturing data:
89
90 Separate tokstart/tokend from the backtracking.  One var for preservation,
91 called preserve.  Write delcarations;  produces the necessary variables used by
92 ragel.  Move pattern start pattern end concepts into the general?  The
93 variables which may need to influence the preserve is dependent on the state.
94 States have a concept of which variables are in use.  Can be used for length
95 restrictions.  If there is an exit pattern, it is the explicit way out,
96 otherwise the start state and all final states are a way out.