Browse Source

Changed ExpressionFinder grammar to suppress the remaining LL(1) warnings

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/vbnet@5987 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
0b8d5c1f3a
  1. 16
      src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.atg

16
src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.atg

@ -260,7 +260,9 @@ ExpressionFinder =
(. PushContext(Context.Global, t); .) (. PushContext(Context.Global, t); .)
{ OptionStatement } { OptionStatement }
{ ImportsStatement } { ImportsStatement }
{ AttributeBlock } { EXPECTEDCONFLICT("<") AttributeBlock } /* Expected LL(1) conflict: we can't tell global attributes */
/* from those on types. */
/* This isn't a problem, we can just treat all as global attributes */
{ NamespaceMemberDeclaration } { NamespaceMemberDeclaration }
(. PopContext(); .) (. PopContext(); .)
. .
@ -463,12 +465,12 @@ LambdaExpression =
. .
SubLambdaExpression = SubLambdaExpression =
"Sub" [ "(" [ ParameterList ] ")" ] "Sub" "(" [ ParameterList ] ")"
( Statement | StatementTerminatorAndBlock "End" "Sub" ) ( GREEDY Statement | StatementTerminatorAndBlock "End" "Sub" )
. .
FunctionLambdaExpression = FunctionLambdaExpression =
"Function" [ "(" [ ParameterList ] ")" ] "Function" "(" [ ParameterList ] ")"
( Expression | [ "As" TypeName ] StatementTerminatorAndBlock "End" "Function" ) ( Expression | [ "As" TypeName ] StatementTerminatorAndBlock "End" "Function" )
. .
@ -532,7 +534,7 @@ Statement =
| WithOrLockStatement | WithOrLockStatement
| AddOrRemoveHandlerStatement | AddOrRemoveHandlerStatement
| RaiseEventStatement | RaiseEventStatement
| IfStatement | EXPECTEDCONFLICT("If") IfStatement /* prefer if-statement to if-expression */
| SelectStatement | SelectStatement
| WhileStatement | WhileStatement
| DoLoopStatement | DoLoopStatement
@ -675,7 +677,9 @@ BranchStatement =
. .
ReDimStatement = ReDimStatement =
"ReDim" [ "Preserve" ] Expression "ReDim"
[ EXPECTEDCONFLICT("Preserve") "Preserve" ] /* Preserve is context-dependend keyword */
Expression
. .
EraseStatement = EraseStatement =

Loading…
Cancel
Save