117 # support for uncommon kinds of numbers - |
117 # support for uncommon kinds of numbers - |
118 # have to figure out what the characters mean |
118 # have to figure out what the characters mean |
119 # (r'(#e|#i|#b|#o|#d|#x)[\d.]+', Number), |
119 # (r'(#e|#i|#b|#o|#d|#x)[\d.]+', Number), |
120 |
120 |
121 # strings, symbols and characters |
121 # strings, symbols and characters |
122 (r'"(\\\\|\\"|[^"])*"', String), |
122 (r'"(\\\\|\\[^\\]|[^"\\])*"', String), |
123 (r"'" + valid_name, String.Symbol), |
123 (r"'" + valid_name, String.Symbol), |
124 (r"#\\([()/'\"._!§$%& ?=+-]|[a-zA-Z0-9]+)", String.Char), |
124 (r"#\\([()/'\"._!§$%& ?=+-]|[a-zA-Z0-9]+)", String.Char), |
125 |
125 |
126 # constants |
126 # constants |
127 (r'(#t|#f)', Name.Constant), |
127 (r'(#t|#f)', Name.Constant), |
401 (r'-?\d+', Number.Integer), |
401 (r'-?\d+', Number.Integer), |
402 (r'0[0-7]+j?', Number.Oct), |
402 (r'0[0-7]+j?', Number.Oct), |
403 (r'0[xX][a-fA-F0-9]+', Number.Hex), |
403 (r'0[xX][a-fA-F0-9]+', Number.Hex), |
404 |
404 |
405 # strings, symbols and characters |
405 # strings, symbols and characters |
406 (r'"(\\\\|\\"|[^"])*"', String), |
406 (r'"(\\\\|\\[^\\]|[^"\\])*"', String), |
407 (r"'" + valid_name, String.Symbol), |
407 (r"'" + valid_name, String.Symbol), |
408 (r"\\(.|[a-z]+)", String.Char), |
408 (r"\\(.|[a-z]+)", String.Char), |
409 (r'^(\s*)([rRuU]{,2}"""(?:.|\n)*?""")', bygroups(Text, String.Doc)), |
409 (r'^(\s*)([rRuU]{,2}"""(?:.|\n)*?""")', bygroups(Text, String.Doc)), |
410 (r"^(\s*)([rRuU]{,2}'''(?:.|\n)*?''')", bygroups(Text, String.Doc)), |
410 (r"^(\s*)([rRuU]{,2}'''(?:.|\n)*?''')", bygroups(Text, String.Doc)), |
411 |
411 |
1488 |
1488 |
1489 # whitespace |
1489 # whitespace |
1490 (r'\s+', Text), |
1490 (r'\s+', Text), |
1491 |
1491 |
1492 # strings, symbols and characters |
1492 # strings, symbols and characters |
1493 (r'"(\\\\|\\"|[^"])*"', String), |
1493 (r'"(\\\\|\\[^\\]|[^"\\])*"', String), |
1494 |
1494 |
1495 # braces |
1495 # braces |
1496 (r'\{', String, "bracestring"), |
1496 (r'\{', String, "bracestring"), |
1497 |
1497 |
1498 # [text] ... [/text] delimited strings |
1498 # [text] ... [/text] delimited strings |
2381 # support for uncommon kinds of numbers - |
2381 # support for uncommon kinds of numbers - |
2382 # have to figure out what the characters mean |
2382 # have to figure out what the characters mean |
2383 # (r'(#e|#i|#b|#o|#d|#x)[\d.]+', Number), |
2383 # (r'(#e|#i|#b|#o|#d|#x)[\d.]+', Number), |
2384 |
2384 |
2385 # strings, symbols and characters |
2385 # strings, symbols and characters |
2386 (r'"(\\\\|\\"|[^"])*"', String), |
2386 (r'"(\\\\|\\[^\\]|[^"\\])*"', String), |
2387 (r"'" + valid_name, String.Symbol), |
2387 (r"'" + valid_name, String.Symbol), |
2388 (r"#\\([()/'\"._!§$%& ?=+-]|[a-zA-Z0-9]+)", String.Char), |
2388 (r"#\\([()/'\"._!§$%& ?=+-]|[a-zA-Z0-9]+)", String.Char), |
2389 |
2389 |
2390 # constants |
2390 # constants |
2391 (r'(#t|#f)', Name.Constant), |
2391 (r'(#t|#f)', Name.Constant), |
2594 |
2594 |
2595 # binary/oct/hex literals |
2595 # binary/oct/hex literals |
2596 (r'(#b|#o|#x)[\d.]+', Number), |
2596 (r'(#b|#o|#x)[\d.]+', Number), |
2597 |
2597 |
2598 # strings |
2598 # strings |
2599 (r'"(\\\\|\\"|[^"])*"', String), |
2599 (r'"(\\\\|\\[^\\]|[^"\\])*"', String), |
2600 |
2600 |
2601 # true/false constants |
2601 # true/false constants |
2602 (r'(#t|#f)', Name.Constant), |
2602 (r'(#t|#f)', Name.Constant), |
2603 |
2603 |
2604 # keywords |
2604 # keywords |
2670 |
2670 |
2671 (r'[,\s]+', Text), |
2671 (r'[,\s]+', Text), |
2672 (r'-?\d+\.\d+', Number.Float), |
2672 (r'-?\d+\.\d+', Number.Float), |
2673 (r'-?\d+', Number.Integer), |
2673 (r'-?\d+', Number.Integer), |
2674 |
2674 |
2675 (r'"(\\\\|\\"|\\|[^"\\])*"', String), |
2675 (r'"(\\\\|\\[^\\]|[^"\\])*"', String), |
2676 |
2676 |
2677 # these are technically strings, but it's worth visually |
2677 # these are technically strings, but it's worth visually |
2678 # distinguishing them because their intent is different |
2678 # distinguishing them because their intent is different |
2679 # from regular strings. |
2679 # from regular strings. |
2680 (r':' + valid_name, String.Symbol), |
2680 (r':' + valid_name, String.Symbol), |