Author: manjula
Date: 2005-03-24 02:38:05 -0500 (Thu, 24 Mar 2005)
New Revision: 42193
Modified:
trunk/mcs/mbas/ChangeLog
trunk/mcs/mbas/mb-parser.jay
trunk/mcs/mbas/mb-tokenizer.cs
Log:
Support 'End Statement' in parser and tokenizer file
Modified: trunk/mcs/mbas/ChangeLog
===================================================================
--- trunk/mcs/mbas/ChangeLog 2005-03-24 07:28:16 UTC (rev 42192)
+++ trunk/mcs/mbas/ChangeLog 2005-03-24 07:38:05 UTC (rev 42193)
@@ -1,4 +1,7 @@
2005-03-24 Manjula GHM <[EMAIL PROTECTED]>
+ * mb-parser.jay,mb-tokenizer.cs: Support 'End Statement' in parser
and tokenizer file
+
+2005-03-24 Manjula GHM <[EMAIL PROTECTED]>
Sudharsan V <[EMAIL PROTECTED]>
* mb-parser.jay,mb-tokenizer.cs:
Revamped end of block logic
Modified: trunk/mcs/mbas/mb-parser.jay
===================================================================
--- trunk/mcs/mbas/mb-parser.jay 2005-03-24 07:28:16 UTC (rev 42192)
+++ trunk/mcs/mbas/mb-parser.jay 2005-03-24 07:38:05 UTC (rev 42193)
@@ -2703,12 +2703,12 @@
{
current_block.AddStatement ((Statement) $1);
}
- | opt_end_stmt {/*changes to be done here. End caught here*/}
;
opt_end_stmt
- : END_EOL
+ : END_EOL {$$ = new End (lexer.Location);}
;
+
opt_raise_event_args
: /* empty */ { $$ = null; }
@@ -2875,6 +2875,7 @@
| throw_statement
| exit_statement
| yield_statement
+ | opt_end_stmt
;
goto_statement
@@ -4877,7 +4878,7 @@
ifElseStateMachine.HandleToken(tok);
}
catch(ApplicationException) {
- throw new MBASException(ifElseStateMachine.Error,
(Location)$3, ifElseStateMachine.ErrString);
+ throw new MBASException(ifElseStateMachine.Error,
(Location)$4, ifElseStateMachine.ErrString);
}
}
EOL
Modified: trunk/mcs/mbas/mb-tokenizer.cs
===================================================================
--- trunk/mcs/mbas/mb-tokenizer.cs 2005-03-24 07:28:16 UTC (rev 42192)
+++ trunk/mcs/mbas/mb-tokenizer.cs 2005-03-24 07:38:05 UTC (rev 42193)
@@ -798,6 +798,7 @@
if(current_token == Token.END) {
// In case of any more addition in end
block it got to be added here
next_token = xtoken();
+ putbacktoken = true;
if (next_token == Token.EOL)
return Token.END_EOL;
else if (next_token ==
Token.IDENTIFIER) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches