lib/hilbert/lexer/base.rb in hilbert-0.0.2700400 vs lib/hilbert/lexer/base.rb in hilbert-0.0.2700410
- old
+ new
@@ -12,11 +12,11 @@
def rule(pattern, &token)
token ||= proc { :NULL }
@token_rule_hash ||= {}
@token_rule_hash[pattern] = token.call
end
-
+
def clear!
@token_rule_hash = {}
end
def execute(str)
@@ -30,10 +30,10 @@
until ss.eos?
scan_rslt, ss = scan(ss)
if scan_rslt
@lexeds << scan_rslt unless scan_rslt[:token] == :NULL
else
- fail "I'm so sorry, something wrong. Please feel free to report this."
+ fail "I'm so sorry, something wrong. Please feel free to report this. [DEBUGG CODE30]"
end
end
end
def scan(ss)