Silver / Classes / Parser / silver.lemon

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
%include {
#import "SVParserContext.h"
#import "SVToken.h"
#import "SVSetCommand.h"
#import "SVRegex.h"
#import "SVProtocol.h"
#import "Silver.h"
#import "SVRequireStatement.h"

extern int __sv_numOfAnon;
extern int __sv_numOfAnonTypes;
extern NSMutableDictionary* BridgeSupport;

BOOL __sv_check_for_unary_mistake(id o);
id __sv_unary_mistake_lvalue(id o);
id __sv_unary_mistake_op(id o);
}

%token_prefix TK_
%token_type { SVToken * }
%default_type { id }
%extra_argument { SVParserContext * context }
%token_destructor { CFRelease($$); }

%syntax_error {
    context.errors++;
    NSLog(@"%@:%lu: error at %s token in [",
    context.fileName, context.currentLine, yyTokenName[yymajor]);
 
    int i;
    for(i=1; i<=yypParser->yyidx; i++)
        printf(" %s",yyTokenName[yypParser->yystack[i].major]);

    NSLog(@" | %s ] unexpected '%@'\n",
    yyTokenName[yymajor],[TOKEN tokenData]);
}

%nonassoc YIELD RETURN THROW.
%nonassoc SYMBOL.
%left COMMA.
%right RCOMMA.
%left BEGIN.
%left IF UNLESS WHILE UNTIL.
%left TOR TAND.
%left TNOT.
%right ASSIGN MULASSIGN MODASSIGN DIVASSIGN SUBASSIGN ADDASSIGN ORASSIGN ANDASSIGN XORASSIGN SHLASSIGN SHRASSIGN CONDASSIGNA CONDASSIGNO EXPASSIGN.
%right PASSIGN.
%left FORWARDPIPE.
%right BACKWARDPIPE.
%right QUESTION.
%left IRANGE ERANGE.
%left LOGICALOR.
%left LOGICALXOR.
%left LOGICALAND.
%left COMPARE EQUAL WHENCOMP WHENNOT NOTEQUAL REGEXMATCH REGEXNOMATCH.
%left LESSTHANEQUAL LESSTHAN GREATERTHAN GREATERTHANEQUAL.
%right UPLUS UMINUS REF.
%left BITWISEXOR BITWISEOR.
%left BITWISEAND.
%left SHIFTLEFT SHIFTRIGHT.
%left PLUS MINUS.
%left MULTIPLY DIVIDE MODULUS.
%right NOT BITWISEINVERSE ADDRESSOF PERCENT.
%right EXPONENT.
%left DOT LBRACE LBRACKET BRACKETS BRACKETASSIGN LPAREN HASH RPAREN RBRACKET.
%right COLON.
%left LHS.
%left UNDEF REMOVE DEFINED.
%nonassoc COMMAND.
%nonassoc YIELDBLOCK.
%nonassoc IDENTIFIER NUMBER REGEX STRING.
%nonassoc VARIABLE.
%nonassoc CASE DEFAULT.
%left COPENING.
%left REP.

%start_symbol program

program ::= compstmt(S). { context.result = [SVBlock blockWithStatements:S]; }
program ::= error. { context.result = nil; }

compstmt(C) ::= compstmt(L) stmt(R). [COMMA] { if(R) [L addObject:R]; C = L; }
compstmt(C) ::= stmt(R). [COMMA] { C = R ? CFRetain([NSMutableArray arrayWithObject:R]) : CFRetain([NSMutableArray array]); }

term ::= NEWLINE.
term ::= SEMICOLON.

stmt(S) ::= sstmt(L) term. { S = L; }
stmt ::= term.

sstmt(S) ::= ALIAS alias_item(F) alias_item(T). { S = CFRetain([SVAliasStatement aliasFrom:F to:T]); }
sstmt(S) ::= sstmt(I) IF expr(T). { S = CFRetain([SVIfBlock ifBlockWithTest:T else:nil statements:[NSArray arrayWithObject:I]]); }
sstmt(S) ::= sstmt(I) WHILE expr(T). { S = CFRetain([SVWhileBlock whileBlockWithTest:T statements:[NSArray arrayWithObject:I]]); }
sstmt(S) ::= sstmt(I) UNLESS expr(T). { S = CFRetain([SVUnlessBlock unlessBlockWithTest:T else:nil statements:[NSArray arrayWithObject:I]]); }
sstmt(S) ::= sstmt(I) UNTIL expr(T). { S = CFRetain([SVUntilBlock whileBlockWithTest:T statements:[NSArray arrayWithObject:I]]); }
sstmt(S) ::= mlhs(L) ASSIGN mrhs(R). [PASSIGN] { context.inMRHS = NO; S = CFRetain([SVParallelAssignment parallelAssignmentWithLValues:L rvalues:R]); }
sstmt(S) ::= while_construct_term(W). { S = W; }
sstmt(S) ::= until_construct_term(U). { S = U; }
sstmt(S) ::= for_construct_term(F). { S = F; }
sstmt(S) ::= expr(E). { S = E; }

alias_item(A) ::= IDENTIFIER(I). { A = [I tokenData]; }
alias_item(A) ::= STRING(S). { A = [S tokenData]; }
alias_item(A) ::= symbol(S). { A = [S to_s]; }

comma ::= COMMA.
comma ::= RCOMMA.

