meta_compile 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/bin/meta_compile CHANGED
@@ -22,7 +22,7 @@ if @f
22
22
  end
23
23
  end while false
24
24
  end
25
- def compile_output
25
+ def compile_out
26
26
  begin
27
27
  @i.scan /\s*/; s='<'
28
28
  @f = (@i.peek(s.length) == s) ? (@t=s; @i.pos += s.length) : nil
@@ -112,7 +112,7 @@ if @f
112
112
  @o.print "\n"
113
113
  end
114
114
  break if @f
115
- compile_output
115
+ compile_out
116
116
  if @f
117
117
  @o.print 'if true'
118
118
  @o.print "\n"
@@ -127,7 +127,7 @@ if @f
127
127
  @o.print "\n"
128
128
  end
129
129
  break if @f
130
- compile_output
130
+ compile_out
131
131
  if @f
132
132
  end
133
133
  end while false
@@ -1,22 +1,22 @@
1
1
  .syntax RMetaII
2
2
 
3
- arg = '$' <'@o.print @t'>
3
+ arg = '$' <'@o.print @t'>
4
4
  | .string <'@o.print ' $>;
5
5
 
6
- output = '<' *arg '>' <'@o.print "\n"'>;
6
+ out = '<' *arg '>' <'@o.print "\n"'>;
7
7
 
8
- exp3 = .id <'compile_' $>
9
- | .string <'@i.scan /\s*/; s=' $>
10
- <'@f = (@i.peek(s.length) == s) ? (@t=s; @i.pos += s.length) : nil'>
11
- | '.id' <'@i.scan /\s*/; @f = @t = @i.scan /[A-Za-z]+[A-Za-z0-9_]+/'>
8
+ exp3 = .id <'compile_' $>
9
+ | .string <'@i.scan /\s*/; s=' $>
10
+ <'@f = (@i.peek(s.length) == s) ? (@t=s; @i.pos += s.length) : nil'>
11
+ | '.id' <'@i.scan /\s*/; @f = @t = @i.scan /[A-Za-z]+[A-Za-z0-9_]+/'>
12
12
  | '.string' <'@i.scan /\s*/; @f = @t = @i.scan /\047[^\047]*\047/'>
13
13
  | '(' exp1 ')'
14
- | '.e' <'@f = true'>
14
+ | '.e' <'@f = true'>
15
15
  | '*' <'begin'> exp3 <'end while @f'> <'@f = true'>;
16
16
 
17
- exp2 = ( exp3 <'if @f'> | output <'if true'> )
18
- *( exp3 <'raise("error at: " + @i.rest.split("\n")[0]) if !@f'>
19
- | output ) <'end'>;
17
+ exp2 = ( exp3 <'if @f'> | out <'if true'> )
18
+ *( exp3 <'raise("error at: " + @i.rest.split("\n")[0]) if !@f'>
19
+ | out ) <'end'>;
20
20
 
21
21
  exp1 = <'begin'> exp2
22
22
  *( '|' <'break if @f'> exp2 )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meta_compile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: