myco 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/lib/myco/code_tools/AST/ArgumentAssembly.my.rb +4 -4
  3. data/lib/myco/code_tools/AST/ArrayAssembly.my.rb +4 -4
  4. data/lib/myco/code_tools/AST/Block.my +104 -0
  5. data/lib/myco/code_tools/AST/Block.my.rb +126 -0
  6. data/lib/myco/code_tools/AST/BlockArgument.my.rb +4 -4
  7. data/lib/myco/code_tools/AST/BlockLiteral.my +15 -94
  8. data/lib/myco/code_tools/AST/BlockLiteral.my.rb +18 -121
  9. data/lib/myco/code_tools/AST/BlockParameter.my.rb +4 -4
  10. data/lib/myco/code_tools/AST/BranchOperator.my.rb +4 -4
  11. data/lib/myco/code_tools/AST/ConstantAccess.my.rb +4 -4
  12. data/lib/myco/code_tools/AST/ConstantAssignment.my.rb +4 -4
  13. data/lib/myco/code_tools/AST/ConstantDefine.my.rb +4 -4
  14. data/lib/myco/code_tools/AST/ConstantReopen.my.rb +6 -6
  15. data/lib/myco/code_tools/AST/DeclareCategory.my.rb +6 -6
  16. data/lib/myco/code_tools/AST/DeclareDecorator.my.rb +4 -4
  17. data/lib/myco/code_tools/AST/DeclareFile.my.rb +6 -6
  18. data/lib/myco/code_tools/AST/DeclareMeme.my +3 -1
  19. data/lib/myco/code_tools/AST/DeclareMeme.my.rb +10 -6
  20. data/lib/myco/code_tools/AST/DeclareObject.my.rb +6 -6
  21. data/lib/myco/code_tools/AST/DeclareString.my.rb +4 -4
  22. data/lib/myco/code_tools/AST/DynamicString.my.rb +4 -4
  23. data/lib/myco/code_tools/AST/DynamicSymbol.my.rb +4 -4
  24. data/lib/myco/code_tools/AST/Invoke.my +3 -4
  25. data/lib/myco/code_tools/AST/Invoke.my.rb +5 -15
  26. data/lib/myco/code_tools/AST/InvokeMethod.my.rb +4 -4
  27. data/lib/myco/code_tools/AST/KeywordAssembly.my.rb +4 -4
  28. data/lib/myco/code_tools/AST/LocalVariableAccessAmbiguous.my.rb +4 -4
  29. data/lib/myco/code_tools/AST/LocalVariableAssignment.my.rb +4 -4
  30. data/lib/myco/code_tools/AST/MycoModuleScope.my +1 -1
  31. data/lib/myco/code_tools/AST/MycoModuleScope.my.rb +2 -2
  32. data/lib/myco/code_tools/AST/Node.my.rb +4 -4
  33. data/lib/myco/code_tools/AST/ParameterAssembly.my.rb +4 -4
  34. data/lib/myco/code_tools/AST/PipeOperator.my +25 -0
  35. data/lib/myco/code_tools/AST/PipeOperator.my.rb +28 -0
  36. data/lib/myco/code_tools/AST/Quest.my.rb +7 -7
  37. data/lib/myco/code_tools/AST/Script.my.rb +4 -4
  38. data/lib/myco/code_tools/AST/{Body.my → Sequence.my} +2 -2
  39. data/lib/myco/code_tools/AST/{Body.my.rb → Sequence.my.rb} +6 -6
  40. data/lib/myco/code_tools/AST/SplatValue.my.rb +4 -4
  41. data/lib/myco/code_tools/AST/StringLiteral.my.rb +4 -4
  42. data/lib/myco/code_tools/AST/SymbolLiteral.my.rb +4 -4
  43. data/lib/myco/code_tools/AST/ToRuby.my +9 -3
  44. data/lib/myco/code_tools/AST/ToRuby.my.rb +7 -5
  45. data/lib/myco/code_tools/AST/misc.my.rb +17 -17
  46. data/lib/myco/code_tools/AST.my +5 -3
  47. data/lib/myco/code_tools/AST.my.rb +7 -6
  48. data/lib/myco/code_tools/Parser.my.rb +4 -4
  49. data/lib/myco/code_tools/parser/MycoBuilder.my.rb +1 -1
  50. data/lib/myco/code_tools/parser/MycoCharacterClasses.my.rb +2 -2
  51. data/lib/myco/code_tools/parser/MycoGrammar.my +68 -25
  52. data/lib/myco/code_tools/parser/MycoGrammar.my.rb +126 -51
  53. data/lib/myco/code_tools/parser/MycoTokens.my +3 -2
  54. data/lib/myco/code_tools/parser/MycoTokens.my.rb +11 -7
  55. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Builder.my.rb +2 -2
  56. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeHelpers.my +1 -1
  57. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeHelpers.my.rb +3 -3
  58. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeInstructions.my +11 -11
  59. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeInstructions.my.rb +11 -11
  60. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeParser.my +1 -1
  61. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeParser.my.rb +3 -6
  62. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Constructions.my.rb +40 -40
  63. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Grammar.my +3 -2
  64. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Grammar.my.rb +9 -8
  65. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Instructions.my.rb +2 -2
  66. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Machine.my.rb +2 -2
  67. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Parser.my.rb +2 -2
  68. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Patterns.my.rb +44 -44
  69. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Processor.my.rb +4 -4
  70. data/lib/myco/tools/BasicCommand.my.rb +4 -4
  71. data/lib/myco/version.rb +1 -1
  72. metadata +16 -13
