Keep s+ instead of s*

This commit is contained in:
Glenn Y. Rolland 2017-09-12 16:18:23 +02:00
parent 56160042e8
commit 64c3d6070c

View file

@ -3,6 +3,7 @@ module Mm2ep
class Lexer < Rly::Lex class Lexer < Rly::Lex
token :L_PAR, /\(/ token :L_PAR, /\(/
token :R_PAR, /\)/
token :NUMBER, /[0-9]+(\.[0-9]+)?/ token :NUMBER, /[0-9]+(\.[0-9]+)?/
token :STRING, /"[^"]*"/ token :STRING, /"[^"]*"/
token :EQ_OP, /\=/ token :EQ_OP, /\=/
@ -12,8 +13,7 @@ module Mm2ep
token :AND_OP, /AND/ token :AND_OP, /AND/
token :OR_OP, /OR/ token :OR_OP, /OR/
token :NOT_OP, /NOT/ token :NOT_OP, /NOT/
token :SPACE, /\s*/ token :SPACE, /\s+/
token :R_PAR, /\)/
on_error do |t| on_error do |t|
puts "Illegal character #{t.value}" puts "Illegal character #{t.value}"