expr(E) ::= command(C) DO yield_block(Y). [YIELDBLOCK] {
    SVFunction * func; 
    if([C isKindOfClass:[SVFunction class]]) 
        func = C; 
    else
        func = CFRetain([SVFunction functionCallWithName:C arguments:[NSMutableArray array]]);
    func.yieldFunc = Y; 
    E = func;
}
expr(E) ::= command(C). [COMMAND] { E = C; }
expr(E) ::= RETURN call_args(A). { E = CFRetain([SVReturnStatement returnStatementWithValue:A]); }
expr(E) ::= YIELD call_args(A). { E = CFRetain([SVYieldStatement yieldStatementWithArguments:A]); }
expr(E) ::= THROW arg(A). { E = CFRetain([SVThrowStatement throwStatementWithObject:A]); }
expr(E) ::= expr(L) TAND expr(R). { E = CFRetain([[SVLogicalAndOperator alloc] initWithLeftHandOperand:L rightHandOperand:R]); }
expr(E) ::= expr(L) TOR expr(R). { E = CFRetain([[SVLogicalOrOperator alloc] initWithLeftHandOperand:L rightHandOperand:R]); }
expr(E) ::= TNOT expr(L). { E = CFRetain([[SVLogicalNotOperator alloc] initWithOperand:L]); }
expr(E) ::= THROW LPAREN arg(A) RPAREN. { E = CFRetain([SVThrowStatement throwStatementWithObject:A]); }
expr(E) ::= CONTINUE. { E = CFRetain([SVContinueStatement continueStatement]); }
expr(E) ::= BREAK. { E = CFRetain([SVBreakStatement breakStatement]); }
expr(P) ::= DEF fname(N) argdecl(A) LBRACE compstmt(S) RBRACE. { P = CFRetain([SVFunction functionWithName:N arguments:A statements:S]); }
expr(P) ::= DEF fname(N) LPAREN RPAREN LBRACE compstmt(S) RBRACE. { P = CFRetain([SVFunction functionWithName:N arguments:[NSMutableArray array] statements:S]); }
expr(P) ::= DEF fname(N) LBRACE compstmt(S) RBRACE. { P = CFRetain([SVFunction functionWithName:N arguments:[NSMutableArray array] statements:S]); }
expr(P) ::= DEF singleton(T) DOT fname(N) argdecl(A) LBRACE compstmt(S) RBRACE. { 
    P = CFRetain([SVClassFunction functionWithName:N arguments:A statements:S singleton:T]); 
}
expr(P) ::= DEF singleton(T) DOT fname(N) LPAREN RPAREN LBRACE compstmt(S) RBRACE. { 
    P = CFRetain([SVClassFunction functionWithName:N arguments:[NSMutableArray array] statements:S singleton:T]); 
}
expr(P) ::= DEF singleton(T) DOT fname(N) LBRACE compstmt(S) RBRACE. {
    P = CFRetain([SVClassFunction functionWithName:N arguments:[NSMutableArray array] statements:S singleton:T]); 
}
expr(P) ::= switch_construct(S). { P = S; }
expr(P) ::= while_construct(W). { P = W; }
expr(P) ::= until_construct(U). { P = U; }
expr(P) ::= do_while_construct(D). { P = D; }
expr(P) ::= if_else_construct(I). { P = I; }
expr(P) ::= unless_construct(U). { P = U; }
expr(P) ::= for_construct(F). { P = F; }
expr(P) ::= for_in_construct(F). { P = F; }
expr(P) ::= rescue_construct(R). { P = R; }
expr(P) ::= sync_construct(S). { P = S; }
expr(P) ::= class_declaration(D). { P = D; }
expr(P) ::= class_opening(O). { P = O; }
expr(P) ::= protocol_declaration(D). { P = D; }
expr(E) ::= arg(A). [COMMA] { E = A; }

singleton(S) ::= variable(V). { S = V; }
singleton(S) ::= LPAREN expr(E) RPAREN. { S = E; }

mlhs(M) ::= mlhs(L) comma MULTIPLY lhs(V). { [L addObject:[SVWildcardLHS wildcardWithLhs:V]]; M = L; }
mlhs(M) ::= mlhs(L) comma mlhs_item(V). [LHS] { [L addObject:V]; M = L; }
mlhs(M) ::= MULTIPLY lhs(V). [PASSIGN] { M = CFRetain([NSMutableArray arrayWithObject:[SVWildcardLHS wildcardWithLhs:V]]); }
mlhs(M) ::= mlhs_item(V). [LHS] { M = CFRetain([NSMutableArray arrayWithObject:V]); }

mlhs_item(I) ::= lhs(L). [LHS] { I = L; }
mlhs_item(I) ::= LPAREN mlhs(M) RPAREN. { I = M; }

mrhs(M) ::= mrhs(L) comma MULTIPLY lhs(V). { 
    [L addObject:[SVWildcardLHS wildcardWithLhs:V]];
    M = L;
}
mrhs(M) ::= mrhs(L) comma expr(E). { [L addObject:E]; M = L; }
mrhs(M) ::= MULTIPLY lhs(V). [DEFINED] { M = CFRetain([NSMutableArray arrayWithObject:[SVWildcardLHS wildcardWithLhs:V]]); }
mrhs(M) ::= expr(E). [DEFINED] { M = CFRetain([NSMutableArray arrayWithObject:E]); }

yield_block(Y) ::= LBRACE BITWISEOR arglist(A) BITWISEOR compstmt(S) RBRACE. [YIELDBLOCK] { Y = CFRetain([SVFunction functionWithName:[NSString stringWithFormat:@"_$$yieldBlock$$%d",__sv_numOfAnon++] arguments:A statements:S]); }
yield_block(Y) ::= LBRACE compstmt(S) RBRACE. [YIELDBLOCK] { Y = CFRetain([SVFunction functionWithName:[NSString stringWithFormat:@"_$$yieldBlock$$%d",__sv_numOfAnon++] arguments:[NSMutableArray array] statements:S]); }

command(C) ::= primary(P) call_args(A). [COMMA] {
    if(__sv_check_for_unary_mistake(Z_(A))) {
        O_(P,__sv_unary_mistake_lvalue(Z_(A)),__sv_unary_mistake_op(Z_(A)),C);
    } else {
        C = CFRetain([SVFunction functionCallWithName:P arguments:A]); 
    }
}

function(F) ::= primary(P) LPAREN call_args(A) RPAREN. { F = CFRetain([SVFunction functionCallWithName:P arguments:A]); }
function(F) ::= primary(P) LPAREN RPAREN. { F = CFRetain([SVFunction functionCallWithName:P arguments:[NSMutableArray array]]); }

