Re: [racket-users] Custom color lexer for DrRacket that requires lookahead

2016-06-04 Thread Robby Findler
On Mon, May 30, 2016 at 2:32 PM, Alexis King wrote: > >> On May 30, 2016, at 12:23, Alexis King wrote: >> >> Now the colorer attempts to lex the slash alone as a new token without >> attempting to re-lex “foo”. Since a forward slash is not valid at

Re: [racket-users] Custom color lexer for DrRacket that requires lookahead

2016-05-30 Thread Alexis King
> On May 30, 2016, at 12:23, Alexis King wrote: > > Now the colorer attempts to lex the slash alone as a new token without > attempting to re-lex “foo”. Since a forward slash is not valid at the > beginning of an identifier, it is colored as an error. > > Basically, when

Re: [racket-users] Custom color lexer for DrRacket that requires lookahead

2016-05-30 Thread Robby Findler
I'm not quite following but I agree the dont-stop is not what you want. That is a form of concurrency control and not relevant here. The lexing apparatus works best if your lexing has the invariant that editing a lexeme doesn't invalidate things before it. Is there another way to recast lexing

[racket-users] Custom color lexer for DrRacket that requires lookahead

2016-05-29 Thread Alexis King
I’ve created a custom language with non-s-expression syntax, so I’ve written a lexer and connected it to the DrRacket syntax highlighter. This works pretty well, but I have a small problem: when modifying text that would cause earlier tokens in the stream to lex differently, I am unsure how to