Sha256: abfa51ee287924b345e0052641a12f0f17d720d7feed68006019460a2ab37c6a

Contents?: true

Size: 499 Bytes

Versions: 8

Compression:

Stored size: 499 Bytes

Contents

module Qlang
  module Lexer
    class FormulaLexer < Base
      rule(/\^/) { :EXP }
      rule(/#{EMBEDDED_FUNC}/) { :BFUNC }
      rule(/(pi|[1-9a-z]){2,}/) { :MUL }
      rule(/(pi|[1-9a-z])/) { :SNGL }
      rule(/([^\^1-9a-z]|^pi)+/) { :OTHER }

      # rule(/#{OPE}/) { :OPE }
      # rule(/#{FUNCV}/) { :FUNCV }
      # rule(/#{VAR}/) { :VAR }
      # rule(/#{NUM}/) { :NUM }
      # rule(/#{LPRN}/) { :LPRN }
      # rule(/#{RPRN}/) { :RPRN }

      # rule(/#{ANYSP}/) {  }
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
hilbert-0.0.2700000 lib/qlang/lexer/formula_lexer.rb
qlang-0.0.27182124 lib/qlang/lexer/formula_lexer.rb
qlang-0.0.27182123 lib/qlang/lexer/formula_lexer.rb
qlang-0.0.27182122 lib/qlang/lexer/formula_lexer.rb
qlang-0.0.27182121 lib/qlang/lexer/formula_lexer.rb
qlang-0.0.27182120 lib/qlang/lexer/formula_lexer.rb
qlang-0.0.27182110 lib/qlang/lexer/formula_lexer.rb
qlang-0.0.27182100 lib/qlang/lexer/formula_lexer.rb