@@ -1,6 +1,6 @@
1
1
 
2
2
  ::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition.const_set(:BytecodeHelpers, ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition::BytecodeHelpers = ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
4
4
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
5
5
  declare_meme(:overall_fail, [[:var, []]], nil, ::Myco.cscope.dup) { |*| (self.new_label)}
6
6
  declare_meme(:g, [], nil, ::Myco.cscope.dup) { |*| (self)}
@@ -175,7 +175,7 @@
175
175
  )}
176
176
  declare_meme(:push_literal_or_array, [], nil, ::Myco.cscope.dup) { |item| (::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", item.__send__(
177
177
  :is_a?,
178
- ::Array
178
+ ::Myco.find_constant(:Array)
179
179
  )) {self.push_literal_array(item)}) {self.push_literal(item)})}
180
- )}})
180
+ )}}
181
181
  .tap { |__c__| __c__.__name__ = :BytecodeHelpers })}}.instance
@@ -49,43 +49,43 @@ BytecodeInstructions < BasicObject {
49
49
 
50
50
  NegativePredicate << { bytecode: |m|
51
51
  m.neg_predicate(
52
- ::Proc.new { inner.bytecode(m) }
52
+ Proc.new { inner.bytecode(m) }
53
53
  inner.bytecode_can_capture
54
54
  )
55
55
  }
56
56
  PositivePredicate << { bytecode: |m|
57
57
  m.pos_predicate(
58
- ::Proc.new { inner.bytecode(m) }
58
+ Proc.new { inner.bytecode(m) }
59
59
  inner.bytecode_can_capture
60
60
  )
61
61
  }
62
62
  OneOrMore << { bytecode: |m|
63
63
  m.many(
64
- ::Proc.new { inner.bytecode(m); inlaid.?call }
64
+ Proc.new { inner.bytecode(m); inlaid.?call }
65
65
  inner.bytecode_can_capture
66
66
  )
67
67
  }
68
68
  ZeroOrOne << {
69
69
  bytecode: |m| {
70
70
  m.choice(
71
- ::Proc.new { inner.bytecode(m) },
72
- ::Proc.new { },
73
- inner.bytecode_can_capture,
71
+ Proc.new { inner.bytecode(m) }
72
+ Proc.new { }
73
+ inner.bytecode_can_capture
74
74
  )
75
75
  }
76
76
  }
77
77
  ZeroOrMore << { bytecode: |m|
78
78
  m.kleene(
79
- ::Proc.new { inner.bytecode(m); inlaid.?call }
79
+ Proc.new { inner.bytecode(m); inlaid.?call }
80
80
  inner.bytecode_can_capture
81
81
  )
82
82
  }
83
83
  OrderedChoice << {
84
84
  bytecode: |m| {
85
85
  m.choice(
86
- ::Proc.new { first.bytecode(m) },
87
- ::Proc.new { second.bytecode(m) },
88
- first.bytecode_can_capture,
86
+ Proc.new { first.bytecode(m) }
87
+ Proc.new { second.bytecode(m) }
88
+ first.bytecode_can_capture
89
89
  )
90
90
  }
91
91
  }
@@ -96,7 +96,7 @@ BytecodeInstructions < BasicObject {
96
96
  NamedCapture << {
97
97
  bytecode: |m| {
98
98
  (inner.is_a?(OneOrMore) || inner.is_a?(ZeroOrMore)) &? (
99
- inner.inlaid = ::Proc.new { m.capture(:m_split, captargs) }
99
+ inner.inlaid = Proc.new { m.capture(:m_split, captargs) }
100
100
  m.capture(:m_start)
101
101
  inner.bytecode(m)
102
102
  m.capture(:m_end, captargs)
@@ -2,7 +2,7 @@
2
2
  ::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
3
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
4
4
  declare_meme(:"BytecodeHelpers.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
5
- ::Myco.cscope.for_method_definition.const_set(:BytecodeInstructions, ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
5
+ ::Myco.cscope.for_method_definition::BytecodeInstructions = ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
6
6
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
7
7
  ::Myco.find_constant(:Constructions).component_eval {(
8
8
  ::Myco.find_constant(:AnyCharacter).component_eval {(declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |m| (m.any(1))})}
@@ -17,35 +17,35 @@
17
17
  m.set(codes.map(&:chr).join)
18
18
  )})}
19
19
  ::Myco.find_constant(:NegativePredicate).component_eval {(declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |m| (m.neg_predicate(
20
- ::Proc.new { || (self.inner.bytecode(m))},
20
+ ::Myco.find_constant(:Proc).new { || (self.inner.bytecode(m))},
21
21
  self.inner.bytecode_can_capture
22
22
  ))})}
23
23
  ::Myco.find_constant(:PositivePredicate).component_eval {(declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |m| (m.pos_predicate(
24
- ::Proc.new { || (self.inner.bytecode(m))},
24
+ ::Myco.find_constant(:Proc).new { || (self.inner.bytecode(m))},
25
25
  self.inner.bytecode_can_capture
26
26
  ))})}
27
27
  ::Myco.find_constant(:OneOrMore).component_eval {(declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |m| (m.many(
28
- ::Proc.new { || (
28
+ ::Myco.find_constant(:Proc).new { || (
29
29
  self.inner.bytecode(m)
30
30
  (self.inlaid.respond_to?(:call).false? ? ::Myco::Void : self.inlaid.call)
31
31
  )},
32
32
  self.inner.bytecode_can_capture
33
33
  ))})}
34
34
  ::Myco.find_constant(:ZeroOrOne).component_eval {(declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |m| (m.choice(
35
- ::Proc.new { || (self.inner.bytecode(m))},
36
- ::Proc.new { || nil},
35
+ ::Myco.find_constant(:Proc).new { || (self.inner.bytecode(m))},
36
+ ::Myco.find_constant(:Proc).new { || nil},
37
37
  self.inner.bytecode_can_capture
38
38
  ))})}
39
39
  ::Myco.find_constant(:ZeroOrMore).component_eval {(declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |m| (m.kleene(
40
- ::Proc.new { || (
40
+ ::Myco.find_constant(:Proc).new { || (
41
41
  self.inner.bytecode(m)
42
42
  (self.inlaid.respond_to?(:call).false? ? ::Myco::Void : self.inlaid.call)
43
43
  )},
44
44
  self.inner.bytecode_can_capture
45
45
  ))})}
46
46
  ::Myco.find_constant(:OrderedChoice).component_eval {(declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |m| (m.choice(
47
- ::Proc.new { || (self.first.bytecode(m))},
48
- ::Proc.new { || (self.second.bytecode(m))},
47
+ ::Myco.find_constant(:Proc).new { || (self.first.bytecode(m))},
48
+ ::Myco.find_constant(:Proc).new { || (self.second.bytecode(m))},
49
49
  self.first.bytecode_can_capture
50
50
  ))})}
51
51
  ::Myco.find_constant(:Concatenation).component_eval {(declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |m| (
@@ -61,7 +61,7 @@
61
61
  )}) {(
62
62
  self.inner.__send__(
63
63
  :inlaid=,
64
- ::Proc.new { || (m.capture(
64
+ ::Myco.find_constant(:Proc).new { || (m.capture(
65
65
  :m_split,
66
66
  self.captargs
67
67
  ))}
@@ -410,6 +410,6 @@
410
410
  )
411
411
  self.g.pop
412
412
  )}
413
- )}})
413
+ )}}
414
414
  .tap { |__c__| __c__.__name__ = :BytecodeInstructions }