call_args(C) ::= call_args(A) comma named_arg(X). { [A addObject:X]; C = A; }
call_args(C) ::= named_arg(X). { C = CFRetain([NSMutableArray arrayWithObject:X]); }
call_args(C) ::= hash(X). { C = CFRetain([NSMutableArray arrayWithObject:[SVFunctionArgument argumentWithName:nil value:[SVCreateDictionaryStatement statementWithKeyValuePairs:[NSArray arrayWithObject:X]]]]); }

named_arg(A) ::= primary(V) COLON arg(X). [COLON] { A = CFRetain([SVFunctionArgument argumentWithName:V_(V) value:X]); }
named_arg(A) ::= arg(X). [DOT] { A = CFRetain([SVFunctionArgument argumentWithName:nil value:X]); }

arg(A) ::= CONST lhs(N) ASSIGN arg(V). { context.inMRHS = NO; A = CFRetain([SVVariableAssignment variableAssignmentWithName:N value:V isConst:YES]); }
arg(A) ::= SET lhs(N) ASSIGN arg(V). { 
    context.inMRHS = NO;
    SVVariableAssignment * asgn = [SVVariableAssignment variableAssignmentWithName:N value:V]; 
    A = CFRetain([SVSetCommand commandWithAssignment:asgn]);
}
arg(A) ::= lhs(N) ASSIGN arg(V). { context.inMRHS = NO; A = CFRetain([SVVariableAssignment variableAssignmentWithName:N value:V]); }
arg(A) ::= lhs(N) op_asgn(O) arg(V). [ASSIGN] {
    SVVariableAssignment * asgn = [SVVariableAssignment variableAssignmentWithName:N value:V];
    asgn.op = O;
    A = CFRetain(asgn);
}
arg(A) ::= arg(L) PLUS arg(R). { O_(L,R,@"+",A); }
arg(A) ::= arg(L) MINUS arg(R). { O_(L,R,@"-",A); }
arg(A) ::= arg(L) MULTIPLY arg(R). { O_(L,R,@"*",A); }
arg(A) ::= arg(L) MODULUS arg(R). { O_(L,R,@"%",A); }
arg(A) ::= arg(L) DIVIDE arg(R). { O_(L,R,@"/",A); }
arg(A) ::= arg(L) BITWISEOR arg(R). { O_(L,R,@"|",A); }
arg(A) ::= arg(L) ERANGE arg(R). { O_(L,R,@"...",A); }
arg(A) ::= arg(L) IRANGE arg(R). { O_(L,R,@"..",A); }
arg(A) ::= arg(L) BITWISEXOR arg(R). { O_(L,R,@"^",A); }
arg(A) ::= arg(L) BITWISEAND arg(R). { O_(L,R,@"&",A); }
arg(A) ::= arg(L) COMPARE arg(R). { O_(L,R,@"<=>",A); }
arg(A) ::= arg(L) GREATERTHAN arg(R). { O_(L,R,@">",A); }
arg(A) ::= arg(L) GREATERTHANEQUAL arg(R). { O_(L,R,@">=",A); }
arg(A) ::= arg(L) LESSTHAN arg(R). { O_(L,R,@"<",A); }
arg(A) ::= arg(L) LESSTHANEQUAL arg(R). { O_(L,R,@"<=",A); }
arg(A) ::= arg(L) EQUAL arg(R). { O_(L,R,@"==",A); }
arg(A) ::= arg(L) NOTEQUAL arg(R). { N_(L,R,@"==",A); }
arg(A) ::= arg(L) REGEXMATCH arg(R). { O_(L,R,@"=~",A); }
arg(A) ::= arg(L) REGEXNOMATCH arg(R). { N_(L,R,@"=~",A); }
arg(A) ::= arg(L) WHENCOMP arg(R). { O_(L,R,@"===",A); }
arg(A) ::= arg(L) WHENNOT arg(R). { N_(L,R,@"===",A); }
arg(A) ::= NOT arg(L). { A = CFRetain([[SVLogicalNotOperator alloc] initWithOperand:L]); }
arg(A) ::= BITWISEINVERSE arg(L). { A = CFRetain([[SVBitwiseInverseOperator alloc] initWithOperand:L]); }
arg(A) ::= BITWISEAND arg(V). [REF] { A = CFRetain([SVAddressReference addressReferenceWithObject:V]); }
arg(A) ::= BITWISEAND LBRACE IDENTIFIER(T) RBRACE arg(V). [REF] { A = CFRetain([SVAddressReference addressReferenceWithObject:V typeString:[T tokenData]]); }
arg(A) ::= BITWISEAND LBRACE MULTIPLY RBRACE arg(V). [REF] { A = CFRetain([SVAddressReference addressReferenceWithObject:V typeString:@"*"]); }
arg(A) ::= arg(L) PERCENT. { O_(L,N(100),@"/",A); }
arg(A) ::= arg(L) SHIFTLEFT arg(R). { O_(L,R,@"<<",A); }
arg(A) ::= arg(L) SHIFTRIGHT arg(R). { O_(L,R,@">>",A); }
arg(A) ::= arg(L) LOGICALAND arg(R). { A = CFRetain([[SVLogicalAndOperator alloc] initWithLeftHandOperand:L rightHandOperand:R]); }
arg(A) ::= arg(L) LOGICALOR arg(R). { A = CFRetain([[SVLogicalOrOperator alloc] initWithLeftHandOperand:L rightHandOperand:R]); }
arg(A) ::= arg(L) LOGICALXOR arg(R). { A = CFRetain([[SVLogicalXorOperator alloc] initWithLeftHandOperand:L rightHandOperand:R]); }
arg(A) ::= arg(L) FORWARDPIPE arg(R). { A = CFRetain([SVFunction functionCallWithName:R arguments:[NSMutableArray arrayWithObject:[SVFunctionArgument argumentWithName:nil value:L]]]); }
arg(A) ::= arg(L) BACKWARDPIPE arg(R). { A = CFRetain([SVFunction functionCallWithName:L arguments:[NSMutableArray arrayWithObject:[SVFunctionArgument argumentWithName:nil value:R]]]); }
arg(A) ::= DEFINED IDENTIFIER(I). { A = CFRetain([SVDefinedStatement statementWithVariable:[I tokenData]]); }
arg(A) ::= DEFINED LPAREN IDENTIFIER(I) RPAREN. { A = CFRetain([SVDefinedStatement statementWithVariable:[I tokenData]]); }
arg(A) ::= DEFINED symbol(S). { A = CFRetain([SVDefinedStatement statementWithVariable:[S to_s]]); }
arg(A) ::= DEFINED LPAREN symbol(S) RPAREN. { A = CFRetain([SVDefinedStatement statementWithVariable:[S to_s]]); }
arg(A) ::= UNDEF arg(L). { A = CFRetain([SVMethodChange methodChangeWithMethod:L isRemove:NO]); }
arg(A) ::= REMOVE arg(L). { A = CFRetain([SVMethodChange methodChangeWithMethod:L isRemove:YES]); }
arg(A) ::= YIELD. { A = CFRetain([SVYieldStatement yieldStatementWithArguments:nil]); }
arg(A) ::= YIELD LPAREN call_args(L) RPAREN. { A = CFRetain([SVYieldStatement yieldStatementWithArguments:L]); }
arg(A) ::= REQUIRE LPAREN arg(P) RPAREN. { A = CFRetain([SVRequireStatement requireStatementWithPath:P]); }
arg(A) ::= RETURN. [COMMA] { A = CFRetain([SVReturnStatement returnStatementWithValue:nil]); }
arg(A) ::= RETURN LPAREN call_args(L) RPAREN. { A = CFRetain([SVReturnStatement returnStatementWithValue:L]); }
arg(A) ::= arg(L) EXPONENT arg(R). { O_(L,R,@"**",A); }
arg(A) ::= PLUS arg(L). [UPLUS] { U_(L,@"+@",A); }
arg(A) ::= MINUS arg(L). [UMINUS] { U_(L,@"-@",A); }
arg(P) ::= arg(L) LBRACKET call_args(A) RBRACKET. [LBRACKET] {
    SVInstanceRef * ref = [SVInstanceRef refWithLValue:L key:@"[]"]; 
    P = CFRetain([SVFunction functionCallWithName:ref arguments:A]);
}
arg(A) ::= arg(T) QUESTION arg(I) COLON arg(E). { 
    A = CFRetain([SVIfBlock ifBlockWithTest:T else:[SVBlock blockWithStatements:[NSArray arrayWithObject:E]] 
                                                                    statements:[NSArray arrayWithObject:I]]);
}
arg(A) ::= REP arg(O) REPF arg(F) COLON arg(T) RBRACE. [REP] {
    A = CFRetain([SVStringRepStatement statementWithObject:O replace:F with:T]);
}
arg(P) ::= LPAREN expr(E) RPAREN. { P = E; }
arg(A) ::= primary(P). [COMMA] { A = P; }

