diff options
Diffstat (limited to 'lexlua/snobol4.lua')
| -rw-r--r-- | lexlua/snobol4.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lexlua/snobol4.lua b/lexlua/snobol4.lua index ad31aa782..1723a127f 100644 --- a/lexlua/snobol4.lua +++ b/lexlua/snobol4.lua @@ -11,8 +11,8 @@ local M = { _NAME = 'snobol4' } -- Helper patterns. local dotted_id = lexer.word * (P'.' * lexer.word)^0 -local dq_str = lexer.delimited_range('"', true, true) -local sq_str = lexer.delimited_range("'", true, true) +local dq_str = lexer.range('"', true, false) +local sq_str = lexer.range("'", true, false) local branch = B(lexer.space * P':(') * dotted_id * #P')' local sbranch = B(lexer.space * P':' * S'SF' * '(') * dotted_id * #P')' @@ -27,9 +27,9 @@ local bif = token(lexer.FUNCTION, word_match({ 'REVERSE', 'RPAD', 'RSORT', 'SERV_LISTEN', 'SET', 'SETEXIT', 'SIZE', 'SORT', 'SQRT', 'SSET', 'SUBSTR', 'TABLE', 'THAW', 'TIME', 'TRACE', 'TRIM', 'UNLOAD', 'VALUE', 'VDIFFER', -}, '', true) * #lexer.delimited_range('()', false, true, true)) -local comment = token(lexer.COMMENT, - lexer.starts_line(S'*#|;!' * lexer.nonnewline^0)) +}, '', true) * #lexer.range('(', ')', false, false, true)) +local comment = token(lexer.COMMENT, lexer.starts_line(S'*#|;!' * + lexer.nonnewline^0)) local control = token(lexer.PREPROCESSOR, lexer.starts_line(P'-' * lexer.word)) local identifier = token(lexer.DEFAULT, dotted_id) local keyword = token(lexer.KEYWORD, word_match({ @@ -42,7 +42,7 @@ local operator = token(lexer.OPERATOR, S'¬?$.!%*/#+-@⊥&^~\\=') local pattern = lexer.token(lexer.CLASS, word_match({ -- keep distinct 'ABORT', 'ANY', 'ARB', 'ARBNO', 'BAL', 'BREAK', 'BREAKX', 'FAIL', 'FENCE', 'LEN', 'NOTANY', 'POS', 'REM', 'RPOS', 'RTAB', 'SPAN', 'SUCCEED', 'TAB', -}, '', true) * #lexer.delimited_range('()', false, true, true)) +}, '', true) * #lexer.range('(', ')', false, false, true)) local str = token(lexer.STRING, sq_str + dq_str) local target = token(lexer.LABEL, branch + sbranch + sbranchx) local ws = token(lexer.WHITESPACE, lexer.space^1) |