415
415
  )}}.instance
@@ -120,7 +120,7 @@ BytecodeParser < BasicObject {
120
120
  self.error_col = pos.last
121
121
  self.error_string = \
122
122
  "Unexpected character near line: "error_row", column: "error_col".\n" \
123
- string.each_line.to_a[error_row - 1]"" \
123
+ string.each_line.to_a[error_row]"" \
124
124
  (' ' * [(error_col - 1), 0].max)"^"
125
125
  }
126
126
  self.result
@@ -1,6 +1,6 @@
1
1
 
2
2
  ::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition.const_set(:BytecodeParser, ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition::BytecodeParser = ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
4
4
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
5
5
  declare_meme(:grammar, [[:var, []]], nil, ::Myco.cscope.dup) { |*| (::Myco::Component.new([::Myco.find_constant(:Grammar)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
6
6
  .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}.instance)}
@@ -205,10 +205,7 @@
205
205
  :error_string=,
206
206
  "Unexpected character near line: #{self.error_row}, column: #{self.error_col}.\n#{string.each_line.to_a.__send__(
207
207
  :[],
208
- self.error_row.__send__(
209
- :-,
210
- 1
211
- )
208
+ self.error_row
212
209
  )}#{" ".__send__(
213
210
  :*,
214
211
  [
@@ -233,5 +230,5 @@
233
230
  ::Myco.find_constant(:SyntaxError),
234
231
  self.error_string
235
232
  ))}
