antelope 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +25 -25
  3. data/.rspec +3 -3
  4. data/.travis.yml +10 -10
  5. data/.yardopts +7 -7
  6. data/CONTRIBUTING.md +50 -38
  7. data/GENERATORS.md +180 -124
  8. data/Gemfile +7 -7
  9. data/LICENSE.txt +22 -22
  10. data/README.md +240 -104
  11. data/Rakefile +2 -2
  12. data/TODO.md +58 -58
  13. data/antelope.gemspec +29 -28
  14. data/bin/antelope +7 -7
  15. data/examples/deterministic.ace +35 -35
  16. data/examples/example.ace +52 -51
  17. data/examples/example.ace.err +192 -192
  18. data/examples/example.ace.inf +432 -432
  19. data/examples/example.ate +70 -70
  20. data/examples/example.ate.err +192 -192
  21. data/examples/example.ate.inf +432 -432
  22. data/examples/liquidscript.ace +233 -233
  23. data/examples/simple.ace +22 -22
  24. data/lib/antelope/ace/compiler.rb +334 -334
  25. data/lib/antelope/ace/errors.rb +30 -30
  26. data/lib/antelope/ace/scanner/argument.rb +57 -57
  27. data/lib/antelope/ace/scanner/first.rb +89 -89
  28. data/lib/antelope/ace/scanner/second.rb +178 -178
  29. data/lib/antelope/ace/scanner/third.rb +27 -27
  30. data/lib/antelope/ace/scanner.rb +144 -144
  31. data/lib/antelope/ace.rb +47 -47
  32. data/lib/antelope/cli.rb +60 -60
  33. data/lib/antelope/errors.rb +25 -25
  34. data/lib/antelope/generation/constructor/first.rb +86 -86
  35. data/lib/antelope/generation/constructor/follow.rb +105 -105
  36. data/lib/antelope/generation/constructor/nullable.rb +64 -64
  37. data/lib/antelope/generation/constructor.rb +127 -127
  38. data/lib/antelope/generation/errors.rb +17 -17
  39. data/lib/antelope/generation/null.rb +13 -13
  40. data/lib/antelope/generation/recognizer/rule.rb +216 -216
  41. data/lib/antelope/generation/recognizer/state.rb +129 -129
  42. data/lib/antelope/generation/recognizer.rb +177 -177
  43. data/lib/antelope/generation/tableizer.rb +176 -176
  44. data/lib/antelope/generation.rb +15 -15
  45. data/lib/antelope/generator/base/coerce.rb +115 -0
  46. data/lib/antelope/generator/base/extra.rb +50 -0
  47. data/lib/antelope/generator/base.rb +134 -264
  48. data/lib/antelope/generator/c.rb +11 -11
  49. data/lib/antelope/generator/c_header.rb +105 -105
  50. data/lib/antelope/generator/c_source.rb +39 -39
  51. data/lib/antelope/generator/error.rb +34 -34
  52. data/lib/antelope/generator/group.rb +60 -57
  53. data/lib/antelope/generator/html.rb +51 -51
  54. data/lib/antelope/generator/info.rb +47 -47
  55. data/lib/antelope/generator/null.rb +18 -18
  56. data/lib/antelope/generator/output.rb +17 -17
  57. data/lib/antelope/generator/ruby.rb +112 -79
  58. data/lib/antelope/generator/templates/c_header.ant +36 -36
  59. data/lib/antelope/generator/templates/c_source.ant +202 -202
  60. data/lib/antelope/generator/templates/error.erb +40 -0
  61. data/lib/antelope/generator/templates/html/antelope.css +53 -1
  62. data/lib/antelope/generator/templates/html/antelope.html +82 -1
  63. data/lib/antelope/generator/templates/html/antelope.js +9 -1
  64. data/lib/antelope/generator/templates/html/css.ant +53 -53
  65. data/lib/antelope/generator/templates/html/html.ant +82 -82
  66. data/lib/antelope/generator/templates/html/js.ant +9 -9
  67. data/lib/antelope/generator/templates/info.erb +61 -0
  68. data/lib/antelope/generator/templates/{ruby.ant → ruby.erb} +171 -178
  69. data/lib/antelope/generator.rb +62 -66
  70. data/lib/antelope/grammar/generation.rb +76 -76
  71. data/lib/antelope/grammar/loading.rb +84 -84
  72. data/lib/antelope/grammar/precedence.rb +59 -59
  73. data/lib/antelope/grammar/precedences.rb +64 -64
  74. data/lib/antelope/grammar/production.rb +56 -56
  75. data/lib/antelope/grammar/productions.rb +154 -154
  76. data/lib/antelope/grammar/symbols.rb +64 -64
  77. data/lib/antelope/grammar/token/epsilon.rb +23 -23
  78. data/lib/antelope/grammar/token/error.rb +24 -24
  79. data/lib/antelope/grammar/token/nonterminal.rb +15 -15
  80. data/lib/antelope/grammar/token/terminal.rb +15 -15
  81. data/lib/antelope/grammar/token.rb +231 -231
  82. data/lib/antelope/grammar.rb +68 -68
  83. data/lib/antelope/version.rb +6 -6
  84. data/lib/antelope.rb +18 -19
  85. data/optimizations.txt +42 -42
  86. data/spec/antelope/ace/compiler_spec.rb +60 -60
  87. data/spec/antelope/ace/scanner_spec.rb +27 -27
  88. data/spec/antelope/generation/constructor_spec.rb +131 -131
  89. data/spec/fixtures/simple.ace +22 -22
  90. data/spec/spec_helper.rb +39 -39
  91. data/spec/support/benchmark_helper.rb +5 -5
  92. data/spec/support/grammar_helper.rb +14 -14
  93. data/subl/Ace (Ruby).JSON-tmLanguage +94 -94
  94. data/subl/Ace (Ruby).tmLanguage +153 -153
  95. metadata +22 -11
  96. data/lib/antelope/generator/templates/error.ant +0 -34
  97. data/lib/antelope/generator/templates/info.ant +0 -53
  98. data/lib/antelope/template/compiler.rb +0 -78
  99. data/lib/antelope/template/errors.rb +0 -9
  100. data/lib/antelope/template/scanner.rb +0 -109
  101. data/lib/antelope/template.rb +0 -64
  102. data/spec/antelope/template_spec.rb +0 -50
