myco 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/lib/myco/bootstrap/instance.rb +13 -3
  3. data/lib/myco/code_tools/AST.my +0 -2
  4. data/lib/myco/code_tools/AST.my.rb +0 -1
  5. data/lib/myco/code_tools/AST/Block.my +15 -4
  6. data/lib/myco/code_tools/AST/Block.my.rb +16 -3
  7. data/lib/myco/code_tools/AST/DeclareMeme.my +44 -64
  8. data/lib/myco/code_tools/AST/DeclareMeme.my.rb +66 -74
  9. data/lib/myco/code_tools/AST/ToRuby.my +17 -20
  10. data/lib/myco/code_tools/AST/ToRuby.my.rb +24 -22
  11. data/lib/myco/code_tools/Parser.my +2 -1
  12. data/lib/myco/code_tools/Parser.my.rb +2 -1
  13. data/lib/myco/code_tools/parser/MycoBuilder.my +2 -2
  14. data/lib/myco/code_tools/parser/MycoBuilder.my.rb +2 -2
  15. data/lib/myco/code_tools/parser/MycoGrammar.my +28 -21
  16. data/lib/myco/code_tools/parser/MycoGrammar.my.rb +94 -56
  17. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces.my +10 -11
  18. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces.my.rb +10 -9
  19. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeHelpers.my +25 -3
  20. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeHelpers.my.rb +38 -0
  21. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Capture.my +152 -0
  22. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Capture.my.rb +189 -0
  23. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Common.my +84 -0
  24. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Common.my.rb +114 -0
  25. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Common/Parser.my +139 -0
  26. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/{BytecodeParser.my.rb → Common/Parser.my.rb} +17 -36
  27. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Composite.my +229 -0
  28. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Composite.my.rb +296 -0
  29. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Grammar.my +8 -25
  30. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Grammar.my.rb +9 -37
  31. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Parser.my +139 -37
  32. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Parser.my.rb +206 -36
  33. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Processor.my +21 -12
  34. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Processor.my.rb +45 -24
  35. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Stream.my +99 -0
  36. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Stream.my.rb +152 -0
  37. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Stream/Parser.my +37 -0
  38. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Stream/Parser.my.rb +57 -0
  39. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/String.my +136 -0
  40. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/String.my.rb +147 -0
  41. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/String/Parser.my +45 -0
  42. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/String/Parser.my.rb +85 -0
  43. data/lib/myco/code_tools/parser/pegleromyces/spec/Patterns.test.my +31 -25
  44. data/lib/myco/code_tools/parser/pegleromyces/spec/Patterns.test.my.rb +44 -25
  45. data/lib/myco/code_tools/parser/pegleromyces/spec/Stream/Parser.test.my +49 -0
  46. data/lib/myco/code_tools/parser/pegleromyces/spec/Stream/Parser.test.my.rb +119 -0
  47. data/lib/myco/code_tools/parser/pegleromyces/spec/Stream/Patterns.test.my +131 -0
  48. data/lib/myco/code_tools/parser/pegleromyces/spec/Stream/Patterns.test.my.rb +595 -0
  49. data/lib/myco/code_tools/parser/pegleromyces/spec/{BytecodeParser.test.my → String/Parser.test.my} +41 -2
  50. data/lib/myco/code_tools/parser/pegleromyces/spec/{BytecodeParser.test.my.rb → String/Parser.test.my.rb} +144 -3
  51. data/lib/myco/code_tools/parser/pegleromyces/spec/run.my +4 -10
  52. data/lib/myco/code_tools/parser/pegleromyces/spec/run.my.rb +4 -8
  53. data/lib/myco/core.my +1 -0
  54. data/lib/myco/core.my.rb +1 -0
  55. data/lib/myco/core/BasicObject.my +4 -2
  56. data/lib/myco/core/BasicObject.my.rb +2 -5
  57. data/lib/myco/core/Loop.my +5 -0
  58. data/lib/myco/core/Loop.my.rb +13 -0
  59. data/lib/myco/dev.rb +1 -0
  60. data/lib/myco/dev/profile.rb +12 -0
  61. data/lib/myco/version.rb +3 -3
  62. metadata +54 -59
  63. data/lib/myco/code_tools/AST/DeclareDecorator.my +0 -19
  64. data/lib/myco/code_tools/AST/DeclareDecorator.my.rb +0 -24
  65. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Builder.my +0 -4
  66. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Builder.my.rb +0 -5
  67. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeInstructions.my +0 -420
  68. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeInstructions.my.rb +0 -415
  69. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeParser.my +0 -147
  70. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Constructions.my +0 -183
  71. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Constructions.my.rb +0 -370
  72. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Instructions.my +0 -139
  73. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Instructions.my.rb +0 -284
  74. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Machine.my +0 -37
  75. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Machine.my.rb +0 -24
  76. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Patterns.my +0 -123
  77. data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Patterns.my.rb +0 -164
  78. data/lib/myco/code_tools/parser/pegleromyces/spec/Builder.test.my +0 -10
  79. data/lib/myco/code_tools/parser/pegleromyces/spec/Builder.test.my.rb +0 -9
  80. data/lib/myco/code_tools/parser/pegleromyces/spec/BytecodeInstructions.test.my +0 -10
  81. data/lib/myco/code_tools/parser/pegleromyces/spec/BytecodeInstructions.test.my.rb +0 -9
  82. data/lib/myco/code_tools/parser/pegleromyces/spec/Constructions.test.my +0 -229
  83. data/lib/myco/code_tools/parser/pegleromyces/spec/Constructions.test.my.rb +0 -663
  84. data/lib/myco/code_tools/parser/pegleromyces/spec/Instructions.test.my +0 -10
  85. data/lib/myco/code_tools/parser/pegleromyces/spec/Instructions.test.my.rb +0 -9
  86. data/lib/myco/code_tools/parser/pegleromyces/spec/Machine.test.my +0 -13
  87. data/lib/myco/code_tools/parser/pegleromyces/spec/Machine.test.my.rb +0 -20
  88. data/lib/myco/code_tools/parser/pegleromyces/spec/Parser.test.my +0 -54
  89. data/lib/myco/code_tools/parser/pegleromyces/spec/Parser.test.my.rb +0 -215