236
- )}})
233
+ )}}
237
234
  .tap { |__c__| __c__.__name__ = :BytecodeParser })}}.instance
@@ -1,69 +1,69 @@
1
1
 
2
2
  ::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition.const_set(:Constructions, ::Myco::Component.new([::Myco.find_constant(:EmptyObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition::Constructions = ::Myco::Component.new([::Myco.find_constant(:EmptyObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
4
4
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
5
- ::Myco.cscope.for_method_definition.const_set(:Base, ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
6
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
5
+ ::Myco.cscope.for_method_definition::Base = ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
6
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
7
7
  .tap { |__c__| __c__.__name__ = :Base }
8
- ::Myco.cscope.for_method_definition.const_set(:UnaryBase, ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
9
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:inner, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}})
8
+ ::Myco.cscope.for_method_definition::UnaryBase = ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
9
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:inner, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}}
10
10
  .tap { |__c__| __c__.__name__ = :UnaryBase }
11
- ::Myco.cscope.for_method_definition.const_set(:BinaryBase, ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
11
+ ::Myco.cscope.for_method_definition::BinaryBase = ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
12
12
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
13
13
  declare_meme(:first, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
14
14
  declare_meme(:second, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
15
- )}})
15
+ )}}
16
16
  .tap { |__c__| __c__.__name__ = :BinaryBase }
17
- ::Myco.cscope.for_method_definition.const_set(:AnyCharacter, ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
18
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
17
+ ::Myco.cscope.for_method_definition::AnyCharacter = ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
18
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
19
19
  .tap { |__c__| __c__.__name__ = :AnyCharacter }
20
- ::Myco.cscope.for_method_definition.const_set(:Character, ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
21
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:code, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}})
20
+ ::Myco.cscope.for_method_definition::Character = ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
21
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:code, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}}
22
22
  .tap { |__c__| __c__.__name__ = :Character }
23
- ::Myco.cscope.for_method_definition.const_set(:CharacterString, ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
24
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:codes, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}})
23
+ ::Myco.cscope.for_method_definition::CharacterString = ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
24
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:codes, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}}
25
25
  .tap { |__c__| __c__.__name__ = :CharacterString }
26
- ::Myco.cscope.for_method_definition.const_set(:CharacterSet, ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
27
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:codes, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}})
26
+ ::Myco.cscope.for_method_definition::CharacterSet = ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
27
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:codes, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}}
28
28
  .tap { |__c__| __c__.__name__ = :CharacterSet }
29
- ::Myco.cscope.for_method_definition.const_set(:CharacterRange, ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
29
+ ::Myco.cscope.for_method_definition::CharacterRange = ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
30
30
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
31
31
  declare_meme(:start, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
32
32
  declare_meme(:stop, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
33
- )}})
33
+ )}}
34
34
  .tap { |__c__| __c__.__name__ = :CharacterRange }
