Sha256: 2b6667076331ee46593440323b02784fbc9c6a854324a1246b781bf153597683

Contents?: true

Size: 501 Bytes

Versions: 9

Compression:

Stored size: 501 Bytes

Contents

module Hilbert
  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

9 entries across 9 versions & 1 rubygems

Version Path
hilbert-0.0.2700420 lib/hilbert/lexer/formula_lexer.rb
hilbert-0.0.2700410 lib/hilbert/lexer/formula_lexer.rb
hilbert-0.0.2700400 lib/hilbert/lexer/formula_lexer.rb
hilbert-0.0.2700320 lib/hilbert/lexer/formula_lexer.rb
hilbert-0.0.2700300 lib/hilbert/lexer/formula_lexer.rb
hilbert-0.0.2700210 lib/hilbert/lexer/formula_lexer.rb
hilbert-0.0.2700110 lib/hilbert/lexer/formula_lexer.rb
hilbert-0.0.2700100 lib/hilbert/lexer/formula_lexer.rb
hilbert-0.0.2700001 lib/hilbert/lexer/formula_lexer.rb