primary(P) ::= LAMBDA LPAREN arglist(A) RPAREN LBRACE compstmt(S) RBRACE. {
    SVFunction * func = [SVFunction functionWithName:[NSString stringWithFormat:@"_$$anonFunc$$%d",__sv_numOfAnon++] arguments:A statements:S];
    P = CFRetain(func);
}
primary(P) ::= LAMBDA LPAREN RPAREN LBRACE compstmt(S) RBRACE. {
    SVFunction * func = [SVFunction functionWithName:[NSString stringWithFormat:@"_$$anonFunc$$%d",__sv_numOfAnon++] arguments:[NSMutableArray array] statements:S];
    P = CFRetain(func);
}
primary(P) ::= LAMBDA LBRACE compstmt(S) RBRACE. {
    SVFunction * func = [SVFunction functionWithName:[NSString stringWithFormat:@"_$$anonFunc$$%d",__sv_numOfAnon++] arguments:[NSMutableArray array] statements:S];
    P = CFRetain(func);
}
primary(P) ::= function(F). [YIELDBLOCK] { P = F; }
primary(P) ::= primary(F) yield_block(Y). [YIELDBLOCK] { 
    SVFunction * func; 
    if([F isKindOfClass:[SVFunction class]]) 
        func = F; 
    else
        func = CFRetain([SVFunction functionCallWithName:F arguments:[NSMutableArray array]]);
    func.yieldFunc = Y; 
    P = func; 
}
primary(P) ::= array(A). { P = A; }
primary(P) ::= STRINGARRAY(A). { P = CFRetain([[A tokenData] componentsSeparatedByString:@" "]); }
primary(P) ::= hashes(H). [HASH] { P = H; }
primary(P) ::= literal(L). { P = L; }
primary(P) ::= anonymous_class_declaration(D). { P = D; }
primary(P) ::= CONTEXT. { P = CFRetain([[SVContextGrab alloc] init]); }
primary(P) ::= lhs(L). [DOT] { P = L; }

instance_ref(R) ::= primary(P) DOT IDENTIFIER(N). { R = CFRetain([SVInstanceRef refWithLValue:P key:[N tokenData]]); }
instance_ref(R) ::= primary(P) DOT CLASS. { R = CFRetain([SVInstanceRef refWithLValue:P key:@"class"]); }

class_declaration(D) ::= CLASS IDENTIFIER(N) LESSTHAN IDENTIFIER(P) GREATERTHAN identifiers(L) LBRACE compstmt(B) RBRACE. {
    D = CFRetain([SVClass classWithName:[N tokenData] parent:[P tokenData] protocols:L contents:B]);
}
class_declaration(D) ::= CLASS IDENTIFIER(N) LESSTHAN IDENTIFIER(P) LBRACE compstmt(B) RBRACE. {
    D = CFRetain([SVClass classWithName:[N tokenData] parent:[P tokenData] protocols:nil contents:B]);
}
class_declaration(D) ::= CLASS IDENTIFIER(N) GREATERTHAN identifiers(L) LBRACE compstmt(B) RBRACE. {
    D = CFRetain([SVClass classWithName:[N tokenData] parent:nil protocols:L contents:B]);
}
class_declaration(D) ::= CLASS IDENTIFIER(N) LBRACE compstmt(S) RBRACE. {
    if(NSClassFromString([N tokenData]) != nil) {
        D = CFRetain([SVCategory categoryForClass:[N tokenData] contents:S]);
    } else {
        D = CFRetain([SVClass classWithName:[N tokenData] parent:nil protocols:nil contents:S]);
    }
}

