good day. question about lexer. how i must write code for lexer without return token. For example, in flex i can write
"//" {/* do nothing*/}
but in lexer for drracket
[(:seq #// #//) null]
return (position-token ’() (position 7 #f #f) (position 10 #f #f)) i don’t need any return from this token. Help me, please
@wwall Assuming you’re using the lexer form from parser-tools/lex, you just want to call the lexer (tail-)recursively. That’s it. If you’re using a lexer-src-pos then you’d want to wrap your call in return-without-pos. The documentation for return-without-pos should be useful here: http://docs.racket-lang.org/parser-tools/Lexers.html?q=lexer-src-pos#%28form._%28%28lib._parser-tools%2Flex..rkt%29._return-without-pos%29%29
@mflatt Interesting, the example from yesterday (https://gist.github.com/LeifAndersen/ff07cb0ffd516b0333f2753db6e96c37) also causes it to crash on windows.
err….not crash
Cause it to jump to 42.
Oh wait, never mind. It is an os x bug
@mflatt O.O The behavior is different if I run it in DrRacket vs running it in the command line!
That is surprising.
(Also, it looks like the behavior goes back to Racket 5.2. It probably goes back even further although anything 5.1.x and older segfaults on startup.)