@@ -214,26 +214,28 @@
214
214
  g.add(self.body)
215
215
  g.add("}")
216
216
  )})}
217
- ::Myco.find_constant(:DeclareMeme).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.with_nested_var_scope(self.body_implementation) { || (
218
- g.var_scope_declare_locals(*self.parameters.names)
219
- g.add("declare_meme(")
220
- g.add("#{self.name.inspect}, ")
221
- g.add(self.decorations)
222
- g.add(", nil, ::Myco.cscope.dup)")
223
- g.add(" { ")
224
- g.add(self.parameters)
225
- g.add(" ")
226
- g.add(self.body)
227
- g.add("}")
228
- )})})}
229
- ::Myco.find_constant(:DeclareDecorator).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
230
- g.add("[#{self.name.value.inspect}, [")
231
- g.list(
232
- self.arguments.body,
233
- ",",
234
- {:auto_lines => true}
235
- )
236
- g.add("]]")
217
+ ::Myco.find_constant(:DeclareMeme).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
218
+ name = self.decorations.last
219
+ ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", name.node_type.__send__(
220
+ :==,
221
+ :symbol
222
+ )) {(
223
+ g.add("declare_meme(")
224
+ g.list(
225
+ [
226
+ self.effective_name,
227
+ self.effective_decorations,
228
+ self.effective_body
229
+ ],
230
+ ",",
231
+ {:auto_lines => true}
232
+ )
233
+ g.add(")")
234
+ )}) {g.add(::Myco.find_constant(:ConstantAssignment).new({
235
+ :line => self.line,
236
+ :constant => self.effective_name,
237
+ :value => self.effective_body.block.body
238
+ }))}
237
239
  )})}
238
240
  ::Myco.find_constant(:RequiredParameter).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.add("#{self.name}"))})}
239
241
  ::Myco.find_constant(:OptionalParameter).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (
@@ -334,9 +336,9 @@
334
336
  g.add(self.body)
335
337
  )})}
336
338
  ::Myco.find_constant(:Block).component_eval {(declare_meme(:to_ruby, [], nil, ::Myco.cscope.dup) { |g| (g.with_nested_var_scope(self) { || (
337
- g.var_scope_declare_locals(*self.parameters.names)
339
+ g.var_scope_declare_locals(*self.effective_parameters.names)
338
340
  g.add(" ")
339
- g.add(self.parameters)
341
+ g.add(self.effective_parameters)
340
342
  g.add(" ")
341
343
  g.add(self.body)
342
344
  )})})}
