Re: [racket-users] Readtable extensions and syntax coloring in DrRacket
Hi Andrew. Thanks, I do know about the here string syntax, and it's part of why I'm not willing to put much effort into fixing the lexer. :) William, udelim is neat and may be useful for me, so thanks for mentioning it. On Monday, May 1, 2017 at 6:48:12 PM UTC-4, Andrew Gwozdziewycz wrote: > Hi Brendan, > > I'm wondering if you tried the here string syntax for your use case, > which other than the fact that it requires a couple of newlines seems > similar in vein to what you were going for (e.g. it doesn't escape > anything)? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Readtable extensions and syntax coloring in DrRacket
I would also like to know about this. For what it's worth, I also have an extension for literal strings (the udelim package, and I've been behind using «guillemets» as nestable literal string quotes), and I haven't figured out how to extensibly change the coloring either. One of my more adventurous reader extensions treats | as a normal character, and in the interactions pane it additionally doesn't accept a line unless it has an even number of | characters. Is the interaction lexing connected to the color lexing, or is that somewhere else? Thanks, William On Mon, May 01, 2017 at 03:48:06PM -0700, Andrew Gwozdziewycz wrote: Hi Brendan, I'm wondering if you tried the here string syntax for your use case, which other than the fact that it requires a couple of newlines seems similar in vein to what you were going for (e.g. it doesn't escape anything)? ```racket #< Any text here, and nothing gets escaped, This is somewhat surprising. HI "Any text here, and nothing gets escaped. This is somewhat surprising." ``` Cheers, Andrew On Mon, May 1, 2017 at 2:37 PM, brendanwrote: I wrote a little Racket meta-language that adds a dispatch macro to the readtable for typing string literals without escape characters. You start with two or more #'s followed by any non-# character, then the actual string content, then end with the same non-# character and the same number of #'s. So ##|"foo\bar"|## evaluates the same as "\"foo\\bar\"" Works great, but it does wreak quite some havoc on DrRacket's syntax coloring. Unfortunately as far as I can tell the only way to fix that is to replace the color lexer entirely; there's no compositon like there is with readtables. Is that correct, or is there a trick that I'm missing? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- http://www.apgwoz.com -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Readtable extensions and syntax coloring in DrRacket
Hi Brendan, I'm wondering if you tried the here string syntax for your use case, which other than the fact that it requires a couple of newlines seems similar in vein to what you were going for (e.g. it doesn't escape anything)? ```racket > #< wrote: > I wrote a little Racket meta-language that adds a dispatch macro to the > readtable for typing string literals without escape characters. You start > with two or more #'s followed by any non-# character, then the actual string > content, then end with the same non-# character and the same number of #'s. So > >> ##|"foo\bar"|## > > evaluates the same as > >> "\"foo\\bar\"" > > Works great, but it does wreak quite some havoc on DrRacket's syntax > coloring. Unfortunately as far as I can tell the only way to fix that is to > replace the color lexer entirely; there's no compositon like there is with > readtables. Is that correct, or is there a trick that I'm missing? > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- http://www.apgwoz.com -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[racket-users] Readtable extensions and syntax coloring in DrRacket
I wrote a little Racket meta-language that adds a dispatch macro to the readtable for typing string literals without escape characters. You start with two or more #'s followed by any non-# character, then the actual string content, then end with the same non-# character and the same number of #'s. So > ##|"foo\bar"|## evaluates the same as > "\"foo\\bar\"" Works great, but it does wreak quite some havoc on DrRacket's syntax coloring. Unfortunately as far as I can tell the only way to fix that is to replace the color lexer entirely; there's no compositon like there is with readtables. Is that correct, or is there a trick that I'm missing? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.