On Monday, 17 November 2014 at 01:39:38 UTC, Walter Bright wrote:
Notice the total lack of strlen()'s in Warp.
Why would you need that? You know where the lexeme begins and
ends? If we are talking about old architectures you have to
acknowledge that storage was premium and that the major cost was
getting the strings into memory in the first place.
Nah, if you know that the file ends with zero then you can
build an efficient
finite automata as a classifier.
deadalnix busted that myth a while back with benchmarks.
I haven't seen it, but it is difficult to avoid lexers being
bandwidth limited these days.
Besides, how do you actually implement a lexer without
constructing a FA one way or the other?