protocol_declaration(D) ::= PROTOCOL IDENTIFIER(N) LESSTHAN IDENTIFIER(P) GREATERTHAN identifiers(L) LBRACE pcompstmt(B) RBRACE. {
    D = CFRetain([SVProtocol classWithName:[N tokenData] parent:[P tokenData] protocols:L contents:B]);
}
protocol_declaration(D) ::= PROTOCOL IDENTIFIER(N) LESSTHAN IDENTIFIER(P) LBRACE pcompstmt(B) RBRACE. {
    D = CFRetain([SVProtocol classWithName:[N tokenData] parent:[P tokenData] protocols:nil contents:B]);
}
protocol_declaration(D) ::= PROTOCOL IDENTIFIER(N) GREATERTHAN identifiers(L) LBRACE pcompstmt(B) RBRACE. {
    D = CFRetain([SVProtocol classWithName:[N tokenData] parent:nil protocols:L contents:B]);
}
protocol_declaration(D) ::= PROTOCOL IDENTIFIER(N) LBRACE pcompstmt(S) RBRACE. {
    D = CFRetain([SVProtocol classWithName:[N tokenData] parent:nil protocols:nil contents:S]);
}

pcompstmt(C) ::= pcompstmt(L) pstmt(R). [COMMA] { if(R) [L addObject:R]; C = L; }
pcompstmt(C) ::= pstmt(R). [COMMA] { C = R ? CFRetain([NSMutableArray arrayWithObject:R]) : CFRetain([NSMutableArray array]); }

pstmt(P) ::= REQ fname(N) argdecl(A) term. { P = CFRetain([SVProtocolMethod functionWithName:N arguments:A statements:nil]); }
pstmt(P) ::= REQ fname(N) LPAREN RPAREN term. { P = CFRetain([SVProtocolMethod functionWithName:N arguments:[NSMutableArray array] statements:nil]); }
pstmt(P) ::= REQ fname(N) term. { P = CFRetain([SVProtocolMethod functionWithName:N arguments:[NSMutableArray array] statements:nil]); }
pstmt(P) ::= REQ singleton DOT fname(N) argdecl(A) term. { 
    P = CFRetain([SVProtocolMethod functionWithName:N arguments:A statements:nil]);
    [P setIsClass:YES];
}
pstmt(P) ::= REQ singleton DOT fname(N) LPAREN RPAREN term. { 
    P = CFRetain([SVProtocolMethod functionWithName:N arguments:[NSMutableArray array] statements:nil]); 
    [P setIsClass:YES];
}
pstmt(P) ::= REQ singleton DOT fname(N) term. {
    P = CFRetain([SVProtocolMethod functionWithName:N arguments:[NSMutableArray array] statements:nil]);
    [P setIsClass:YES];
}
pstmt(P) ::= OPT fname(N) argdecl(A) term. { 
    P = CFRetain([SVProtocolMethod functionWithName:N arguments:A statements:nil]); 
    [P setIsOptional:YES];
}
pstmt(P) ::= OPT fname(N) LPAREN RPAREN term. { 
    P = CFRetain([SVProtocolMethod functionWithName:N arguments:[NSMutableArray array] statements:nil]); 
    [P setIsOptional:YES];
}
pstmt(P) ::= OPT fname(N) term. { 
    P = CFRetain([SVProtocolMethod functionWithName:N arguments:[NSMutableArray array] statements:nil]); 
    [P setIsOptional:YES];
}
pstmt(P) ::= OPT singleton DOT fname(N) argdecl(A) term. { 
    P = CFRetain([SVProtocolMethod functionWithName:N arguments:A statements:nil]);
    [P setIsClass:YES];
    [P setIsOptional:YES];
}
pstmt(P) ::= OPT singleton DOT fname(N) LPAREN RPAREN term. { 
    P = CFRetain([SVProtocolMethod functionWithName:N arguments:[NSMutableArray array] statements:nil]); 
    [P setIsClass:YES];
    [P setIsOptional:YES];
}
pstmt(P) ::= OPT singleton DOT fname(N) term. {
    P = CFRetain([SVProtocolMethod functionWithName:N arguments:[NSMutableArray array] statements:nil]);
    [P setIsClass:YES];
    [P setIsOptional:YES];
}

class_opening(O) ::= CLASS SHIFTLEFT arg(A) term LBRACE compstmt(S) RBRACE. [COPENING] { O = CFRetain([SVClass classWithName:(NSString*)A parent:nil protocols:nil contents:S]); }

anonymous_class_declaration(D) ::= LPAREN LBRACE LESSTHAN IDENTIFIER(P) GREATERTHAN identifiers(L) compstmt(B) RBRACE RPAREN. {
    D = CFRetain([SVClass classWithName:[NSString stringWithFormat:@"_SVAnonType%d",__sv_numOfAnonTypes++] parent:[P tokenData] protocols:L contents:B]);
}
anonymous_class_declaration(D) ::= LPAREN LBRACE LESSTHAN IDENTIFIER(P) compstmt(B) RBRACE RPAREN. {
    D = CFRetain([SVClass classWithName:[NSString stringWithFormat:@"_SVAnonType%d",__sv_numOfAnonTypes++] parent:[P tokenData] protocols:nil contents:B]);
}
anonymous_class_declaration(D) ::= LPAREN LBRACE GREATERTHAN identifiers(L) compstmt(B) RBRACE RPAREN. {
    D = CFRetain([SVClass classWithName:[NSString stringWithFormat:@"_SVAnonType%d",__sv_numOfAnonTypes++] parent:nil protocols:L contents:B]);
}
anonymous_class_declaration(D) ::= LPAREN LBRACE compstmt(B) RBRACE RPAREN. {
    D = CFRetain([SVClass classWithName:[NSString stringWithFormat:@"_SVAnonType%d",__sv_numOfAnonTypes++] parent:nil protocols:nil contents:B]);
}