35
- ::Myco.cscope.for_method_definition.const_set(:NegativePredicate, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
36
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
35
+ ::Myco.cscope.for_method_definition::NegativePredicate = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
36
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
37
37
  .tap { |__c__| __c__.__name__ = :NegativePredicate }
38
- ::Myco.cscope.for_method_definition.const_set(:PositivePredicate, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
39
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
38
+ ::Myco.cscope.for_method_definition::PositivePredicate = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
39
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
40
40
  .tap { |__c__| __c__.__name__ = :PositivePredicate }
41
- ::Myco.cscope.for_method_definition.const_set(:OneOrMore, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
42
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
41
+ ::Myco.cscope.for_method_definition::OneOrMore = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
42
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
43
43
  .tap { |__c__| __c__.__name__ = :OneOrMore }
44
- ::Myco.cscope.for_method_definition.const_set(:ZeroOrOne, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
45
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
44
+ ::Myco.cscope.for_method_definition::ZeroOrOne = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
45
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
46
46
  .tap { |__c__| __c__.__name__ = :ZeroOrOne }
47
- ::Myco.cscope.for_method_definition.const_set(:ZeroOrMore, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
48
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
47
+ ::Myco.cscope.for_method_definition::ZeroOrMore = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
48
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
49
49
  .tap { |__c__| __c__.__name__ = :ZeroOrMore }
50
- ::Myco.cscope.for_method_definition.const_set(:OrderedChoice, ::Myco::Component.new([::Myco.find_constant(:BinaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
51
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
50
+ ::Myco.cscope.for_method_definition::OrderedChoice = ::Myco::Component.new([::Myco.find_constant(:BinaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
51
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
52
52
  .tap { |__c__| __c__.__name__ = :OrderedChoice }
53
- ::Myco.cscope.for_method_definition.const_set(:Concatenation, ::Myco::Component.new([::Myco.find_constant(:BinaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
54
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
53
+ ::Myco.cscope.for_method_definition::Concatenation = ::Myco::Component.new([::Myco.find_constant(:BinaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
54
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
55
55
  .tap { |__c__| __c__.__name__ = :Concatenation }
56
- ::Myco.cscope.for_method_definition.const_set(:NamedCapture, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
57
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:captargs, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}})
56
+ ::Myco.cscope.for_method_definition::NamedCapture = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
57
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:captargs, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}}
58
58
  .tap { |__c__| __c__.__name__ = :NamedCapture }
59
- ::Myco.cscope.for_method_definition.const_set(:NamedTextCapture, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
60
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:captargs, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}})
59
+ ::Myco.cscope.for_method_definition::NamedTextCapture = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
60
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:captargs, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}}
61
61
  .tap { |__c__| __c__.__name__ = :NamedTextCapture }
62
- ::Myco.cscope.for_method_definition.const_set(:NamedTokenCapture, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
63
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:captargs, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}})
62
+ ::Myco.cscope.for_method_definition::NamedTokenCapture = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
63
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:captargs, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}}
64
64
  .tap { |__c__| __c__.__name__ = :NamedTokenCapture }
65
- ::Myco.cscope.for_method_definition.const_set(:Reduction, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
66
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:captargs, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}})
65
+ ::Myco.cscope.for_method_definition::Reduction = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
66
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:captargs, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}}
67
67
  .tap { |__c__| __c__.__name__ = :Reduction }
68
68
  ::Myco.find_constant(:Patterns)::UnaryBase.component_eval {(declare_meme(:construct, [], nil, ::Myco.cscope.dup) { |*| (self.construct_type.new({:inner => self.inner.construct}))})}
69
69
  ::Myco.find_constant(:Patterns)::BinaryBase.component_eval {(declare_meme(:construct, [], nil, ::Myco.cscope.dup) { |*| (self.construct_type.new({
@@ -366,5 +366,5 @@
366
366
  ]
367
367
  ]
368
368
  )})}
369
- )}})
369
+ )}}
370
370
  .tap { |__c__| __c__.__name__ = :Constructions })}}.instance
@@ -13,7 +13,8 @@ Grammar < BasicObject, Patterns::ShorthandMethods {
13
13
  bytecode_can_capture: true
14
14
  }
15
15
 
16
- var rule_table: ::Hash.new
16
+ var rule_table: Hash.new
17
+ var rule_table: Hash.new
17
18
 
18
19
  # Force evaluation of the rule tree in a way that
19
20
  # doesn't get stuck in an infinite recursion.
@@ -46,7 +47,7 @@ Grammar < BasicObject, Patterns::ShorthandMethods {
46
47
  apply: |meme| {
47
48
  name = meme.name
48
49
  # TODO: use some kind of Decorator#wrap mechanism instead
49
- meme.target.declare_meme(name, [:var]) {
50
+ meme.target.declare_meme(name, [:memoize]) {
50
51
  outer_self = self
51
52
  rule = Rule {
52
53
  name: name
@@ -1,17 +1,17 @@
1
1
 
2
2
  ::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition.const_set(:Grammar, ::Myco::Component.new([
3
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition::Grammar = ::Myco::Component.new([
4
4
  ::Myco.find_constant(:BasicObject),
5
5
  ::Myco.find_constant(:Patterns)::ShorthandMethods
6
6
  ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
7
7
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
8
- ::Myco.cscope.for_method_definition.const_set(:Rule, ::Myco::Component.new([::Myco.find_constant(:Patterns)::UnaryBase], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
8
+ ::Myco.cscope.for_method_definition::Rule = ::Myco::Component.new([::Myco.find_constant(:Patterns)::UnaryBase], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
9
9
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
10
10
  declare_meme(:construct_rule, [], nil, ::Myco.cscope.dup) { |*| (self.inner.construct)}
11
11
  declare_meme(:construct, [], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:RuleReference).new({:name => self.name}))}
12
- )}})
12
+ )}}
13
13
  .tap { |__c__| __c__.__name__ = :Rule }
14
- ::Myco.cscope.for_method_definition.const_set(:RuleReference, ::Myco::Component.new([::Myco.find_constant(:Constructions)::UnaryBase], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
14
+ ::Myco.cscope.for_method_definition::RuleReference = ::Myco::Component.new([::Myco.find_constant(:Constructions)::UnaryBase], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
15
15
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
16
16
  declare_meme(:name, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
17
17
  declare_meme(:sequence, [], nil, ::Myco.cscope.dup) { |*| ([[
@@ -20,9 +20,10 @@
20
20
  ]])}
21
21
  declare_meme(:bytecode, [], nil, ::Myco.cscope.dup) { |m| (m.call(self.name))}
22
22
  declare_meme(:bytecode_can_capture, [], nil, ::Myco.cscope.dup) { |*| (true)}
23
- )}})
23
+ )}}
24
24
  .tap { |__c__| __c__.__name__ = :RuleReference }
25
- declare_meme(:rule_table, [[:var, []]], nil, ::Myco.cscope.dup) { |*| (::Hash.new)}
25
+ declare_meme(:rule_table, [[:var, []]], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:Hash).new)}
26
+ declare_meme(:rule_table, [[:var, []]], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:Hash).new)}
26
27
  declare_meme(:construct_all_rules, [], nil, ::Myco.cscope.dup) { |*| (
27
28
  self.rules.root.construct_rule
28
29
  seen_keys = []
@@ -59,7 +60,7 @@
59
60
  name = meme.name
60
61
  meme.target.declare_meme(
61
62
  name,
62
- [:var]
63
+ [:memoize]
63
64
  ) { || (
64
65
  outer_self = self
65
66
  rule = ::Myco::Component.new([::Myco.find_constant(:Rule)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
@@ -79,5 +80,5 @@
79
80
  )}}.instance)}
80
81
  )}
