hilbert 0.0.2700410 → 0.0.2700420
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hilbert/lexer/base.rb +9 -1
- data/lib/hilbert/parser.rb +9 -1
- data/lib/hilbert/parser/formula_parser.rb +10 -1
- data/lib/hilbert/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d96b16153210399f05fca073cde6c442bc4e1aa
|
4
|
+
data.tar.gz: c23afa433394fe0bc95d6865f3cfd9461bb0ad5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5446d604edaab2aa3f2cded8ef82194c71d1fd0e0c5bc978de4d4eb4f2fd42366ebf319c9bb8528260b99e4cd5ec51aa926b9effaf106b7189860b005e6a58f
|
7
|
+
data.tar.gz: 60e752db4cfd3bc19c9f86b7ac455ede2fdb0b20cf65eb629878f642b47472067bfeead9b4de655f59ac5605b5a76b84d87856b01fb96ece9e018b2a4556b732
|
data/lib/hilbert/lexer/base.rb
CHANGED
@@ -32,7 +32,15 @@ module Hilbert
|
|
32
32
|
if scan_rslt
|
33
33
|
@lexeds << scan_rslt unless scan_rslt[:token] == :NULL
|
34
34
|
else
|
35
|
-
fail
|
35
|
+
fail <<-ERROR
|
36
|
+
I'm so sorry, something wrong. Please feel free to report this. [DEBUG CODE30]
|
37
|
+
|
38
|
+
========== DEBUG INFO ==========
|
39
|
+
str: #{str}
|
40
|
+
scan_rslt: #{scan_rslt}
|
41
|
+
@lexeds: #{@lexeds}
|
42
|
+
|
43
|
+
ERROR
|
36
44
|
end
|
37
45
|
end
|
38
46
|
end
|
data/lib/hilbert/parser.rb
CHANGED
@@ -22,8 +22,16 @@ module Hilbert
|
|
22
22
|
def execute(lexed)
|
23
23
|
time = Time.now
|
24
24
|
until lexed.token_str =~ /\A:(NLIN|R)\d+\z/
|
25
|
-
fail "I'm so sorry, something wrong. Please feel free to report this." if Time.now > time + 10
|
26
25
|
|
26
|
+
if Time.now > time + 10
|
27
|
+
fail <<-ERROR
|
28
|
+
I'm so sorry, something wrong. Please feel free to report this. [DEBUG CODE:29]
|
29
|
+
|
30
|
+
========== DEBUG INFO ==========
|
31
|
+
lexed.token_str: #{lexed.token_str}
|
32
|
+
$defning_sym: #{$defning_sym}
|
33
|
+
ERROR
|
34
|
+
end
|
27
35
|
case lexed.token_str
|
28
36
|
when /:(POST_ZFC)(\d+)/
|
29
37
|
Hilbert::Lexer::MainLexer.zfc_analysis!
|
@@ -9,7 +9,16 @@ module Hilbert
|
|
9
9
|
lexed = Lexer::FormulaLexer.new(str)
|
10
10
|
time = Time.now
|
11
11
|
loop do
|
12
|
-
|
12
|
+
if Time.now > time + 10
|
13
|
+
fail <<-ERROR
|
14
|
+
I'm so sorry, something wrong. Please feel free to report this. [DEBUG CODE31]
|
15
|
+
|
16
|
+
========== DEBUG INFO ==========
|
17
|
+
str: #{str}
|
18
|
+
lexed.token_str: #{lexed.token_str}
|
19
|
+
|
20
|
+
ERROR
|
21
|
+
end
|
13
22
|
case lexed.token_str
|
14
23
|
when /:EXP(\d+)/
|
15
24
|
new_ope = $meta_info.lang == :ruby ? '**' : '^'
|
data/lib/hilbert/version.rb
CHANGED