Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-04-17 11:06:53 -0700 (Sun, 17 Apr 2005)
Revision: 867
Log message:
This adds initial support for searching in linear time (but the
search function hasn't been updated to use it yet).
The idea follows our original plan, that the search for regular
expression "r" is a new expression ".*#r" where '#' is used to
in this case to indicate shortest match.
However, a general solution for shortest-match based purely
on argument handling is dubious. For example, in this case,
a naive solution would always search to the end-of-file.
The solution here is to prune all NFA states that represent
the initial search whenever a final state is reached for the
first time.
Changes | Path |
+148 -62 | libmojave-branches/lexer_args_correction/util/lm_lexer.ml |