@@ -1,11 +1,12 @@
1
1
 
2
2
  # TODO: include Pegleromyces library in a better way than clone into subdir
3
3
  import as(:Pegleromyces) 'parser/pegleromyces/lib/pegleromyces.my'
4
+ ::Pegleromyces: Pegleromyces
4
5
 
5
6
  import 'parser/MycoGrammar.my'
6
7
  import 'parser/MycoBuilder.my'
7
8
 
8
- CodeTools::Parser: Pegleromyces::BytecodeParser {
9
+ CodeTools::Parser: Pegleromyces::String::Parser {
9
10
  const grammar: MycoGrammar
10
11
  const builder: MycoBuilder
11
12
 
@@ -5,9 +5,10 @@
5
5
  [:as, [:Pegleromyces]],
6
6
  [:import, []]
7
7
  ], nil, ::Myco.cscope.dup) { |*| nil}
8
+ ::Myco::Pegleromyces = (::Myco.find_constant(:Pegleromyces))
8
9
  declare_meme(:"parser/MycoGrammar.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
9
10
  declare_meme(:"parser/MycoBuilder.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
10
- ::Myco.find_constant(:CodeTools)::Parser = (::Myco::Component.new([::Myco.find_constant(:Pegleromyces)::BytecodeParser], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
11
+ ::Myco.find_constant(:CodeTools)::Parser = (::Myco::Component.new([::Myco.find_constant(:Pegleromyces)::String::Parser], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
11
12
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
12
13
  declare_meme(:grammar, [[:const, []]], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:MycoGrammar))}
13
14
  declare_meme(:builder, [[:const, []]], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:MycoBuilder))}
@@ -40,8 +40,8 @@ MycoBuilder: BasicObject {
40
40
  output = []
41
41
 
42
42
  # Scan through, reducing or shifting based on the operator
43
- loop {
44
- (input.count > 2) || break
43
+ Loop.run {
44
+ (input.count > 2) || Loop.break
45
45
  n0 = input.shift
46
46
  op = input.shift
47
47
 
@@ -61,11 +61,11 @@
61
61
  ))})}
