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 +4 -4
- data/lib/antelope/generator/templates/output.erb +7 -4
- data/lib/antelope/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: bded4fc112838ad4b250647b7b15fbecac25ab32
|
4
|
+
data.tar.gz: 25e8b92170861126767829c19a85b1407a31fcb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd091e4348fadd6caa15865e87ad60d849959c2d76baae2e3aa6bed62111a76169310ed0b3ea842e746f566d097ae87fc29580379f1ebe0a732afbaeea348ada
|
7
|
+
data.tar.gz: ba5288283b0e6c46ae9671c92f19d5776bacfe6c232ca565d93f17d8056a96859c2e231e8a095a14eb583e87c25fbf295ebfe56394ae5bd7370d3270e8068639
|
@@ -1,8 +1,11 @@
|
|
1
1
|
Productions:
|
2
|
-
% grammar.
|
3
|
-
%
|
4
|
-
|
5
|
-
%
|
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:
|
data/lib/antelope/version.rb
CHANGED