JGCSCS 4 Eiffel *.e JGsoft support@editpadpro.com http://www.editpadpro.com/cscs.html http://www.eiffel.com TRUE -- 0 10 class HELLO_WORLD creation make feature make is local io:BASIC IO do !!io io.put_string("%N Hello World!") end -- make end -- class HELLO_WORLD 0 FALSE 9 Reserved words \b(?:alias|all|and|as|check|class|creation|debug|deferred|do|else(?:if)?|end|ensure|expanded|export|external|feature|from|frozen|if|implies|indexing|infix|inherit|inspect|invariant|is|like|local|loop|not|obsolete|old|once|or|prefix|redefine|rename|require|rescue|retry|select|separate|then|undefine|until|variant|when|xor|bit|current|false|precursor|result|strip|true|unique)\b TRUE FALSE 7 0 0 FALSE Integer _ is used as a thousands separator. The scheme does not verify if digits are in groups of 3, so the number doesn't flicker while it's being typed in. \b[0-9][_0-9]*+\b FALSE FALSE 10 0 0 FALSE Real \b(?>[0-9]++(?:\.[0-9]++)?|\.[0-9]++)(?:E[+-]?+[0-9]++)?+\b TRUE FALSE 10 0 0 FALSE Hexadecimal number \b[0-9][A-F0-9]++X\b TRUE FALSE 10 0 0 FALSE Single-line comment --.*+ FALSE FALSE 5 0 0 TRUE Brackets [{}]++ FALSE FALSE 17 0 0 FALSE Character Closing ' optional so unclosed strings are colored until the end of the line. Quotes and nonprintables are escaped with % '[^'%\r\n]*+(?:%(?:.|$)[^'%\r\n]*+)*+'? FALSE FALSE 9 0 0 TRUE String " FALSE FALSE 9 0 3 TRUE Operator [-+*/^\\=<>]++ FALSE FALSE 13 0 0 FALSE 5 ( ) TRUE 3 [ ] TRUE 3 { } FALSE 3 ' ' FALSE 2 " " FALSE 5 1 String 1 9 TRUE 5 Closing " " FALSE FALSE 9 0 2 FALSE End of line Unclosed string without continuation -> stop coloring as a string $ FALSE FALSE 9 0 2 FALSE Continuation till next line Strings may span multiple lines by ending a line with % and starting the next one with % %[ \t]*+\r?+\n[ \t]*+% FALSE FALSE 9 0 0 FALSE Incomplete continuation Separately color incomplete continuation, and switch back to the main scheme. Without this token, while typing an a continuation, the "end of line" token will switch back to the main scheme, and color the line break and whitespace as plain text. When typing the second % on the next line, the parser would continue from the plain text line break instead of from the % on the previous line. This token takes care of that by grabbing the % on the previous line and the following line break. %[ \t]*+\r?+\n[ \t]*+ FALSE FALSE 9 0 2 FALSE Escape Quotes and nonprintables are escaped with %. %\S FALSE FALSE 9 0 0 FALSE