81
82
  __category__(:rules).component_eval {(declare_meme(:root, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:Patterns)::AnyCharacter.new.__send__(:*))})}
82
- )}})
83
+ )}}
83
84
  .tap { |__c__| __c__.__name__ = :Grammar })}}.instance
@@ -1,6 +1,6 @@
1
1
 
2
2
  ::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition.const_set(:Instructions, ::Myco::Component.new([::Myco.find_constant(:EmptyObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition::Instructions = ::Myco::Component.new([::Myco.find_constant(:EmptyObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
4
4
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
5
5
  declare_meme(:char, [], nil, ::Myco.cscope.dup) { |code| (::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.subject.at(self.idx).__send__(
6
6
  :==,
@@ -280,5 +280,5 @@
280
280
  ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.stack.__send__(:empty?)) {::Myco.find_constant(:ErrorCondition).new}) {self.stack.pop}
281
281
  self.handle_fail
282
282
  )}
283
- )}})
283
+ )}}
284
284
  .tap { |__c__| __c__.__name__ = :Instructions })}}.instance
@@ -1,6 +1,6 @@
1
1
 
2
2
  ::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition.const_set(:Machine, ::Myco::Component.new([
3
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition::Machine = ::Myco::Component.new([
4
4
  ::Myco.find_constant(:BasicObject),
5
5
  ::Myco.find_constant(:Instructions)
6
6
  ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
@@ -20,5 +20,5 @@
20
20
  self.ip
21
21
  ))}})})}
22
22
  declare_meme(:had_failure, [], nil, ::Myco.cscope.dup) { |*| (self.ip.__send__(:!))}
23
- )}})
23
+ )}}
24
24
  .tap { |__c__| __c__.__name__ = :Machine })}}.instance
@@ -1,6 +1,6 @@
1
1
 
2
2
  ::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition.const_set(:Parser, ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition::Parser = ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
4
4
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
5
5
  declare_meme(:grammar, [[:var, []]], nil, ::Myco.cscope.dup) { |*| (::Myco::Component.new([::Myco.find_constant(:Grammar)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
6
6
  .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}.instance)}
@@ -48,5 +48,5 @@
48
48
  )}
49
49
  self
50
50
  )}
51
- )}})
51
+ )}}
52
52
  .tap { |__c__| __c__.__name__ = :Parser })}}.instance
@@ -1,74 +1,74 @@
1
1
 
2
2
  ::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition.const_set(:Patterns, ::Myco::Component.new([::Myco.find_constant(:EmptyObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition::Patterns = ::Myco::Component.new([::Myco.find_constant(:EmptyObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
4
4
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
5
- ::Myco.cscope.for_method_definition.const_set(:Base, ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
6
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:name, [[:var, []]], nil, ::Myco.cscope.dup) { |*| (self.parent_meme.name)})}})
5
+ ::Myco.cscope.for_method_definition::Base = ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
6
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:name, [[:var, []]], nil, ::Myco.cscope.dup) { |*| (self.parent_meme.name)})}}
7
7
  .tap { |__c__| __c__.__name__ = :Base }
8
- ::Myco.cscope.for_method_definition.const_set(:UnaryBase, ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
9
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:inner, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}})
8
+ ::Myco.cscope.for_method_definition::UnaryBase = ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
9
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:inner, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}}
10
10
  .tap { |__c__| __c__.__name__ = :UnaryBase }