62
62
  declare_meme(:collapse, [], nil, ::Myco.cscope.dup) { |input, *types, &block| (
63
63
  output = []
64
- self.loop { || (
64
+ ::Myco.find_constant(:Loop).run { || (
65
65
  ::Myco.branch_op(:"||", input.count.__send__(
66
66
  :>,
67
67
  2
68
- )) {self.__send__(:break)}
68
+ )) {::Myco.find_constant(:Loop).__send__(:break)}
69
69
  n0 = input.shift
70
70
  op = input.shift
71
71
  ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", types.__send__(
@@ -30,8 +30,6 @@ rule declobj_expr:
30
30
  rule declobj_expr_not_category:
31
31
  decl
32
32
  / cdefn
33
- / cmeme
34
- / constant
35
33
  / meme
36
34
 
37
35
  # Expressions allowable inside memes
@@ -114,6 +112,10 @@ rule block_body:
114
112
  r(C.spc_nl.* + param_list.-[:np] + C.spc_nl.* + meme_enclosed_expr_body[:nb])
115
113
  { ast.block(nb, np, nb) }
116
114
 
115
+ rule open_block_body:
116
+ r(C.spc_nl.* + param_list.-[:np] + C.spc_nl.* + meme_inline_expr_body[:nb])
117
+ { ast.block(nb, np, nb) }
118
+
117
119
  ##
118
120
  # Enclosed literals
119
121
 
@@ -277,6 +279,10 @@ rule invoke:
277
279
  r(T.identifier[:tn] + opt_arg_list[:na] + opt_block_body[:nb])
278
280
  { ast.invoke(tn, null, tn.sym, na, nb) }
279
281
 
282
+ rule invoke_classic_form:
283
+ r(T.identifier[:tn] + C.spc.* + arg_list[:na])
284
+ { ast.invoke(tn, null, tn.sym, na, null) }
285
+
280
286
  rule op_invoke: # Allow some binary operators to be invoked with a dot
281
287
  r(op_invoke_id[:tn] + opt_arg_list[:na] + opt_block_body[:nb])
282
288
  { ast.invoke(tn, null, tn.sym, na, nb) }
@@ -521,7 +527,7 @@ rule unary_operation:
521
527
  # TODO: this should work without the call to 'inner'
522
528
  # Currently, without this call, an unbalanced tidx_stack occurs
523
529
  # in the Processor due to an extra :t_start capture symbol emitted
524
- # by the BytecodeParser with no matching :t_end to clear it.
530
+ # by the String::Parser with no matching :t_end to clear it.
525
531
  rule t_inln_sep: !T.arg_sep.inner + T.expr_sep
526
532
 
527
533
  rule inln_sep: (C.spc.* + t_inln_sep + C.spc.*).+
@@ -566,28 +572,21 @@ rule paren_expr:
566
572
  rule meme_enclosed_expr_body:
567
573
  r(T.meme_begin + meme_expr_body[:n0]) { n0 }
568
574
 
569
- rule meme_either_body:
570
- meme_enclosed_expr_body
571
- / meme_inline_expr_body
572
-
573
- rule cmeme:
574
- r(constant[:n0] + C.spc.* + T.meme_mark[:tm] + C.spc_nl.* + meme_inline_expr_body[:n1])
575
- { ast.cdecl(tm, n0, n1) }
575
+ rule meme_either_body_as_block:
576
+ r((block_body / open_block_body)[:n0]) { ast.blklit(n0, n0) }
576
577
 
577
- rule meme_name:
578
- id_as_symbol
578
+ rule decoration:
579
+ invoke_classic_form
580
+ / id_as_symbol
579
581
  / lit_string_as_symbol
582
+ / constant
580
583
 
581
- rule decorator:
582
- r(meme_name[:ni] + arg_list.-[:na])
583
- { ast.deco(ni, ni, na) }
584
-
585
- rule sepd_decorator:
586
- r(C.spc.* + decorator[:n]) { n }
584
+ rule sepd_decoration:
585
+ r(C.spc.* + decoration[:n]) { n }
587
586
 
588
- rule decorators_and_meme_name:
589
- r(decorator[:n0] + sepd_decorator.*[:nrest])
590
- { ast.array(n0, [n0, *nrest].reverse) }
587
+ rule sepd_decorations:
588
+ r(decoration[:n0] + sepd_decoration.*[:nrest])
589
+ { [n0, *nrest] }
591
590
 
592
591
  rule meme:
593
592
  r(decorators_and_meme_name[:nd]
@@ -597,4 +596,12 @@ rule meme:
597
596
  { ast.meme(tm, nd.body.shift.name, nd, np, nb) }
598
597
  / r(decorators_and_meme_name[:nd])
599
598
  { ast.meme(nd, nd.body.shift.name, nd, null, null) }
599
+
600
+ rule meme:
601
+ r(sepd_decorations[:nlist]
602
+ + C.spc.* + T.meme_mark[:tm]
603
+ + C.spc_nl.* + meme_either_body_as_block[:nb])
604
+ { ast.meme(nlist.first, nlist, nb) }
605
+ / r(sepd_decorations[:nlist])
606
+ { ast.meme(nlist.first, nlist, null) }
600
607
  }
@@ -32,12 +32,6 @@
32
32
  declare_meme(:declobj_expr_not_category, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.decl.__send__(
33
33
  :/,
34
34
  self.cdefn
35
- ).__send__(
36
- :/,
37
- self.cmeme
38
- ).__send__(
39
- :/,
40
- self.constant
41
35
  ).__send__(
42
36
  :/,
43
37
  self.meme
@@ -235,6 +229,26 @@
235
229
  self.np,
236
230
  self.nb
237
231
  ))})}
232
+ declare_meme(:open_block_body, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:C).spc_nl.__send__(:*).__send__(
233
+ :+,
234
+ self.param_list.__send__(:-).__send__(
235
+ :[],
236
+ :np
237
+ )
238
+ ).__send__(
239
+ :+,
240
+ ::Myco.find_constant(:C).spc_nl.__send__(:*)
241
+ ).__send__(
242
+ :+,
243
+ self.meme_inline_expr_body.__send__(
244
+ :[],
245
+ :nb
246
+ )
247
+ )) { || (self.ast.block(
248
+ self.nb,
249
+ self.np,
250
+ self.nb
251
+ ))})}
238
252
  declare_meme(:lit_string, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).string_begin.__send__(
239
253
  :+,
240
254
  ::Myco.find_constant(:T).string_body.__send__(
@@ -768,6 +782,25 @@
768
782
  self.na,
769
783
  self.nb
770
784
  ))})}
