lib/qlang/lexer/tokens.rb in qlang-0.0.27182123 vs lib/qlang/lexer/tokens.rb in qlang-0.0.27182124

- old
+ new

@@ -17,19 +17,18 @@ # h(x + y) != h * (x + y) FUNCV = /(?:#{EMBEDDED_FUNC}|#{USER_FUNC})(?=#{LPRN})/ # VARIABLE VAR = /(?:[a-d]|[f-z])/ - #VAR_MUL2 = /(?!pi)#{VAR}{2}/ + # VAR_MUL2 = /(?!pi)#{VAR}{2}/ # #VAR_MUL3 = /(?!#{EMBEDDED_FUNC})#{VAR}{3}/ # # FIX: - #VAR_MUL = /(?!#{EMBEDDED_FUNC})#{VAR_MUL2}/ + # VAR_MUL = /(?!#{EMBEDDED_FUNC})#{VAR_MUL2}/ # # TERM # TERM = /(#{NUM}|#{VAR_MUL}|#{VAR_MUL})/ - # OPE PLS = /\+/ SUB = /-/ MUL = /\*/ DIV = /\// @@ -39,11 +38,10 @@ VARNUM = /(?:#{NUM}|#{VAR})/ ANYSP = ' *' ANYSTR = /.+/ NONL = /[^\r\n]/ - PRN = /(?:#{LPRN}|#{RPRN})/ LBRCS = /\{/ RBRCS = /\}/ BRCS = /(?:#{LBRCS}|#{RBRCS})/ @@ -69,10 +67,10 @@ SCLN_OR_NELN = /(?:#{SCLN}|#{NLIN})/ # TODO: what is better class Util def self.string_out(str, partition) - /#{ANYSP}#{str}(?:#{ANYSP}#{partition}#{ANYSP}#{str})*#{ANYSP}/ + /#{ANYSP}#{str}(?:#{ANYSP}#{partition}#{ANYSP}#{str})*#{ANYSP}/ end def self.func_call(args) /#{FUNCV}#{LPRN}#{ANYSP}#{args}#{ANYSP}#{RPRN}/ end