nexus_parser 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/parser.rb +5 -5
- data/nexus_parser.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.3
|
data/lib/parser.rb
CHANGED
@@ -87,7 +87,7 @@ class NexusParser::Parser
|
|
87
87
|
inf = 0
|
88
88
|
while true
|
89
89
|
inf += 1
|
90
|
-
raise
|
90
|
+
raise(NexusParser::ParseError,"Either you have a gazillion taxa or more likely the parser is caught in an infinite loop trying to parser taxon labels. Check for double single quotes in this block.") if inf > 100000
|
91
91
|
|
92
92
|
if @lexer.peek(NexusParser::Tokens::EndBlk)
|
93
93
|
@lexer.pop(NexusParser::Tokens::EndBlk)
|
@@ -121,7 +121,7 @@ class NexusParser::Parser
|
|
121
121
|
inf = 0
|
122
122
|
while true
|
123
123
|
inf += 1
|
124
|
-
raise
|
124
|
+
raise(NexusParser::ParseError,"Either you have a gazillion characters or more likely the parser is caught in an infinite loop trying to parser character data. Check for double single quotes in this block.") if inf > 100000
|
125
125
|
|
126
126
|
if @lexer.peek(NexusParser::Tokens::EndBlk) # we're at the end of the block, exit after geting rid of the semi-colon
|
127
127
|
break
|
@@ -184,7 +184,7 @@ class NexusParser::Parser
|
|
184
184
|
inf = 0
|
185
185
|
while true
|
186
186
|
inf += 1
|
187
|
-
raise
|
187
|
+
raise(NexusParser::ParseError,"Either you have a gazillion character state labels or more likely the parser is caught in an infinite loop while trying to parser character state labels. Check for double single quotes in this block.") if inf > 100000
|
188
188
|
|
189
189
|
if @lexer.peek(NexusParser::Tokens::SemiColon)
|
190
190
|
break
|
@@ -213,7 +213,7 @@ class NexusParser::Parser
|
|
213
213
|
|
214
214
|
opts.update({:index => (index - 1), :name => name})
|
215
215
|
|
216
|
-
raise(
|
216
|
+
raise(NexusParser::ParseError, "Error parsing character state labels for (or around) character #{index -1}.") if !opts[:name]
|
217
217
|
@builder.update_chr(opts)
|
218
218
|
end
|
219
219
|
|
@@ -248,7 +248,7 @@ class NexusParser::Parser
|
|
248
248
|
inf = 0 # a crude iteration checker
|
249
249
|
while true
|
250
250
|
inf += 1
|
251
|
-
raise
|
251
|
+
raise(NexusParser::ParseError,"Either you have a gazillion notes or more likely parser is caught in an infinite loop inside the Begin Notes block. Check for double single quotes in this block.") if inf > 100000
|
252
252
|
if @lexer.peek(NexusParser::Tokens::EndBlk)
|
253
253
|
@lexer.pop(NexusParser::Tokens::EndBlk)
|
254
254
|
@builder.add_note(@vars) # one still left to add
|
data/nexus_parser.gemspec
CHANGED