@@ -1,14 +1,14 @@
1
- module GrammarHelper
2
- def grammar_for(grammar_file = "simple")
3
- source_path = Pathname.new("../../fixtures").expand_path(__FILE__)
4
- Grammar.from_file(source_path.children.select(&:file?)
5
- .find { |x| x.to_s =~ /#{Regexp.escape(grammar_file)}\..*\z/ }.to_s)
6
- end
7
-
8
- def with_recognizer(grammar = simple_grammar)
9
- Generation::Recognizer.new(grammar).call
10
- grammar
11
- end
12
-
13
- alias_method :simple_grammar, :grammar_for
14
- end
1
+ module GrammarHelper
2
+ def grammar_for(grammar_file = "simple")
3
+ source_path = Pathname.new("../../fixtures").expand_path(__FILE__)
4
+ Grammar.from_file(source_path.children.select(&:file?)
5
+ .find { |x| x.to_s =~ /#{Regexp.escape(grammar_file)}\..*\z/ }.to_s)
6
+ end
7
+
8
+ def with_recognizer(grammar = simple_grammar)
9
+ Generation::Recognizer.new(grammar).call
10
+ grammar
11
+ end
12
+
13
+ alias_method :simple_grammar, :grammar_for
14
+ end
@@ -1,94 +1,94 @@
1
- // [PackageDev] target_format: plist, ext: tmLanguage
2
-
3
- {
4
- "name": "Ace (Ruby Host)",
5
- "scopeName": "source.ace.ruby",
6
- "fileTypes": [
7
- "ace"
8
- ],
9
- "uuid": "2d7fd617-f324-4476-9380-f5108efdf88d",
10
-
11
- "patterns": [
12
- { "include": "#firstSection" }
13
- ],
14
-
15
- "repository": {
16
- "firstSection": {
17
- "patterns": [
18
- {
19
- "begin": "%%",
20
- "end": "a^",
21
- "name": "meta.section.third.ace.ruby",
22
- "patterns": [
23
- { "include": "#secondSection" }
24
- ]
25
- },
26
- {
27
- "begin": "(%[A-Za-z0-9_.-]+)",
28
- "end": "\\n",
29
- "name": "meta.function.ace.ruby",
30
- "beginCaptures": {
31
- "1": { "name": "keyword.other.ace.ruby" }
32
- },
33
- "patterns": [
34
- {
35
- "match": "(<)((?:\\\\>|[^>])*)(>)",
36
- "name": "string.quoted.other.ace.ruby"
37
- },
38
- {
39
- "match": "(\\{)((?:\\\\}|[^}])*)(\\})",
40
- "name": "string.quoted.other.ace.ruby"
41
- },
42
- {
43
- "match": "(\\')((?:\\\\'|[^'])*)(\\')",
44
- "name": "string.quoted.single.ace.ruby"
45
- },
46
- {
47
- "match": "(\\\")((?:\\\\\"|[^\"])*)(\\\")",
48
- "name": "string.quoted.double.ace.ruby"
49
- },
50
- {
51
- "match": "(?<=\\s)([A-Za-z0-9_.-]+)(?=\\s)",
52
- "name": "variable.parameter.ace.ruby"
53
- }
54
- ]
55
- }
56
- ]
57
-
58
- },
59
- "secondSection": {
60
- "patterns": [
61
- {
62
- "begin": "%%",
63
- "end": "a^",
64
- "name": "meta.section.last.ace.ruby",
65
- "patterns": [
66
- { "include": "source.ruby" }
67
- ]
68
- },
69
- {
70
- "match": "[A-Za-z0-9._-]+:",
71
- "name": "constant.other.symbol.ace.ruby"
72
- },
73
- {
74
- "match": "(?<=\\s)[A-Z]+(?=\\s)",
75
- "name": "variable.other.constant.ace.ruby"
76
- },
77
- {
78
- "match": "\\|",
79
- "name": "keyword.operator.ace.ruby"
80
- },
81
- {
82
- "begin": "\\{",
83
- "end": "\\}",
84
- "patterns": [
85
- { "include": "source.ruby" }
86
- ]
87
- }
88
- ]
89
- },
90
- "thirdSection": {
91
- "patterns": []
92
- }
93
- }
94
- }
1
+ // [PackageDev] target_format: plist, ext: tmLanguage
2
+
3
+ {
4
+ "name": "Ace (Ruby Host)",
5
+ "scopeName": "source.ace.ruby",
6
+ "fileTypes": [
7
+ "ace"
8
+ ],
9
+ "uuid": "2d7fd617-f324-4476-9380-f5108efdf88d",
10
+
11
+ "patterns": [
12
+ { "include": "#firstSection" }
13
+ ],
14
+
15
+ "repository": {
16
+ "firstSection": {
17
+ "patterns": [
18
+ {
19
+ "begin": "%%",
20
+ "end": "a^",
21
+ "name": "meta.section.third.ace.ruby",
22
+ "patterns": [
23
+ { "include": "#secondSection" }
24
+ ]
25
+ },
26
+ {
27
+ "begin": "(%[A-Za-z0-9_.-]+)",
28
+ "end": "\\n",
29
+ "name": "meta.function.ace.ruby",
30
+ "beginCaptures": {
31
+ "1": { "name": "keyword.other.ace.ruby" }
32
+ },
33
+ "patterns": [
34
+ {
35
+ "match": "(<)((?:\\\\>|[^>])*)(>)",
36
+ "name": "string.quoted.other.ace.ruby"
37
+ },
38
+ {
39
+ "match": "(\\{)((?:\\\\}|[^}])*)(\\})",
40
+ "name": "string.quoted.other.ace.ruby"
41
+ },
42
+ {
43
+ "match": "(\\')((?:\\\\'|[^'])*)(\\')",
44
+ "name": "string.quoted.single.ace.ruby"
45
+ },
46
+ {
47
+ "match": "(\\\")((?:\\\\\"|[^\"])*)(\\\")",
48
+ "name": "string.quoted.double.ace.ruby"
49
+ },
50
+ {
51
+ "match": "(?<=\\s)([A-Za-z0-9_.-]+)(?=\\s)",
52
+ "name": "variable.parameter.ace.ruby"
53
+ }
54
+ ]
55
+ }
56
+ ]
57
+
58
+ },
59
+ "secondSection": {
60
+ "patterns": [
61
+ {
62
+ "begin": "%%",
63
+ "end": "a^",
64
+ "name": "meta.section.last.ace.ruby",
65
+ "patterns": [
66
+ { "include": "source.ruby" }
67
+ ]
68
+ },
69
+ {
70
+ "match": "[A-Za-z0-9._-]+:",
71
+ "name": "constant.other.symbol.ace.ruby"
72
+ },
73
+ {
74
+ "match": "(?<=\\s)[A-Z]+(?=\\s)",
75
+ "name": "variable.other.constant.ace.ruby"
76
+ },
77
+ {
78
+ "match": "\\|",
79
+ "name": "keyword.operator.ace.ruby"
80
+ },
81
+ {
82
+ "begin": "\\{",
83
+ "end": "\\}",
84
+ "patterns": [
85
+ { "include": "source.ruby" }
86
+ ]
87
+ }
88
+ ]
89
+ },
90
+ "thirdSection": {
91
+ "patterns": []
92
+ }
93
+ }
94
+ }
@@ -1,153 +1,153 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>fileTypes</key>
6
- <array>
7
- <string>ace</string>
8
- </array>
9
- <key>name</key>
10
- <string>Ace (Ruby Host)</string>
11
- <key>patterns</key>
12
- <array>
13
- <dict>
14
- <key>include</key>
15
- <string>#firstSection</string>
16
- </dict>
17
- </array>
18
- <key>repository</key>
19
- <dict>
20
- <key>firstSection</key>
21
- <dict>
22
- <key>patterns</key>
23
- <array>
24
- <dict>
25
- <key>begin</key>
26
- <string>%%</string>
27
- <key>end</key>
28
- <string>a^</string>
29
- <key>name</key>
30
- <string>meta.section.third.ace.ruby</string>
31
- <key>patterns</key>
32
- <array>
33
- <dict>
34
- <key>include</key>
35
- <string>#secondSection</string>
36
- </dict>
37
- </array>
38
- </dict>
39
- <dict>
40
- <key>begin</key>
41
- <string>(%[A-Za-z0-9_.-]+)</string>
42
- <key>beginCaptures</key>
43
- <dict>
44
- <key>1</key>
45
- <dict>
46
- <key>name</key>
47
- <string>keyword.other.ace.ruby</string>
48
- </dict>
49
- </dict>
50
- <key>end</key>
51
- <string>\n</string>
52
- <key>name</key>
53
- <string>meta.function.ace.ruby</string>
54
- <key>patterns</key>
55
- <array>
56
- <dict>
57
- <key>match</key>
58
- <string>(&lt;)((?:\\&gt;|[^&gt;])*)(&gt;)</string>
59
- <key>name</key>
60
- <string>string.quoted.other.ace.ruby</string>
61
- </dict>
62
- <dict>
63
- <key>match</key>
64
- <string>(\{)((?:\\}|[^}])*)(\})</string>
65
- <key>name</key>
66
- <string>string.quoted.other.ace.ruby</string>
67
- </dict>
68
- <dict>
69
- <key>match</key>
70
- <string>(\')((?:\\'|[^'])*)(\')</string>
71
- <key>name</key>
72
- <string>string.quoted.single.ace.ruby</string>
73
- </dict>
74
- <dict>
75
- <key>match</key>
76
- <string>(\")((?:\\"|[^"])*)(\")</string>
77
- <key>name</key>
78
- <string>string.quoted.double.ace.ruby</string>
79
- </dict>
80
- <dict>
81
- <key>match</key>
82
- <string>(?&lt;=\s)([A-Za-z0-9_.-]+)(?=\s)</string>
83
- <key>name</key>
84
- <string>variable.parameter.ace.ruby</string>
85
- </dict>
86
- </array>
87
- </dict>
88
- </array>
89
- </dict>
90
- <key>secondSection</key>
91
- <dict>
92
- <key>patterns</key>
93
- <array>
94
- <dict>
95
- <key>begin</key>
96
- <string>%%</string>
97
- <key>end</key>
98
- <string>a^</string>
99
- <key>name</key>
100
- <string>meta.section.last.ace.ruby</string>
101
- <key>patterns</key>
102
- <array>
103
- <dict>
104
- <key>include</key>
105
- <string>source.ruby</string>
106
- </dict>
107
- </array>
108
- </dict>
109
- <dict>
110
- <key>match</key>
111
- <string>[A-Za-z0-9._-]+:</string>
112
- <key>name</key>
113
- <string>constant.other.symbol.ace.ruby</string>
114
- </dict>
115
- <dict>
116
- <key>match</key>
117
- <string>(?&lt;=\s)[A-Z]+(?=\s)</string>
118
- <key>name</key>
119
- <string>variable.other.constant.ace.ruby</string>
120
- </dict>
121
- <dict>
122
- <key>match</key>
123
- <string>\|</string>
124
- <key>name</key>
125
- <string>keyword.operator.ace.ruby</string>
126
- </dict>
127
- <dict>
128
- <key>begin</key>
129
- <string>\{</string>
130
- <key>end</key>
131
- <string>\}</string>
132
- <key>patterns</key>
133
- <array>
134
- <dict>
135
- <key>include</key>
136
- <string>source.ruby</string>
137
- </dict>
138
- </array>
139
- </dict>
140
- </array>
141
- </dict>
142
- <key>thirdSection</key>
143
- <dict>
144
- <key>patterns</key>
145
- <array/>
146
- </dict>
147
- </dict>
148
- <key>scopeName</key>
149
- <string>source.ace.ruby</string>
150
- <key>uuid</key>
151
- <string>2d7fd617-f324-4476-9380-f5108efdf88d</string>
152
- </dict>
153
- </plist>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>fileTypes</key>
6
+ <array>
7
+ <string>ace</string>
8
+ </array>
9
+ <key>name</key>
10
+ <string>Ace (Ruby Host)</string>
11
+ <key>patterns</key>
12
+ <array>
13
+ <dict>
14
+ <key>include</key>
15
+ <string>#firstSection</string>
16
+ </dict>
17
+ </array>
18
+ <key>repository</key>
19
+ <dict>
20
+ <key>firstSection</key>
21
+ <dict>
22
+ <key>patterns</key>
23
+ <array>
24
+ <dict>
25
+ <key>begin</key>
26
+ <string>%%</string>
27
+ <key>end</key>
28
+ <string>a^</string>
29
+ <key>name</key>
30
+ <string>meta.section.third.ace.ruby</string>
31
+ <key>patterns</key>
32
+ <array>
33
+ <dict>
34
+ <key>include</key>
35
+ <string>#secondSection</string>
36
+ </dict>
37
+ </array>
38
+ </dict>
39
+ <dict>
40
+ <key>begin</key>
41
+ <string>(%[A-Za-z0-9_.-]+)</string>
42
+ <key>beginCaptures</key>
43
+ <dict>
44
+ <key>1</key>
45
+ <dict>
46
+ <key>name</key>
47
+ <string>keyword.other.ace.ruby</string>
48
+ </dict>
49
+ </dict>
50
+ <key>end</key>
51
+ <string>\n</string>
52
+ <key>name</key>
53
+ <string>meta.function.ace.ruby</string>
54
+ <key>patterns</key>
55
+ <array>
56
+ <dict>
57
+ <key>match</key>
58
+ <string>(&lt;)((?:\\&gt;|[^&gt;])*)(&gt;)</string>
59
+ <key>name</key>
60
+ <string>string.quoted.other.ace.ruby</string>
61
+ </dict>
62
+ <dict>
63
+ <key>match</key>
64
+ <string>(\{)((?:\\}|[^}])*)(\})</string>
65
+ <key>name</key>
66
+ <string>string.quoted.other.ace.ruby</string>
67
+ </dict>
68
+ <dict>
69
+ <key>match</key>
70
+ <string>(\')((?:\\'|[^'])*)(\')</string>
71
+ <key>name</key>
72
+ <string>string.quoted.single.ace.ruby</string>
73
+ </dict>
74
+ <dict>
75
+ <key>match</key>
76
+ <string>(\")((?:\\"|[^"])*)(\")</string>
77
+ <key>name</key>
78
+ <string>string.quoted.double.ace.ruby</string>
79
+ </dict>
80
+ <dict>
81
+ <key>match</key>
82
+ <string>(?&lt;=\s)([A-Za-z0-9_.-]+)(?=\s)</string>
83
+ <key>name</key>
84
+ <string>variable.parameter.ace.ruby</string>
85
+ </dict>
86
+ </array>
87
+ </dict>
88
+ </array>
89
+ </dict>
90
+ <key>secondSection</key>
91
+ <dict>
92
+ <key>patterns</key>
93
+ <array>
94
+ <dict>
95
+ <key>begin</key>
96
+ <string>%%</string>
97
+ <key>end</key>
98
+ <string>a^</string>
99
+ <key>name</key>
100
+ <string>meta.section.last.ace.ruby</string>
101
+ <key>patterns</key>
102
+ <array>
103
+ <dict>
104
+ <key>include</key>
105
+ <string>source.ruby</string>
106
+ </dict>
107
+ </array>
108
+ </dict>
109
+ <dict>
110
+ <key>match</key>
111
+ <string>[A-Za-z0-9._-]+:</string>
112
+ <key>name</key>
113
+ <string>constant.other.symbol.ace.ruby</string>
114
+ </dict>
115
+ <dict>
116
+ <key>match</key>
117
+ <string>(?&lt;=\s)[A-Z]+(?=\s)</string>
118
+ <key>name</key>
119
+ <string>variable.other.constant.ace.ruby</string>
120
+ </dict>
121
+ <dict>
122
+ <key>match</key>
123
+ <string>\|</string>
124
+ <key>name</key>
125
+ <string>keyword.operator.ace.ruby</string>
126
+ </dict>
127
+ <dict>
128
+ <key>begin</key>
129
+ <string>\{</string>
130
+ <key>end</key>
131
+ <string>\}</string>
132
+ <key>patterns</key>
133
+ <array>
134
+ <dict>
135
+ <key>include</key>
136
+ <string>source.ruby</string>
137
+ </dict>
138
+ </array>
139
+ </dict>
140
+ </array>
141
+ </dict>
142
+ <key>thirdSection</key>
143
+ <dict>
144
+ <key>patterns</key>
145
+ <array/>
146
+ </dict>
147
+ </dict>
148
+ <key>scopeName</key>
149
+ <string>source.ace.ruby</string>
150
+ <key>uuid</key>
151
+ <string>2d7fd617-f324-4476-9380-f5108efdf88d</string>
152
+ </dict>
153
+ </plist>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: antelope
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Rodi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-26 00:00:00.000000000 Z
11
+ date: 2015-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.19'
41
+ - !ruby/object:Gem::Dependency
42
+ name: mote
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.1'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.1'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -158,6 +172,8 @@ files:
158
172
  - lib/antelope/generation/tableizer.rb
159
173
  - lib/antelope/generator.rb
160
174
  - lib/antelope/generator/base.rb
175
+ - lib/antelope/generator/base/coerce.rb
176
+ - lib/antelope/generator/base/extra.rb
161
177
  - lib/antelope/generator/c.rb
162
178
  - lib/antelope/generator/c_header.rb
163
179
  - lib/antelope/generator/c_source.rb
@@ -170,15 +186,15 @@ files:
170
186
  - lib/antelope/generator/ruby.rb
171
187
  - lib/antelope/generator/templates/c_header.ant
172
188
  - lib/antelope/generator/templates/c_source.ant
173
- - lib/antelope/generator/templates/error.ant
189
+ - lib/antelope/generator/templates/error.erb
174
190
  - lib/antelope/generator/templates/html/antelope.css
175
191
  - lib/antelope/generator/templates/html/antelope.html
176
192
  - lib/antelope/generator/templates/html/antelope.js
177
193
  - lib/antelope/generator/templates/html/css.ant
178
194
  - lib/antelope/generator/templates/html/html.ant
179
195
  - lib/antelope/generator/templates/html/js.ant
180
- - lib/antelope/generator/templates/info.ant
181
- - lib/antelope/generator/templates/ruby.ant
196
+ - lib/antelope/generator/templates/info.erb
197
+ - lib/antelope/generator/templates/ruby.erb
182
198
  - lib/antelope/grammar.rb
183
199
  - lib/antelope/grammar/generation.rb
184
200
  - lib/antelope/grammar/loading.rb
@@ -192,16 +208,11 @@ files:
192
208
  - lib/antelope/grammar/token/error.rb
193
209
  - lib/antelope/grammar/token/nonterminal.rb
194
210
  - lib/antelope/grammar/token/terminal.rb
195
- - lib/antelope/template.rb
196
- - lib/antelope/template/compiler.rb
197
- - lib/antelope/template/errors.rb
198
- - lib/antelope/template/scanner.rb
199
211
  - lib/antelope/version.rb
200
212
  - optimizations.txt
201
213
  - spec/antelope/ace/compiler_spec.rb
202
214
  - spec/antelope/ace/scanner_spec.rb
203
215
  - spec/antelope/generation/constructor_spec.rb
204
- - spec/antelope/template_spec.rb
205
216
  - spec/fixtures/simple.ace
206
217
  - spec/spec_helper.rb
207
218
  - spec/support/benchmark_helper.rb
@@ -236,8 +247,8 @@ test_files:
236
247
  - spec/antelope/ace/compiler_spec.rb
237
248
  - spec/antelope/ace/scanner_spec.rb
238
249
  - spec/antelope/generation/constructor_spec.rb
239
- - spec/antelope/template_spec.rb
240
250
  - spec/fixtures/simple.ace
241
251
  - spec/spec_helper.rb
242
252
  - spec/support/benchmark_helper.rb
243
253
  - spec/support/grammar_helper.rb
254
+ has_rdoc:
@@ -1,34 +0,0 @@
1
- Productions:
2
- %len = grammar.all_productions.size.to_s.size
3
- %productions = recognizer.states.map(&:rules).inject(:merge).
4
- % select(&:final?).map { |x| [x.to_s(false), x.production.block] }
5
- %body = productions.map { |_| _[0].size }.max
6
- %productions.each do |prod|
7
- {{= sprintf("%-#{body}s", prod[0]) }} %{prod[1]}
8
- %end
9
-
10
- % if table.each_with_index.any? { |_, i| tableizer.conflicts[i].each.
11
- % select { |(_, v)| v[:result] == 0 || directives.output.verbose }.any? }
12
- Error:
13
- % table.each_with_index do |_, i|
14
- % conflicts = tableizer.conflicts[i].each.
15
- % select { |(_, v)| v[:result] == 0 || directives.output.verbose }
16
- % next unless conflicts.any?
17
- Conflicts in State %{i}:
18
- % conflicts.each do |token, value|
19
- On %{token}{{= ' (resolved)' if value[:result] != 0 }}:
20
- %{value[:data][0].join(' ')}/%{value[:data][1].join(' ')} (%{value[:prec]} vs %{value[:terminal]}, %{value[:result]})
21
- Rules:
22
- % value[:rules].each do |rule|
23
- %{rule}
24
- {%{rule.lookahead.to_a.join(', ')}}
25
- % end
26
- Transitions:
27
- % value[:transitions].each do |transition|
28
- %{transition}
29
- % end
30
- % end
31
- % end
32
- %else
33
- No errors :)
34
- %end