switch_construct(S) ::= SWITCH expr(T) LBRACE term case_blocks(C) default_block(D) term RBRACE. {
    S = CFRetain([SVSwitchBlock switchBlockWithExpression:T caseBlocks:C default:D]);
}
switch_construct(S) ::= SWITCH expr(T) LBRACE term case_blocks(C) term default_block(D) term RBRACE. {
    S = CFRetain([SVSwitchBlock switchBlockWithExpression:T caseBlocks:C default:D]);
}
switch_construct(S) ::= SWITCH expr(T) LBRACE term case_blocks(C) term RBRACE. {
    S = CFRetain([SVSwitchBlock switchBlockWithExpression:T caseBlocks:C default:nil]);
}
switch_construct(S) ::= SWITCH expr(T) LBRACE term case_blocks(C) default_block(D) RBRACE. {
    S = CFRetain([SVSwitchBlock switchBlockWithExpression:T caseBlocks:C default:D]);
}
switch_construct(S) ::= SWITCH expr(T) LBRACE term case_blocks(C) term default_block(D) RBRACE. {
    S = CFRetain([SVSwitchBlock switchBlockWithExpression:T caseBlocks:C default:D]);
}
switch_construct(S) ::= SWITCH expr(T) LBRACE term case_blocks(C) RBRACE. {
    S = CFRetain([SVSwitchBlock switchBlockWithExpression:T caseBlocks:C default:nil]);
}
switch_construct(S) ::= SWITCH expr(T) LBRACE case_blocks(C) default_block(D) term RBRACE. {
    S = CFRetain([SVSwitchBlock switchBlockWithExpression:T caseBlocks:C default:D]);
}
switch_construct(S) ::= SWITCH expr(T) LBRACE case_blocks(C) term default_block(D) term RBRACE. {
    S = CFRetain([SVSwitchBlock switchBlockWithExpression:T caseBlocks:C default:D]);
}
switch_construct(S) ::= SWITCH expr(T) LBRACE case_blocks(C) term RBRACE. {
    S = CFRetain([SVSwitchBlock switchBlockWithExpression:T caseBlocks:C default:nil]);
}
switch_construct(S) ::= SWITCH expr(T) LBRACE case_blocks(C) default_block(D) RBRACE. {
    S = CFRetain([SVSwitchBlock switchBlockWithExpression:T caseBlocks:C default:D]);
}
switch_construct(S) ::= SWITCH expr(T) LBRACE case_blocks(C) term default_block(D) RBRACE. {
    S = CFRetain([SVSwitchBlock switchBlockWithExpression:T caseBlocks:C default:D]);
}
switch_construct(S) ::= SWITCH expr(T) LBRACE case_blocks(C) RBRACE. {
    S = CFRetain([SVSwitchBlock switchBlockWithExpression:T caseBlocks:C default:nil]);
}

case_blocks(S) ::= case_blocks(L) term case_block(R). { [L addObject:R]; S = L; }
case_blocks(S) ::= case_blocks(L) case_block(R). { [L addObject:R]; S = L; }
case_blocks(S) ::= case_block(R). { S = CFRetain([NSMutableArray arrayWithObject:R]); }

case_block(S) ::= CASE arg(A) COLON LBRACE compstmt(B) RBRACE. { S = CFRetain([SVCaseBlock caseBlockWithTest:A statements:B]); }

default_block(D) ::= DEFAULT COLON LBRACE compstmt(S) RBRACE. { D = CFRetain([SVBlock blockWithStatements:S]); }

while_construct(W) ::= WHILE expr(T) LBRACE compstmt(S) RBRACE. { W = CFRetain([SVWhileBlock whileBlockWithTest:T statements:S]); }
while_construct_term(W) ::= WHILE expr(T). { W = CFRetain([SVWhileBlock whileBlockWithTest:T statements:nil]); }

until_construct(U) ::= UNTIL expr(T) LBRACE compstmt(S) RBRACE. { U = CFRetain([SVUntilBlock whileBlockWithTest:T statements:S]); }
until_construct_term(U) ::= UNTIL expr(T). { U = CFRetain([SVUntilBlock whileBlockWithTest:T statements:nil]); }

do_while_construct(D) ::= DO LBRACE compstmt(S) RBRACE WHILE expr(T). { D = CFRetain([SVDoWhileBlock whileBlockWithTest:T statements:S]); }

if_else_construct(I) ::= IF expr(T) LBRACE compstmt(S) RBRACE else_part(E). { I = CFRetain([SVIfBlock ifBlockWithTest:T else:E statements:S]); }
if_else_construct(I) ::= IF expr(T) LBRACE compstmt(S) RBRACE. { I = CFRetain([SVIfBlock ifBlockWithTest:T else:nil statements:S]); }

else_part(E) ::= ELSE if_else_construct(I). { E = I; }
else_part(E) ::= ELSE unless_construct(U). { E = U; }
else_part(E) ::= ELSE LBRACE compstmt(S) RBRACE. { E = CFRetain([SVBlock blockWithStatements:S]); }

unless_construct(U) ::= UNLESS expr(T) LBRACE compstmt(S) RBRACE else_part(E). { U = CFRetain([SVUnlessBlock unlessBlockWithTest:T else:E statements:S]); }
unless_construct(U) ::= UNLESS expr(T) LBRACE compstmt(S) RBRACE. { U = CFRetain([SVUnlessBlock unlessBlockWithTest:T else:nil statements:S]); }

for_construct(F) ::= FOR LPAREN expr(I) SEMICOLON expr(T) SEMICOLON expr(P) RPAREN LBRACE compstmt(S) RBRACE. {
    F = CFRetain([SVForBlock forBlockWithInit:I test:T step:P statements:S]);
}
for_construct_term(F) ::= FOR LPAREN expr(I) SEMICOLON expr(T) SEMICOLON expr(P) RPAREN. {
    F = CFRetain([SVForBlock forBlockWithInit:I test:T step:P statements:nil]);
}

for_in_construct(F) ::= FOR LPAREN IDENTIFIER(V) IN expr(E) RPAREN LBRACE compstmt(S) RBRACE. {
    F = CFRetain([SVForInBlock forInBlockWithVarName:[V tokenData] expr:E statements:S]);
}