11
- ::Myco.cscope.for_method_definition.const_set(:BinaryBase, ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
11
+ ::Myco.cscope.for_method_definition::BinaryBase = ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
12
12
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
13
13
  declare_meme(:first, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
14
14
  declare_meme(:second, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
15
- )}})
15
+ )}}
16
16
  .tap { |__c__| __c__.__name__ = :BinaryBase }
17
- ::Myco.cscope.for_method_definition.const_set(:AnyCharacter, ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
18
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
17
+ ::Myco.cscope.for_method_definition::AnyCharacter = ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
18
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
19
19
  .tap { |__c__| __c__.__name__ = :AnyCharacter }
20
- ::Myco.cscope.for_method_definition.const_set(:Character, ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
21
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:code, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}})
20
+ ::Myco.cscope.for_method_definition::Character = ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
21
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:code, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}}
22
22
  .tap { |__c__| __c__.__name__ = :Character }
23
- ::Myco.cscope.for_method_definition.const_set(:CharacterString, ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
24
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:codes, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}})
23
+ ::Myco.cscope.for_method_definition::CharacterString = ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
24
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:codes, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}}
25
25
  .tap { |__c__| __c__.__name__ = :CharacterString }
26
- ::Myco.cscope.for_method_definition.const_set(:CharacterSet, ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
27
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:codes, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}})
26
+ ::Myco.cscope.for_method_definition::CharacterSet = ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
27
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(declare_meme(:codes, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil})}}
28
28
  .tap { |__c__| __c__.__name__ = :CharacterSet }
29
- ::Myco.cscope.for_method_definition.const_set(:CharacterRange, ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
29
+ ::Myco.cscope.for_method_definition::CharacterRange = ::Myco::Component.new([::Myco.find_constant(:Base)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
30
30
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
31
31
  declare_meme(:start, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
32
32
  declare_meme(:stop, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
33
- )}})
33
+ )}}
34
34
  .tap { |__c__| __c__.__name__ = :CharacterRange }