785
+ declare_meme(:invoke_classic_form, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).identifier.__send__(
786
+ :[],
787
+ :tn
788
+ ).__send__(
789
+ :+,
790
+ ::Myco.find_constant(:C).spc.__send__(:*)
791
+ ).__send__(
792
+ :+,
793
+ self.arg_list.__send__(
794
+ :[],
795
+ :na
796
+ )
797
+ )) { || (self.ast.invoke(
798
+ self.tn,
799
+ nil,
800
+ self.tn.sym,
801
+ self.na,
802
+ nil
803
+ ))})}
771
804
  declare_meme(:op_invoke, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.op_invoke_id.__send__(
772
805
  :[],
773
806
  :tn
@@ -1693,77 +1726,46 @@
1693
1726
  :n0
1694
1727
  )
1695
1728
  )) { || (self.__send__(:n0))})}
1696
- declare_meme(:meme_either_body, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.meme_enclosed_expr_body.__send__(
1729
+ declare_meme(:meme_either_body_as_block, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.block_body.__send__(
1697
1730
  :/,
1698
- self.meme_inline_expr_body
1699
- ))}
1700
- declare_meme(:cmeme, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.constant.__send__(
1731
+ self.open_block_body
1732
+ ).__send__(
1701
1733
  :[],
1702
1734
  :n0
1703
- ).__send__(
1704
- :+,
1705
- ::Myco.find_constant(:C).spc.__send__(:*)
1706
- ).__send__(
1707
- :+,
1708
- ::Myco.find_constant(:T).meme_mark.__send__(
1709
- :[],
1710
- :tm
1711
- )
1712
- ).__send__(
1713
- :+,
1714
- ::Myco.find_constant(:C).spc_nl.__send__(:*)
1715
- ).__send__(
1716
- :+,
1717
- self.meme_inline_expr_body.__send__(
1718
- :[],
1719
- :n1
1720
- )
1721
- )) { || (self.ast.cdecl(
1722
- self.tm,
1735
+ )) { || (self.ast.blklit(
1723
1736
  self.__send__(:n0),
1724
- self.__send__(:n1)
1737
+ self.__send__(:n0)
1725
1738
  ))})}
1726
- declare_meme(:meme_name, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.id_as_symbol.__send__(
1739
+ declare_meme(:decoration, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.invoke_classic_form.__send__(
1740
+ :/,
1741
+ self.id_as_symbol
1742
+ ).__send__(
1727
1743
  :/,
1728
1744
  self.lit_string_as_symbol
1729
- ))}
1730
- declare_meme(:decorator, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.meme_name.__send__(
1731
- :[],
1732
- :ni
1733
1745
  ).__send__(
1746
+ :/,
1747
+ self.constant
1748
+ ))}
1749
+ declare_meme(:sepd_decoration, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:C).spc.__send__(:*).__send__(
1734
1750
  :+,
1735
- self.arg_list.__send__(:-).__send__(
1736
- :[],
1737
- :na
1738
- )
1739
- )) { || (self.ast.deco(
1740
- self.ni,
1741
- self.ni,
1742
- self.na
1743
- ))})}
1744
- declare_meme(:sepd_decorator, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:C).spc.__send__(:*).__send__(
1745
- :+,
1746
- self.decorator.__send__(
1751
+ self.decoration.__send__(
1747
1752
  :[],
1748
1753
  :n
1749
1754
  )
1750
1755
  )) { || (self.n)})}
1751
- declare_meme(:decorators_and_meme_name, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.decorator.__send__(
1756
+ declare_meme(:sepd_decorations, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.decoration.__send__(
1752
1757
  :[],
1753
1758
  :n0
1754
1759
  ).__send__(
1755
1760
  :+,
1756
- self.sepd_decorator.__send__(:*).__send__(
1761
+ self.sepd_decoration.__send__(:*).__send__(
1757
1762
  :[],
1758
1763
  :nrest
1759
1764
  )
1760
- )) { || (self.ast.array(
1765
+ )) { || ([
1761
1766
  self.__send__(:n0),
1762
- [
1763
- self.__send__(:n0),
1764
- *self.nrest
1765
- ].reverse
1766
- ))})}
1767
+ *self.nrest
1768
+ ])})}
1767
1769
  declare_meme(:meme, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.decorators_and_meme_name.__send__(
1768
1770
  :[],
1769
1771
  :nd
@@ -1816,6 +1818,42 @@
1816
1818
  nil
1817
1819
  ))}
