What's the problem backtracking through a file? Streams can have arbitrary positioning.
 
Alternatively, there must be a simple way to "wrap" a random access file stream with an array-like interface, right? Don't we have a class like that somewhere?
 
Like the reverse of <string-reader> and <byte-reader>?
 
I will definitely use the tokenizers, thanks.
 
22.11.2020, 01:34, "Jon Harper" <jon.harpe...@gmail.com>:
What you are describing reminds me of the built-in nesting of parsers with the ebnf tokenizer : https://docs.factorcode.org/content/article-peg.ebnf.tokenizers.html
 
Not sure if it's really applicable to your use case though.
 
 
As for streams, aren't packrat parsers backtracking (with memoization)? So no?
 
 
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to