antelope 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3063af6acee6ef27ff96efdec1aeaf8c51cda510
4
- data.tar.gz: cc405e6635d9a2192f246687cf7ee55df8026753
3
+ metadata.gz: bded4fc112838ad4b250647b7b15fbecac25ab32
4
+ data.tar.gz: 25e8b92170861126767829c19a85b1407a31fcb8
5
5
  SHA512:
6
- metadata.gz: 9f52610cdd27dd8946772314fe5afe57af9e982983d51abb51a627e488d64bfcb1eed894a66a6f653b85829315d73bb840bc094aa687938ada70df989ce18eb8
7
- data.tar.gz: a0b91029a688a6312a592dae9f6ae8a2b95d7c8b0fc597df3bf6a5a3667dd575c7342a34a1c61c06541cba2fe84fc80b024ed07d463c2a2ac5f20377fda56a86
6
+ metadata.gz: bd091e4348fadd6caa15865e87ad60d849959c2d76baae2e3aa6bed62111a76169310ed0b3ea842e746f566d097ae87fc29580379f1ebe0a732afbaeea348ada
7
+ data.tar.gz: ba5288283b0e6c46ae9671c92f19d5776bacfe6c232ca565d93f17d8056a96859c2e231e8a095a14eb583e87c25fbf295ebfe56394ae5bd7370d3270e8068639
@@ -1,8 +1,11 @@
1
1
  Productions:
2
- % grammar.productions.each do |k, v|
3
- % v.each do |prod|
4
- <%= k %> → <%= prod[:items].join(" ") %> <%= prod[:block] %>
5
- % end
2
+ % len = grammar.all_productions.size.to_s.size
3
+ % productions = grammar.all_productions.
4
+ % map { |x| ["#{x.label}: #{x.items.join(' ')}", x.block] }
5
+ % body = productions.map { |_| _.first.size }.max
6
+ <%= body %>
7
+ % productions.each_with_index do |prod, i|
8
+ <%= "%#{len}s" % i %> <%= "%-#{body}s" % prod[0] %> <%= prod[1] %>
6
9
  % end
7
10
 
8
11
  Precedence:
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Antelope
4
4
  # The current running version of antelope.
5
- VERSION = "0.1.6".freeze
5
+ VERSION = "0.1.7".freeze
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: antelope
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Rodi