rescue_construct(R) ::= BEGIN LBRACE compstmt(S) RBRACE rescue_blocks(C) rescue_else_block(E) ensure_block(N). {
    R = CFRetain([SVExceptionSystem exceptionSystemWithTryBlock:[SVBlock blockWithStatements:S] catchBlocks:C finallyBlock:N elseBlock:E]);
}

rescue_blocks(B) ::= rescue_blocks(L) rescue_block(R). { [L addObject:R]; B = L; }
rescue_blocks(B) ::= . { B = CFRetain([NSMutableArray array]); }

rescue_block(B) ::= RESCUE identifiers(I) HASH IDENTIFIER(V) LBRACE compstmt(S) RBRACE. {
    SVCatchBlock * block = [SVCatchBlock catchBlockWithType:I statements:S];
    block.varName = [V tokenData];
    B = CFRetain(block);
}
rescue_block(B) ::= RESCUE identifiers(I) LBRACE compstmt(S) RBRACE. {
    SVCatchBlock * block = [SVCatchBlock catchBlockWithType:I statements:S];
    block.varName = @"$#";
    B = CFRetain(block);
}

rescue_else_block(E) ::= ELSE LBRACE compstmt(S) RBRACE. { E = CFRetain([SVBlock blockWithStatements:S]); }
rescue_else_block(E) ::= . { E = nil; }

ensure_block(N) ::= ENSURE LBRACE compstmt(S) RBRACE. { N = CFRetain([SVBlock blockWithStatements:S]); }
ensure_block(N) ::= . { N = nil; }

identifiers(I) ::= identifiers(L) comma IDENTIFIER(R). { [L addObject:[R tokenData]]; I = L; }
identifiers(I) ::= IDENTIFIER(R). { I = CFRetain([NSMutableArray arrayWithObject:[R tokenData]]); }

sync_construct(S) ::= SYNC LPAREN variable(V) RPAREN LBRACE compstmt(B) RBRACE. { S = CFRetain([SVSyncBlock syncBlockWithVariable:V statements:B]); }

argdecl(D) ::= LPAREN arglist(A) RPAREN. { D = A; }
argdecl(D) ::= arglist(A) term. { D = A; }

arglist(A) ::= iarglist(L) comma MULTIPLY IDENTIFIER(I) comma BITWISEAND IDENTIFIER(F). { 
    SVFunctionArgument * arg = [SVFunctionArgument argumentWithName:[I tokenData]]; 
    arg.isVarArgs = YES;
    [L addObject:arg];
    SVFunctionArgument * block = [SVFunctionArgument argumentWithName:[F tokenData]];
    block.isFunction = YES;
    [L addObject:block];
    A = L; 
}
arglist(A) ::= iarglist(L) comma BITWISEAND IDENTIFIER(F). {
    SVFunctionArgument * block = [SVFunctionArgument argumentWithName:[F tokenData]];
    block.isFunction = YES;
    [L addObject:block];
    A = L; 
}
arglist(A) ::= iarglist(L) comma MULTIPLY IDENTIFIER(I). { 
    SVFunctionArgument * arg = [SVFunctionArgument argumentWithName:[I tokenData]]; 
    arg.isVarArgs = YES;
    [L addObject:arg];
    A = L; 
}
arglist(A) ::= iarglist(L). { A = L; }
arglist(A) ::= MULTIPLY IDENTIFIER(I) comma BITWISEAND IDENTIFIER(F). {
    NSMutableArray * a = [NSMutableArray array];
    SVFunctionArgument * arg = [SVFunctionArgument argumentWithName:[I tokenData]]; 
    arg.isVarArgs = YES;
    [a addObject:arg];
    SVFunctionArgument * block = [SVFunctionArgument argumentWithName:[F tokenData]];
    block.isFunction = YES;
    [a addObject:block];
    A = CFRetain(a);
}
arglist(A) ::= MULTIPLY IDENTIFIER(I). {
    SVFunctionArgument * arg = [SVFunctionArgument argumentWithName:[I tokenData]]; 
    arg.isVarArgs = YES;
    A = CFRetain([NSMutableArray arrayWithObject:arg]);
}
arglist(A) ::= BITWISEAND IDENTIFIER(F). {
    SVFunctionArgument * block = [SVFunctionArgument argumentWithName:[F tokenData]];
    block.isFunction = YES;
    A = CFRetain([NSMutableArray arrayWithObject:block]);
}

array(A) ::= LBRACKET array_parts(P) RBRACKET. { A = CFRetain([SVCreateArrayStatement statementWithValues:P]); }
array(A) ::= BRACKETS. { A = CFRetain([SVCreateArrayStatement statement]); }

array_parts(P) ::= array_parts(L) comma array_part(R). { [L addObject:R]; P = L; }
array_parts(P) ::= array_part(R). { P = CFRetain([NSMutableArray arrayWithObject:R]); }

array_part(P) ::= arg(A). [COMMA] { P = A; }

hashes(H) ::= LBRACE hash_parts(P) RBRACE. [HASH] { H = CFRetain([SVCreateDictionaryStatement statementWithKeyValuePairs:P]); }
hashes(H) ::= LBRACE RBRACE. [HASH] { H = CFRetain([SVCreateDictionaryStatement statement]); }

hash_parts(P) ::= hash_parts(L) comma hash(R). { [L addObject:R]; P = L; }
hash_parts(P) ::= hash(R). { P = CFRetain([NSMutableArray arrayWithObject:R]); }

hash(A) ::= arg(L) HASH arg(R). { A = CFRetain([SVKeyValuePair nodeWithObject:R key:L]); }

iarglist(A) ::= iarglist(L) comma darg(X). { [L addObject:X]; A = L; }
iarglist(A) ::= darg(X). { A = CFRetain([NSMutableArray arrayWithObject:X]); }

