%type <infix_> RelationalExpressionNoIn_
%type <statement_> ReturnStatement
%type <rubyProc_> RubyProcExpression
+%type <rubyProc_> RubyProcExpressionNoOA
%type <functionParameter_> RubyProcParameterList
%type <functionParameter_> RubyProcParameterList_
+%type <functionParameter_> RubyProcParameters
%type <functionParameter_> RubyProcParametersOpt
%type <expression_> ShiftExpression
%type <expression_> ShiftExpressionNoBF
| "while" { $$ = $1; }
| "with" { $$ = $1; }
;
+
+PrimaryExpressionNo
+ : "@" LiteralNoRE { $$ = CYNew CYBox($2); }
+ | "@" ArrayLiteral { $$ = CYNew CYBox($2); }
+ | "@" ObjectLiteral { $$ = CYNew CYBox($2); }
+ | "@" "(" Expression ")" { $$ = CYNew CYBox($3); }
+ ;
@end
Identifier
| BooleanLiteral { $$ = $1; }
| NumericLiteral { $$ = $1; }
| StringLiteral { $$ = $1; }
- | "@" StringLiteral { $$ = $2; }
;
LiteralRE
;
CategoryName
- : "(" Word ")"
+ : "(" WordOpt ")"
;
CategoryStatement
| { $$ = NULL; }
;
-RubyProcParametersOpt
+RubyProcParameters
: "|" RubyProcParameterList "|" { $$ = $2; }
+ | "||" { $$ = NULL; }
+ ;
+
+RubyProcParametersOpt
+ : RubyProcParameters
| { $$ = NULL; }
;
: "{" RubyProcParametersOpt StatementListOpt "}" { $$ = CYNew CYRubyProc($2, $3); }
;
+RubyProcExpressionNoOA
+ : "{" RubyProcParameters StatementListOpt "}" { $$ = CYNew CYRubyProc($2, $3); }
+ ;
+
+PrimaryExpressionNo
+ : RubyProcExpressionNoOA { $$ = $1; }
+ ;
+
LeftHandSideExpression
: LeftHandSideExpression RubyProcExpression { $$ = CYNew CYRubyBlock($1, $2); }
;