35
- ::Myco.cscope.for_method_definition.const_set(:NegativePredicate, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
36
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
35
+ ::Myco.cscope.for_method_definition::NegativePredicate = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
36
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
37
37
  .tap { |__c__| __c__.__name__ = :NegativePredicate }
38
- ::Myco.cscope.for_method_definition.const_set(:PositivePredicate, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
39
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
38
+ ::Myco.cscope.for_method_definition::PositivePredicate = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
39
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
40
40
  .tap { |__c__| __c__.__name__ = :PositivePredicate }
41
- ::Myco.cscope.for_method_definition.const_set(:OneOrMore, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
42
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
41
+ ::Myco.cscope.for_method_definition::OneOrMore = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
42
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
43
43
  .tap { |__c__| __c__.__name__ = :OneOrMore }
44
- ::Myco.cscope.for_method_definition.const_set(:ZeroOrOne, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
45
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
44
+ ::Myco.cscope.for_method_definition::ZeroOrOne = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
45
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
46
46
  .tap { |__c__| __c__.__name__ = :ZeroOrOne }
47
- ::Myco.cscope.for_method_definition.const_set(:ZeroOrMore, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
48
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
47
+ ::Myco.cscope.for_method_definition::ZeroOrMore = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
48
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
49
49
  .tap { |__c__| __c__.__name__ = :ZeroOrMore }
50
- ::Myco.cscope.for_method_definition.const_set(:OrderedChoice, ::Myco::Component.new([::Myco.find_constant(:BinaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
51
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
50
+ ::Myco.cscope.for_method_definition::OrderedChoice = ::Myco::Component.new([::Myco.find_constant(:BinaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
51
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
52
52
  .tap { |__c__| __c__.__name__ = :OrderedChoice }
53
- ::Myco.cscope.for_method_definition.const_set(:Concatenation, ::Myco::Component.new([::Myco.find_constant(:BinaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
54
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
53
+ ::Myco.cscope.for_method_definition::Concatenation = ::Myco::Component.new([::Myco.find_constant(:BinaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
54
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
55
55
  .tap { |__c__| __c__.__name__ = :Concatenation }
56
- ::Myco.cscope.for_method_definition.const_set(:NamedCapture, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
57
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
56
+ ::Myco.cscope.for_method_definition::NamedCapture = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
57
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
58
58
  .tap { |__c__| __c__.__name__ = :NamedCapture }
59
- ::Myco.cscope.for_method_definition.const_set(:NamedTextCapture, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
60
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
59
+ ::Myco.cscope.for_method_definition::NamedTextCapture = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
60
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
61
61
  .tap { |__c__| __c__.__name__ = :NamedTextCapture }
62
- ::Myco.cscope.for_method_definition.const_set(:NamedTokenCapture, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
63
- .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}})
62
+ ::Myco.cscope.for_method_definition::NamedTokenCapture = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
63
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}
64
64
  .tap { |__c__| __c__.__name__ = :NamedTokenCapture }
65
- ::Myco.cscope.for_method_definition.const_set(:Reduction, ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
65
+ ::Myco.cscope.for_method_definition::Reduction = ::Myco::Component.new([::Myco.find_constant(:UnaryBase)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
66
66
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
67
67
  declare_meme(:block, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
68
68
  declare_meme(:args, [[:var, []]], nil, ::Myco.cscope.dup) { |*| ([])}
69
- )}})
69
+ )}}
70
70
  .tap { |__c__| __c__.__name__ = :Reduction }
71
- ::Myco.cscope.for_method_definition.const_set(:ShorthandMethods, ::Myco::Component.new([::Myco.find_constant(:EmptyObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
71
+ ::Myco.cscope.for_method_definition::ShorthandMethods = ::Myco::Component.new([::Myco.find_constant(:EmptyObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
72
72
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
73
73
  declare_meme(:any, [], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:AnyCharacter).new)}
74
74
  declare_meme(:char, [], nil, ::Myco.cscope.dup) { |character| (::Myco.find_constant(:Character).new({:code => character.ord}))}
@@ -82,7 +82,7 @@
82
82
  :inner => pattern,
83
83
  :block => block
84
84
  }))}
85
- )}})
85
+ )}}
86
86
  .tap { |__c__| __c__.__name__ = :ShorthandMethods }
87
87
  ::Myco.find_constant(:Base).component_eval {(
88
88
  declare_meme(:!, [], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:NegativePredicate).new({:inner => self}))}
@@ -143,7 +143,7 @@
143
143
  ::Myco.find_constant(:Concatenation)
144
144
  )}) {::Myco.find_constant(:OneOrMore).new({:inner => self})})})}
145
145
  ::Myco.find_constant(:Reduction).component_eval {(
146
- ::Myco.cscope.for_method_definition.const_set(:Environment, ::Myco::Component.new([
146
+ ::Myco.cscope.for_method_definition::Environment = ::Myco::Component.new([
147
147
  ::Myco.find_constant(:EmptyObject),
148
148
  ::Myco.find_constant(:BasicDecorators)
149
149
  ], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
@@ -156,9 +156,9 @@
156
156
  &block
157
157
  ))})}
158
158
  declare_meme(:!, [], nil, ::Myco.cscope.dup) { |*| (nil)}
159
- )}})
159
+ )}}
160
160
  .tap { |__c__| __c__.__name__ = :Environment }
161
161
  declare_meme(:code, [], nil, ::Myco.cscope.dup) { |*| (self.block.block.compiled_code)}
162
162
  )}
163
- )}})
163
+ )}}
164
164
  .tap { |__c__| __c__.__name__ = :Patterns })}}.instance
@@ -1,6 +1,6 @@
1
1
 
2
2
  ::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
- .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition.const_set(:Processor, ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
+ .tap { |__c__| __c__.__last__ = __c__.component_eval {(::Myco.cscope.for_method_definition::Processor = ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
4
4
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
5
5
  declare_meme(:string, [[:var, []]], nil, ::Myco.cscope.dup) { |*| ("")}
6
6
  declare_meme(:capture_items, [[:var, []]], nil, ::Myco.cscope.dup) { |*| ([])}
@@ -11,7 +11,7 @@
11
11
  self.validate_state
12
12
  self.final_captures
13
13
  )}
14
- ::Myco.cscope.for_method_definition.const_set(:Token, ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
14
+ ::Myco.cscope.for_method_definition::Token = ::Myco::Component.new([::Myco.find_constant(:BasicObject)], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
15
15
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
16
16
  declare_meme(:type, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
17
17
  declare_meme(:text, [[:var, []]], nil, ::Myco.cscope.dup) { |*| nil}
@@ -36,7 +36,7 @@
36
36
  base,
37
37
  true
38
38
  ))}
39
- )}})
39
+ )}}
40
40
  .tap { |__c__| __c__.__name__ = :Token }
41
41
  declare_meme(:reduction_env, [[:var, []]], nil, ::Myco.cscope.dup) { |*| (::Myco::Component.new([::Myco.find_constant(:Patterns)::Reduction::Environment], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
42
42
  .tap { |__c__| __c__.__last__ = __c__.component_eval {nil}}.instance)}
@@ -335,5 +335,5 @@
335
335
  store_value
336
336
  )
337
337
  )}
338
- )}})
338
+ )}}
339
339
  .tap { |__c__| __c__.__name__ = :Processor })}}.instance