darg(D) ::= IDENTIFIER(I). { D = CFRetain([SVFunctionArgument argumentWithName:[I tokenData]]); }
darg(D) ::= IDENTIFIER(I) ASSIGN arg(E). { 
    SVFunctionArgument * arg = [SVFunctionArgument argumentWithName:[I tokenData]]; 
    arg.hasDefault = YES;
    arg.defaultValue = E;
    D = CFRetain(arg);
}
darg(D) ::= IDENTIFIER(S) COLON IDENTIFIER(I). {
    SVFunctionArgument * arg = [SVFunctionArgument argumentWithName:[I tokenData]];
    arg.selName = [S tokenData];
    D = CFRetain(arg);
}
darg(D) ::= IDENTIFIER(S) COLON IDENTIFIER(I) ASSIGN arg(E). {
    SVFunctionArgument * arg = [SVFunctionArgument argumentWithName:[I tokenData]];
    arg.selName = [S tokenData];
    arg.hasDefault = YES;
    arg.defaultValue = E;
    D = CFRetain(arg);
}

literal(L) ::= NUMBER(N). { L = CFRetain([N tokenData]); }
literal(L) ::= STRING(S). { L = CFRetain([SVCreateStringStatement statementWithString:[S tokenData]]); }
literal(L) ::= REGEX(R). { L = [SVRegex compile:[R tokenData]]; if(!L) L = __sv_nil; else L = CFRetain(L); }
literal(L) ::= SELECTOR(S). { L = CFRetain([S tokenData]); }
literal(L) ::= symbol(S). [SYMBOL] { L = S; }
literal(L) ::= NIL. { L = __sv_nil; }
literal(L) ::= TRUE. { L = CFRetain(BL(YES)); }
literal(L) ::= FALSE. { L = CFRetain(BL(NO)); }

symbol(S) ::= COLON IDENTIFIER(I). [SYMBOL] { S = CFRetain([[SVSymbolTable sharedTable] symbolWithName:[I tokenData]]); }
symbol(S) ::= COLON STRING(V). [SYMBOL] { S = CFRetain([[SVSymbolTable sharedTable] symbolWithName:[V tokenData]]); }

op_asgn(O) ::= ADDASSIGN. { O = CFRetain(@"+="); }
op_asgn(O) ::= SUBASSIGN. { O = CFRetain(@"-="); }
op_asgn(O) ::= MULASSIGN. { O = CFRetain(@"*="); }
op_asgn(O) ::= DIVASSIGN. { O = CFRetain(@"/="); }
op_asgn(O) ::= MODASSIGN. { O = CFRetain(@"%="); }
op_asgn(O) ::= EXPASSIGN. { O = CFRetain(@"**="); }
op_asgn(O) ::= SHLASSIGN. { O = CFRetain(@"<<="); }
op_asgn(O) ::= SHRASSIGN. { O = CFRetain(@">>="); }
op_asgn(O) ::= ANDASSIGN. { O = CFRetain(@"&="); }
op_asgn(O) ::= ORASSIGN. { O = CFRetain(@"|="); }
op_asgn(O) ::= XORASSIGN. { O = CFRetain(@"^="); }
op_asgn(O) ::= CONDASSIGNO. { O = CFRetain(@"||="); }
op_asgn(O) ::= CONDASSIGNA. { O = CFRetain(@"&&="); }


lhs(L) ::= variable(V). { L = CFRetain(V); }
lhs(L) ::= primary(P) LBRACKET call_args(A) RBRACKET. [ASSIGN] { 
    SVInstanceRef * ref = [SVInstanceRef refWithLValue:P key:@"[]"]; 
    L = CFRetain([SVFunction functionCallWithName:ref arguments:A]);
}
lhs(L) ::= instance_ref(R). [ASSIGN] { L = R; }

variable(V) ::= IDENTIFIER(I). { V = CFRetain([SVVariable variableWithName:[I tokenData]]); }
variable(V) ::= POUND. { V = CFRetain([SVVariable variableWithName:@"#"]); }
variable(V) ::= EXCEPTION. { V = CFRetain([SVVariable variableWithName:@"$#"]); }
variable(V) ::= SELF. { V = CFRetain([SVVariable variableWithName:@"self"]); }
variable(V) ::= SUPER. { V = CFRetain([SVVariable variableWithName:@"super"]); }

fname(F) ::= IDENTIFIER(I). { F = CFRetain([I tokenData]); }
fname(F) ::= IRANGE. { F = CFRetain(@".."); }
fname(F) ::= ERANGE. { F = CFRetain(@"..."); }
fname(F) ::= BITWISEOR. { F = CFRetain(@"|"); }
fname(F) ::= BITWISEXOR. { F = CFRetain(@"^"); }
fname(F) ::= BITWISEAND. { F = CFRetain(@"&"); }
fname(F) ::= COMPARE. { F = CFRetain(@"<=>"); }
fname(F) ::= EQUAL. { F = CFRetain(@"=="); }
fname(F) ::= WHENCOMP. { F = CFRetain(@"==="); }
fname(F) ::= REGEXMATCH. { F = CFRetain(@"=~"); }
fname(F) ::= LESSTHAN. { F = CFRetain(@"<"); }
fname(F) ::= LESSTHANEQUAL. { F = CFRetain(@"<="); }
fname(F) ::= GREATERTHAN. { F = CFRetain(@">"); }
fname(F) ::= GREATERTHANEQUAL. { F = CFRetain(@">="); }
fname(F) ::= PLUS. { F = CFRetain(@"+"); }
fname(F) ::= MINUS. { F = CFRetain(@"-"); }
fname(F) ::= MULTIPLY. { F = CFRetain(@"*"); }
fname(F) ::= DIVIDE. { F = CFRetain(@"/"); }
fname(F) ::= MODULUS. { F = CFRetain(@"%"); }
fname(F) ::= EXPONENT. { F = CFRetain(@"**"); }
fname(F) ::= SHIFTLEFT. { F = CFRetain(@"<<"); }
fname(F) ::= SHIFTRIGHT. { F = CFRetain(@">>"); }
fname(F) ::= UPLUS. { F = CFRetain(@"+@"); }
fname(F) ::= UMINUS. { F = CFRetain(@"-@"); }
fname(F) ::= BRACKETS. { F = CFRetain(@"[]"); }
fname(F) ::= BRACKETSASSIGN. { F = CFRetain(@"[]="); }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.