ebnf 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/VERSION +1 -1
  3. data/lib/ebnf/ll1/parser.rb +7 -8
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDI4YWE4ZjExOGI5N2NkZDVmYzA4ZDMwMzM0ZGRhZThhNWU0ZGI2MQ==
4
+ YmExODQ4Njc3ZmYwMTI5YTk2MDg5N2M3M2UyZGViOTkzYzM5OTM3Yg==
5
5
  data.tar.gz: !binary |-
6
- MWZmMjVkYjMwYzY1NmNlMDc0ZDM5MzUxOWU1ZTUwNGU2NDQ2YzFiYQ==
6
+ ODljMTFmZDY1NWM5Njg5N2ZiMTBkNmEzODJjOGJhY2RkNTM5ZjQ3MA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- M2E2MTcyM2MyZWYyNTg5Y2E3ZDVkNWI2ODgwYjdhZjhlYmQ1YTUzZGE5Nzc3
10
- M2M3MDFiYzllMzE5YjNmMDA2Zjc3NjQ5YzViMzhmMTNmZTBkYWZhMDk0M2Rl
11
- MjlkNWMxNzY3ODM4ZDYxZjBiZWI2NzA4ZGRjYzQ2MGY2MTBiZDI=
9
+ ZDJjNjlmYjZhZWQ5OGIwZTgwMjNlYzc0NWZlMzA3NDExYTI3N2M3YTJiNjFj
10
+ MDAyOGQxMjUzYjkwNGM0NmQxZjdjMDVkNDU2MWE5MjE3OWEwZmRhN2ViYjQy
11
+ ZTE4NDM1MGUxOTNhZGU0OTJjNzEzOTlkMzEzYjQ2OWJmODBjMTM=
12
12
  data.tar.gz: !binary |-
13
- OGIxZGZjNzNhZTlkZDAwZTM0ZmExYzMzMzUxMjQ4ZmNmYjBmNTM4OGJlMmM2
14
- NmFmODM4MjMwODYyY2E1YjhjNjNlY2E1YjI0MTg1NjFlYWI0MzI4ZThhMjA2
15
- MmMyMjBiZjA5NGQ2MjlhYzA0Yzg1YzYzNzhjNjNkZmQ2ZTg5N2I=
13
+ OTk3MzAzMzY4MGU0NjBhYjM4YWNkNDJhNDEwYTM2YzM5NDZiZGM0ZjZjZDA0
14
+ YTM4YTMyYzUyYmE0MjFkYTJmZjE2MDYyZjI2ZTAyMzI4NTMwNTI5ZThiOTcx
15
+ ZGQzMTdkMjdlM2Y0NTFjNTI1YTM0YjMxNjlhZWYwZTQ3ODMxNTE=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -499,12 +499,11 @@ module EBNF::LL1
499
499
  # @option options [Integer] :depth
500
500
  # Recursion depth for indenting output
501
501
  # @see {#debug}
502
- def progress(node, *args)
502
+ def progress(node, *args, &block)
503
503
  return unless @options[:progress] || @options[:debug]
504
- options = args.last.is_a?(Hash) ? args.pop : {}
505
- message = args.join(",")
506
- message += yield.to_s if block_given?
507
- debug(node, message, options.merge(:level => 2))
504
+ args << {} unless args.last.is_a?(Hash)
505
+ args.last[:level] ||= 2
506
+ debug(node, *args, &block)
508
507
  end
509
508
 
510
509
  ##
@@ -558,7 +557,7 @@ module EBNF::LL1
558
557
  self.class.eval_with_binding(self) {
559
558
  handler.call(@prod_data.last, data, @parse_callback)
560
559
  }
561
- rescue Exception => e
560
+ rescue ArgumentError, Error => e
562
561
  error("start", "#{e.class}: #{e.message}", :production => prod)
563
562
  @recovering = false
564
563
  end
@@ -584,7 +583,7 @@ module EBNF::LL1
584
583
  self.class.eval_with_binding(self) {
585
584
  handler.call(@prod_data.last, data, @parse_callback)
586
585
  }
587
- rescue Exception => e
586
+ rescue ArgumentError, Error => e
588
587
  error("finish", "#{e.class}: #{e.message}", :production => prod)
589
588
  @recovering = false
590
589
  end
@@ -607,7 +606,7 @@ module EBNF::LL1
607
606
  self.class.eval_with_binding(self) {
608
607
  handler.call(parentProd, token, @prod_data.last, @parse_callback)
609
608
  }
610
- rescue Exception => e
609
+ rescue ArgumentError, Error => e
611
610
  error("terminal", "#{e.class}: #{e.message}", :production => prod)
612
611
  @recovering = false
613
612
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebnf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Kellogg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-29 00:00:00.000000000 Z
11
+ date: 2013-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sxp