1818
1820
  ))}
1821
+ declare_meme(:meme, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.sepd_decorations.__send__(
1822
+ :[],
1823
+ :nlist
1824
+ ).__send__(
1825
+ :+,
1826
+ ::Myco.find_constant(:C).spc.__send__(:*)
1827
+ ).__send__(
1828
+ :+,
1829
+ ::Myco.find_constant(:T).meme_mark.__send__(
1830
+ :[],
1831
+ :tm
1832
+ )
1833
+ ).__send__(
1834
+ :+,
1835
+ ::Myco.find_constant(:C).spc_nl.__send__(:*)
1836
+ ).__send__(
1837
+ :+,
1838
+ self.meme_either_body_as_block.__send__(
1839
+ :[],
1840
+ :nb
1841
+ )
1842
+ )) { || (self.ast.meme(
1843
+ self.nlist.first,
1844
+ self.nlist,
1845
+ self.nb
1846
+ ))}.__send__(
1847
+ :/,
1848
+ self.r(self.sepd_decorations.__send__(
1849
+ :[],
1850
+ :nlist
1851
+ )) { || (self.ast.meme(
1852
+ self.nlist.first,
1853
+ self.nlist,
1854
+ nil
1855
+ ))}
1856
+ ))}
1819
1857
  )}
1820
1858
  )}}.instance)
1821
1859
  )}}.instance
@@ -1,15 +1,14 @@
1
1
 
2
- import 'pegleromyces/Patterns.my'
3
- import 'pegleromyces/Constructions.my'
4
-
5
- import 'pegleromyces/Instructions.my'
6
- import 'pegleromyces/Machine.my'
7
-
8
- import 'pegleromyces/Processor.my'
9
- import 'pegleromyces/Builder.my'
2
+ import 'pegleromyces/Common.my'
3
+ import 'pegleromyces/Capture.my'
4
+ import 'pegleromyces/Composite.my'
5
+ import 'pegleromyces/String.my'
6
+ import 'pegleromyces/Stream.my'
10
7
 
11
8
  import 'pegleromyces/Grammar.my'
12
- import 'pegleromyces/Parser.my'
13
9
 
14
- import 'pegleromyces/BytecodeInstructions.my'
15
- import 'pegleromyces/BytecodeParser.my'
10
+ import 'pegleromyces/BytecodeHelpers.my'
11
+ import 'pegleromyces/Common/Parser.my'
12
+ import 'pegleromyces/String/Parser.my'
13
+ import 'pegleromyces/Stream/Parser.my'
14
+ import 'pegleromyces/Processor.my'
@@ -1,14 +1,15 @@
1
1
 
2
2
  ::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
3
3
  .tap { |__c__| __c__.__last__ = __c__.component_eval {(
4
- declare_meme(:"pegleromyces/Patterns.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
5
- declare_meme(:"pegleromyces/Constructions.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
6
- declare_meme(:"pegleromyces/Instructions.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
7
- declare_meme(:"pegleromyces/Machine.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
8
- declare_meme(:"pegleromyces/Processor.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
9
- declare_meme(:"pegleromyces/Builder.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
4
+ declare_meme(:"pegleromyces/Common.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
5
+ declare_meme(:"pegleromyces/Capture.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
6
+ declare_meme(:"pegleromyces/Composite.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
7
+ declare_meme(:"pegleromyces/String.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
8
+ declare_meme(:"pegleromyces/Stream.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
10
9
  declare_meme(:"pegleromyces/Grammar.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
11
- declare_meme(:"pegleromyces/Parser.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
12
- declare_meme(:"pegleromyces/BytecodeInstructions.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
13
- declare_meme(:"pegleromyces/BytecodeParser.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
10
+ declare_meme(:"pegleromyces/BytecodeHelpers.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
11
+ declare_meme(:"pegleromyces/Common/Parser.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
12
+ declare_meme(:"pegleromyces/String/Parser.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
13
+ declare_meme(:"pegleromyces/Stream/Parser.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
14
+ declare_meme(:"pegleromyces/Processor.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
14
15
  )}}.instance