- Dart::Parser
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 11 Jan 2013 13:41:57 +0000
changeset 45ef74750c3bc
parent 3 46c322c66a29
child 5 77d56b3a771b
- Dart::Parser
class: Dart::Parser
compiler/Dart__Parser.st
     1.1 --- a/compiler/Dart__Parser.st	Fri Jan 11 13:40:41 2013 +0000
     1.2 +++ b/compiler/Dart__Parser.st	Fri Jan 11 13:41:57 2013 +0000
     1.3 @@ -54,837 +54,6 @@
     1.4  !
     1.5  
     1.6  
     1.7 -!Parser methodsFor:'grammar'!
     1.8 -
     1.9 -additiveExpression
    1.10 -
    1.11 -        ^ (multiplicativeExpression , ((additiveOperator , multiplicativeExpression) star))
    1.12 -        / ((TokenParser for: #super) , ((additiveOperator , multiplicativeExpression) plus))
    1.13 -
    1.14 -    "Modified: / 11-01-2013 / 09:59:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.15 -!
    1.16 -
    1.17 -additiveOperator
    1.18 -
    1.19 -	^ ('+' asParser)
    1.20 -	/ ('-' asParser)
    1.21 -	
    1.22 -!
    1.23 -
    1.24 -argumentList
    1.25 -
    1.26 -	^ (namedArgument , (((',' asParser) , namedArgument) star))
    1.27 -	/ (expressionList , (((',' asParser) , namedArgument) star))
    1.28 -	
    1.29 -!
    1.30 -
    1.31 -arguments
    1.32 -
    1.33 -	^('(' asParser) , (argumentList optional) , (')' asParser)
    1.34 -!
    1.35 -
    1.36 -assignableExpression
    1.37 -
    1.38 -        ^ (primary , (((arguments star) , assignableSelector) plus))
    1.39 -        / ((TokenParser for: #super) , assignableSelector)
    1.40 -        / identifier
    1.41 -
    1.42 -    "Modified: / 11-01-2013 / 10:00:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.43 -!
    1.44 -
    1.45 -assignableSelector
    1.46 -
    1.47 -	^ (('[' asParser) , constantExpression , (']' asParser))
    1.48 -	/ (('.' asParser) , identifier)
    1.49 -	
    1.50 -!
    1.51 -
    1.52 -assignmentOperator
    1.53 -
    1.54 -	^ ('=' asParser)
    1.55 -	/ ('*=' asParser)
    1.56 -	/ ('/=' asParser)
    1.57 -	/ ('~/=' asParser)
    1.58 -	/ ('%=' asParser)
    1.59 -	/ ('+=' asParser)
    1.60 -	/ ('-=' asParser)
    1.61 -	/ ('<<=' asParser)
    1.62 -	/ (('>' asParser) , ('>' asParser) , ('>' asParser) , ('=' asParser))
    1.63 -	/ (('>' asParser) , ('>' asParser) , ('=' asParser))
    1.64 -	/ ('&=' asParser)
    1.65 -	/ ('^=' asParser)
    1.66 -	/ ('|=' asParser)
    1.67 -	
    1.68 -!
    1.69 -
    1.70 -bitwiseAndExpression
    1.71 -
    1.72 -        ^ (equalityExpression , ((('&' asParser) , equalityExpression) star))
    1.73 -        / ((TokenParser for: #super) , ((('&' asParser) , equalityExpression) plus))
    1.74 -
    1.75 -    "Modified: / 11-01-2013 / 10:00:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.76 -!
    1.77 -
    1.78 -bitwiseOperator
    1.79 -
    1.80 -	^ ('&' asParser)
    1.81 -	/ ('^' asParser)
    1.82 -	/ ('|' asParser)
    1.83 -	
    1.84 -!
    1.85 -
    1.86 -bitwiseOrExpression
    1.87 -
    1.88 -	^ (bitwiseXorExpression , ((('|' asParser) , bitwiseXorExpression) star))
    1.89 -	/ ((TokenParser for:#super) , ((('|' asParser) , bitwiseXorExpression) plus))
    1.90 -	
    1.91 -!
    1.92 -
    1.93 -bitwiseXorExpression
    1.94 -
    1.95 -	^ (bitwiseAndExpression , ((('^' asParser) , bitwiseAndExpression) star))
    1.96 -	/ ((TokenParser for:#super) , ((('^' asParser) , bitwiseAndExpression) plus))
    1.97 -	
    1.98 -!
    1.99 -
   1.100 -block
   1.101 -
   1.102 -	^('{' asParser) , statements , ('}' asParser)
   1.103 -!
   1.104 -
   1.105 -catchPart
   1.106 -
   1.107 -	^(TokenParser for:#catch) , ('(' asParser) , declaredIdentifier , (((',' asParser) , declaredIdentifier) optional) , (')' asParser) , block
   1.108 -!
   1.109 -
   1.110 -classDefinition
   1.111 -
   1.112 -	^ ((TokenParser for:#class) , identifier , (typeParameters optional) , (superclass optional) , (interfaces optional) , ('{' asParser) , (classMemberDefinition star) , ('}' asParser))
   1.113 -	/ ((TokenParser for:#class) , identifier , (typeParameters optional) , (interfaces optional) , (TokenParser for:#native) , (TokenParser for:#string) , ('{' asParser) , (classMemberDefinition star) , ('}' asParser))
   1.114 -	
   1.115 -!
   1.116 -
   1.117 -classMemberDefinition
   1.118 -
   1.119 -	^ (declaration , (';' asParser))
   1.120 -	/ (constructorDeclaration , (';' asParser))
   1.121 -	/ (methodDeclaration , functionBodyOrNative)
   1.122 -	/ ((TokenParser for:#const) , factoryConstructorDeclaration , functionNative)
   1.123 -	
   1.124 -!
   1.125 -
   1.126 -compilationUnit
   1.127 -
   1.128 -        ^( ((TokenParser for: #'#!!') optional) , (directive star) , (topLevelDefinition star) ) end
   1.129 -
   1.130 -    "Modified: / 11-01-2013 / 10:02:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.131 -!
   1.132 -
   1.133 -compoundLiteral
   1.134 -
   1.135 -	^ listLiteral
   1.136 -	/ mapLiteral
   1.137 -	
   1.138 -!
   1.139 -
   1.140 -conditionalExpression
   1.141 -
   1.142 -	^logicalOrExpression , ((('?' asParser) , constantExpression , (':' asParser) , constantExpression) optional)
   1.143 -!
   1.144 -
   1.145 -constInitializedIdentifier
   1.146 -
   1.147 -	^identifier , ((('=' asParser) , constantExpression) optional)
   1.148 -!
   1.149 -
   1.150 -constInitializedVariableDeclaration
   1.151 -
   1.152 -	^declaredIdentifier , ((('=' asParser) , constantExpression) optional) , (((',' asParser) , constInitializedIdentifier) star)
   1.153 -!
   1.154 -
   1.155 -constantConstructorDeclaration
   1.156 -
   1.157 -	^(TokenParser for:#const) , qualified , formalParameterList
   1.158 -!
   1.159 -
   1.160 -constantExpression
   1.161 -
   1.162 -	^ (assignableExpression , assignmentOperator , constantExpression)
   1.163 -	/ conditionalExpression
   1.164 -	
   1.165 -!
   1.166 -
   1.167 -constructorDeclaration
   1.168 -
   1.169 -	^ (identifier , formalParameterList , ((redirection / initializers ) optional))
   1.170 -	/ (namedConstructorDeclaration , ((redirection / initializers ) optional))
   1.171 -	
   1.172 -!
   1.173 -
   1.174 -declaration
   1.175 -
   1.176 -	^ (constantConstructorDeclaration , ((redirection / initializers ) optional))
   1.177 -	/ (functionDeclaration , redirection)
   1.178 -	/ (namedConstructorDeclaration , redirection)
   1.179 -	/ ((TokenParser for:#abstract) , specialSignatureDefinition)
   1.180 -	/ ((TokenParser for:#abstract) , functionDeclaration)
   1.181 -	/ ((TokenParser for:#static) , (TokenParser for:#final) , (type optional) , staticFinalDeclarationList)
   1.182 -	/ (((TokenParser for:#static) optional) , constInitializedVariableDeclaration)
   1.183 -	
   1.184 -!
   1.185 -
   1.186 -declaredIdentifier
   1.187 -
   1.188 -	^ ((TokenParser for:#final) , (type optional) , identifier)
   1.189 -	/ ((TokenParser for:#var) , identifier)
   1.190 -	/ (type , identifier)
   1.191 -	
   1.192 -!
   1.193 -
   1.194 -defaultCase
   1.195 -
   1.196 -	^(label optional) , (((TokenParser for:#case) , constantExpression , (':' asParser)) star) , (TokenParser for:#default) , (':' asParser) , statements
   1.197 -!
   1.198 -
   1.199 -defaultFormalParameter
   1.200 -
   1.201 -	^normalFormalParameter , ((('=' asParser) , constantExpression) optional)
   1.202 -!
   1.203 -
   1.204 -directive
   1.205 -
   1.206 -	^('#' asParser) , identifier , arguments , (';' asParser)
   1.207 -!
   1.208 -
   1.209 -equalityExpression
   1.210 -
   1.211 -	^ (relationalExpression , ((equalityOperator , relationalExpression) optional))
   1.212 -	/ ((TokenParser for:#super) , equalityOperator , relationalExpression)
   1.213 -	
   1.214 -!
   1.215 -
   1.216 -equalityOperator
   1.217 -
   1.218 -	^ ('==' asParser)
   1.219 -	/ ('!!=' asParser)
   1.220 -	/ ('===' asParser)
   1.221 -	/ ('!!==' asParser)
   1.222 -	
   1.223 -!
   1.224 -
   1.225 -expressionInParentheses
   1.226 -
   1.227 -	^('(' asParser) , constantExpression , (')' asParser)
   1.228 -!
   1.229 -
   1.230 -expressionList
   1.231 -
   1.232 -	^constantExpression , (((',' asParser) , constantExpression) star)
   1.233 -!
   1.234 -
   1.235 -factoryConstructorDeclaration
   1.236 -
   1.237 -	^(TokenParser for:#factory) , qualified , (typeParameters optional) , ((('.' asParser) , identifier) optional) , formalParameterList
   1.238 -!
   1.239 -
   1.240 -factorySpecification
   1.241 -
   1.242 -	^(TokenParser for:#factory) , type
   1.243 -!
   1.244 -
   1.245 -fieldFormalParameter
   1.246 -
   1.247 -	^(finalVarOrType optional) , (TokenParser for:#this) , ('.' asParser) , identifier
   1.248 -!
   1.249 -
   1.250 -fieldInitializer
   1.251 -
   1.252 -	^(((TokenParser for:#this) , ('.' asParser)) optional) , identifier , ('=' asParser) , conditionalExpression
   1.253 -!
   1.254 -
   1.255 -finalVarOrType
   1.256 -
   1.257 -	^ ((TokenParser for:#final) , (type optional))
   1.258 -	/ (TokenParser for:#var)
   1.259 -	/ type
   1.260 -	
   1.261 -!
   1.262 -
   1.263 -finallyPart
   1.264 -
   1.265 -	^(TokenParser for:#finally) , block
   1.266 -!
   1.267 -
   1.268 -forInitializerStatement
   1.269 -
   1.270 -	^ (initializedVariableDeclaration , (';' asParser))
   1.271 -	/ ((constantExpression optional) , (';' asParser))
   1.272 -	
   1.273 -!
   1.274 -
   1.275 -forLoopParts
   1.276 -
   1.277 -	^ (forInitializerStatement , (constantExpression optional) , (';' asParser) , (expressionList optional))
   1.278 -	/ (declaredIdentifier , (TokenParser for:#in) , constantExpression)
   1.279 -	/ (identifier , (TokenParser for:#in) , constantExpression)
   1.280 -	
   1.281 -!
   1.282 -
   1.283 -formalParameterList
   1.284 -
   1.285 -	^ (('(' asParser) , (namedFormalParameters optional) , (')' asParser))
   1.286 -	/ (('(' asParser) , normalFormalParameter , (normalFormalParameterTail optional) , (')' asParser))
   1.287 -	
   1.288 -!
   1.289 -
   1.290 -functionBody
   1.291 -
   1.292 -	^ (('=>' asParser) , constantExpression , (';' asParser))
   1.293 -	/ block
   1.294 -	
   1.295 -!
   1.296 -
   1.297 -functionBodyOrNative
   1.298 -
   1.299 -	^ ((TokenParser for:#native) , functionBody)
   1.300 -	/ functionNative
   1.301 -	/ functionBody
   1.302 -	
   1.303 -!
   1.304 -
   1.305 -functionDeclaration
   1.306 -
   1.307 -	^(returnType optional) , identifier , formalParameterList
   1.308 -!
   1.309 -
   1.310 -functionExpression
   1.311 -
   1.312 -	^(((returnType optional) , identifier) optional) , formalParameterList , functionExpressionBody
   1.313 -!
   1.314 -
   1.315 -functionExpressionBody
   1.316 -
   1.317 -	^ (('=>' asParser) , constantExpression)
   1.318 -	/ block
   1.319 -	
   1.320 -!
   1.321 -
   1.322 -functionNative
   1.323 -
   1.324 -	^(TokenParser for:#native) , ((TokenParser for:#string) optional) , (';' asParser)
   1.325 -!
   1.326 -
   1.327 -functionPrefix
   1.328 -
   1.329 -	^(returnType optional) , identifier
   1.330 -!
   1.331 -
   1.332 -functionTypeAlias
   1.333 -
   1.334 -	^(TokenParser for:#typedef) , functionPrefix , (typeParameters optional) , formalParameterList , (';' asParser)
   1.335 -!
   1.336 -
   1.337 -getOrSet
   1.338 -
   1.339 -	^ (TokenParser for:#get)
   1.340 -	/ (TokenParser for:#set)
   1.341 -	
   1.342 -!
   1.343 -
   1.344 -identifier
   1.345 -
   1.346 -	^ IDENTIFIER_NO_DOLLAR
   1.347 -	/ (TokenParser for:#identifier)
   1.348 -	/ (TokenParser for:#abstract)
   1.349 -	/ ASSERT
   1.350 -	/ (TokenParser for:#class)
   1.351 -	/ EXTENDS
   1.352 -	/ (TokenParser for:#factory)
   1.353 -	/ (TokenParser for:#get)
   1.354 -	/ (TokenParser for:#implements)
   1.355 -	/ (TokenParser for:#import)
   1.356 -	/ (TokenParser for:#interface)
   1.357 -	/ (TokenParser for:#is)
   1.358 -	/ (TokenParser for:#library)
   1.359 -	/ (TokenParser for:#native)
   1.360 -	/ NEGATE
   1.361 -	/ OPERATOR
   1.362 -	/ (TokenParser for:#set)
   1.363 -	/ (TokenParser for:#source)
   1.364 -	/ (TokenParser for:#static)
   1.365 -	/ (TokenParser for:#typedef)
   1.366 -	
   1.367 -!
   1.368 -
   1.369 -importReference
   1.370 -
   1.371 -	^(((TokenParser for:#identifier) , (':' asParser)) optional) , (TokenParser for:#string)
   1.372 -!
   1.373 -
   1.374 -importReferences
   1.375 -
   1.376 -	^importReference , (((',' asParser) , importReference) star) , ((',' asParser) optional)
   1.377 -!
   1.378 -
   1.379 -initializedIdentifier
   1.380 -
   1.381 -	^identifier , ((('=' asParser) , constantExpression) optional)
   1.382 -!
   1.383 -
   1.384 -initializedIdentifierList
   1.385 -
   1.386 -	^initializedIdentifier , (((',' asParser) , initializedIdentifier) star)
   1.387 -!
   1.388 -
   1.389 -initializedVariableDeclaration
   1.390 -
   1.391 -	^declaredIdentifier , ((('=' asParser) , constantExpression) optional) , (((',' asParser) , initializedIdentifier) star)
   1.392 -!
   1.393 -
   1.394 -initializers
   1.395 -
   1.396 -	^(':' asParser) , superCallOrFieldInitializer , (((',' asParser) , superCallOrFieldInitializer) star)
   1.397 -!
   1.398 -
   1.399 -interfaceDefinition
   1.400 -
   1.401 -	^(TokenParser for:#interface) , identifier , (typeParameters optional) , (superinterfaces optional) , (factorySpecification optional) , ('{' asParser) , (interfaceMemberDefinition star) , ('}' asParser)
   1.402 -!
   1.403 -
   1.404 -interfaceMemberDefinition
   1.405 -
   1.406 -	^ ((TokenParser for:#static) , (TokenParser for:#final) , (type optional) , initializedIdentifierList , (';' asParser))
   1.407 -	/ (functionDeclaration , (';' asParser))
   1.408 -	/ (constantConstructorDeclaration , (';' asParser))
   1.409 -	/ (namedConstructorDeclaration , (';' asParser))
   1.410 -	/ (specialSignatureDefinition , (';' asParser))
   1.411 -	/ (variableDeclaration , (';' asParser))
   1.412 -	
   1.413 -!
   1.414 -
   1.415 -interfaces
   1.416 -
   1.417 -	^(TokenParser for:#implements) , typeList
   1.418 -!
   1.419 -
   1.420 -isOperator
   1.421 -
   1.422 -	^(TokenParser for:#is) , (('!!' asParser) optional)
   1.423 -!
   1.424 -
   1.425 -iterationStatement
   1.426 -
   1.427 -	^ ((TokenParser for:#while) , ('(' asParser) , constantExpression , (')' asParser) , statement)
   1.428 -	/ ((TokenParser for:#do) , statement , (TokenParser for:#while) , ('(' asParser) , constantExpression , (')' asParser) , (';' asParser))
   1.429 -	/ ((TokenParser for:#for) , ('(' asParser) , forLoopParts , (')' asParser) , statement)
   1.430 -	
   1.431 -!
   1.432 -
   1.433 -label
   1.434 -
   1.435 -	^identifier , (':' asParser)
   1.436 -!
   1.437 -
   1.438 -libraryBody
   1.439 -
   1.440 -	^(libraryImport optional) , (librarySource optional)
   1.441 -!
   1.442 -
   1.443 -libraryDefinition
   1.444 -
   1.445 -	^(TokenParser for:#library) , ('{' asParser) , libraryBody , ('}' asParser)
   1.446 -!
   1.447 -
   1.448 -libraryImport
   1.449 -
   1.450 -	^(TokenParser for:#import) , ('=' asParser) , ('[' asParser) , (importReferences optional) , (']' asParser)
   1.451 -!
   1.452 -
   1.453 -librarySource
   1.454 -
   1.455 -	^(TokenParser for:#source) , ('=' asParser) , ('[' asParser) , (sourceUrls optional) , (']' asParser)
   1.456 -!
   1.457 -
   1.458 -libraryUnit
   1.459 -
   1.460 -        ^libraryDefinition end
   1.461 -
   1.462 -    "Modified: / 11-01-2013 / 10:07:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.463 -!
   1.464 -
   1.465 -listLiteral
   1.466 -
   1.467 -	^('[' asParser) , ((expressionList , ((',' asParser) optional)) optional) , (']' asParser)
   1.468 -!
   1.469 -
   1.470 -literal
   1.471 -
   1.472 -        ^ (TokenParser for: #null)
   1.473 -        / (TokenParser for: #true)
   1.474 -        / (TokenParser for: #false)
   1.475 -        / (TokenParser for: #number)
   1.476 -        / (TokenParser for:#string)
   1.477 -
   1.478 -    "Modified: / 11-01-2013 / 10:08:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.479 -!
   1.480 -
   1.481 -logicalAndExpression
   1.482 -
   1.483 -	^bitwiseOrExpression , ((('&&' asParser) , bitwiseOrExpression) star)
   1.484 -!
   1.485 -
   1.486 -logicalOrExpression
   1.487 -
   1.488 -	^logicalAndExpression , ((('||' asParser) , logicalAndExpression) star)
   1.489 -!
   1.490 -
   1.491 -mapLiteral
   1.492 -
   1.493 -	^('{' asParser) , ((mapLiteralEntry , (((',' asParser) , mapLiteralEntry) star) , ((',' asParser) optional)) optional) , ('}' asParser)
   1.494 -!
   1.495 -
   1.496 -mapLiteralEntry
   1.497 -
   1.498 -	^(TokenParser for:#string) , (':' asParser) , constantExpression
   1.499 -!
   1.500 -
   1.501 -methodDeclaration
   1.502 -
   1.503 -	^ factoryConstructorDeclaration
   1.504 -	/ ((TokenParser for:#static) , functionDeclaration)
   1.505 -	/ specialSignatureDefinition
   1.506 -	/ (functionDeclaration , (initializers optional))
   1.507 -	/ (namedConstructorDeclaration , (initializers optional))
   1.508 -	
   1.509 -!
   1.510 -
   1.511 -multiplicativeExpression
   1.512 -
   1.513 -	^ (unaryExpression , ((multiplicativeOperator , unaryExpression) star))
   1.514 -	/ ((TokenParser for:#super) , ((multiplicativeOperator , unaryExpression) plus))
   1.515 -	
   1.516 -!
   1.517 -
   1.518 -multiplicativeOperator
   1.519 -
   1.520 -	^ ('*' asParser)
   1.521 -	/ ('/' asParser)
   1.522 -	/ ('%' asParser)
   1.523 -	/ ('~/' asParser)
   1.524 -	
   1.525 -!
   1.526 -
   1.527 -namedArgument
   1.528 -
   1.529 -	^label , constantExpression
   1.530 -!
   1.531 -
   1.532 -namedConstructorDeclaration
   1.533 -
   1.534 -	^identifier , ('.' asParser) , identifier , formalParameterList
   1.535 -!
   1.536 -
   1.537 -namedFormalParameters
   1.538 -
   1.539 -	^('[' asParser) , defaultFormalParameter , (((',' asParser) , defaultFormalParameter) star) , (']' asParser)
   1.540 -!
   1.541 -
   1.542 -negateOperator
   1.543 -
   1.544 -	^ ('!!' asParser)
   1.545 -	/ ('~' asParser)
   1.546 -	
   1.547 -!
   1.548 -
   1.549 -nonLabelledStatement
   1.550 -
   1.551 -        ^ block
   1.552 -        / (initializedVariableDeclaration , (';' asParser))
   1.553 -        / iterationStatement
   1.554 -        / selectionStatement
   1.555 -        / tryStatement
   1.556 -        / ((TokenParser for: #break) , (identifier optional) , (';' asParser))
   1.557 -        / ((TokenParser for: #continue) , (identifier optional) , (';' asParser))
   1.558 -        / ((TokenParser for: #return) , (constantExpression optional) , (';' asParser))
   1.559 -        / ((TokenParser for: #throw) , (constantExpression optional) , (';' asParser))
   1.560 -        / ((constantExpression optional) , (';' asParser))
   1.561 -        / ((TokenParser for: #assert) , ('(' asParser) , conditionalExpression , (')' asParser) , (';' asParser))
   1.562 -        / (functionDeclaration , functionBody)
   1.563 -
   1.564 -    "Modified: / 11-01-2013 / 10:09:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.565 -!
   1.566 -
   1.567 -normalFormalParameter
   1.568 -
   1.569 -	^ functionDeclaration
   1.570 -	/ fieldFormalParameter
   1.571 -	/ simpleFormalParameter
   1.572 -	
   1.573 -!
   1.574 -
   1.575 -normalFormalParameterTail
   1.576 -
   1.577 -	^ ((',' asParser) , namedFormalParameters)
   1.578 -	/ ((',' asParser) , normalFormalParameter , (normalFormalParameterTail optional))
   1.579 -	
   1.580 -!
   1.581 -
   1.582 -postfixExpression
   1.583 -
   1.584 -	^ (assignableExpression , postfixOperator)
   1.585 -	/ (primary , (selector star))
   1.586 -	
   1.587 -!
   1.588 -
   1.589 -postfixOperator
   1.590 -
   1.591 -	^ ('++' asParser)
   1.592 -	/ ('--' asParser)
   1.593 -	
   1.594 -!
   1.595 -
   1.596 -prefixOperator
   1.597 -
   1.598 -	^ additiveOperator
   1.599 -	/ negateOperator
   1.600 -	
   1.601 -!
   1.602 -
   1.603 -primary
   1.604 -
   1.605 -	^ primaryNoFE
   1.606 -	/ primaryFE
   1.607 -	
   1.608 -!
   1.609 -
   1.610 -primaryFE
   1.611 -
   1.612 -	^ functionExpression
   1.613 -	/ primaryNoFE
   1.614 -	
   1.615 -!
   1.616 -
   1.617 -primaryNoFE
   1.618 -
   1.619 -        ^ (TokenParser for:#this)
   1.620 -        / ((TokenParser for:#super) , assignableSelector)
   1.621 -        / literal
   1.622 -        / identifier
   1.623 -        / (((TokenParser for:#const) optional) , (typeArguments optional) , compoundLiteral)
   1.624 -        / (((TokenParser for: #new) / (TokenParser for:#const) ) , type , ((('.' asParser) , identifier) optional) , arguments)
   1.625 -        / expressionInParentheses
   1.626 -
   1.627 -    "Modified: / 11-01-2013 / 10:09:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.628 -!
   1.629 -
   1.630 -qualified
   1.631 -
   1.632 -	^identifier , ((('.' asParser) , identifier) optional)
   1.633 -!
   1.634 -
   1.635 -redirection
   1.636 -
   1.637 -	^(':' asParser) , (TokenParser for:#this) , ((('.' asParser) , identifier) optional) , arguments
   1.638 -!
   1.639 -
   1.640 -relationalExpression
   1.641 -
   1.642 -	^ (shiftExpression , (((isOperator , type) / (relationalOperator , shiftExpression) ) optional))
   1.643 -	/ ((TokenParser for:#super) , relationalOperator , shiftExpression)
   1.644 -	
   1.645 -!
   1.646 -
   1.647 -relationalOperator
   1.648 -
   1.649 -	^ (('>' asParser) , ('=' asParser))
   1.650 -	/ ('>' asParser)
   1.651 -	/ ('<=' asParser)
   1.652 -	/ ('<' asParser)
   1.653 -	
   1.654 -!
   1.655 -
   1.656 -returnType
   1.657 -
   1.658 -        ^ (TokenParser for: #void)
   1.659 -        / type
   1.660 -
   1.661 -    "Modified: / 11-01-2013 / 10:09:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.662 -!
   1.663 -
   1.664 -selectionStatement
   1.665 -
   1.666 -        ^ ((TokenParser for: #if) , ('(' asParser) , constantExpression , (')' asParser) , statement , (((TokenParser for: #else) , statement) optional))
   1.667 -        / ((TokenParser for: #switch) , ('(' asParser) , constantExpression , (')' asParser) , ('{' asParser) , (switchCase star) , (defaultCase optional) , ('}' asParser))
   1.668 -
   1.669 -    "Modified: / 11-01-2013 / 10:10:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.670 -!
   1.671 -
   1.672 -selector
   1.673 -
   1.674 -	^ assignableSelector
   1.675 -	/ arguments
   1.676 -	
   1.677 -!
   1.678 -
   1.679 -shiftExpression
   1.680 -
   1.681 -	^ (additiveExpression , ((shiftOperator , additiveExpression) star))
   1.682 -	/ ((TokenParser for:#super) , ((shiftOperator , additiveExpression) plus))
   1.683 -	
   1.684 -!
   1.685 -
   1.686 -shiftOperator
   1.687 -
   1.688 -	^ ('<<' asParser)
   1.689 -	/ (('>' asParser) , ('>' asParser) , ('>' asParser))
   1.690 -	/ (('>' asParser) , ('>' asParser))
   1.691 -	
   1.692 -!
   1.693 -
   1.694 -simpleFormalParameter
   1.695 -
   1.696 -	^ declaredIdentifier
   1.697 -	/ identifier
   1.698 -	
   1.699 -!
   1.700 -
   1.701 -sourceUrls
   1.702 -
   1.703 -	^(TokenParser for:#string) , (((',' asParser) , (TokenParser for:#string)) star) , ((',' asParser) optional)
   1.704 -!
   1.705 -
   1.706 -specialSignatureDefinition
   1.707 -
   1.708 -        ^ (((TokenParser for:#static) optional) , (returnType optional) , getOrSet , identifier , formalParameterList)
   1.709 -        / ((returnType optional) , (TokenParser for: #operator) , userDefinableOperator , formalParameterList)
   1.710 -
   1.711 -    "Modified: / 11-01-2013 / 10:10:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.712 -!
   1.713 -
   1.714 -statement
   1.715 -
   1.716 -	^(label star) , nonLabelledStatement
   1.717 -!
   1.718 -
   1.719 -statements
   1.720 -
   1.721 -	^statement star
   1.722 -!
   1.723 -
   1.724 -staticFinalDeclaration
   1.725 -
   1.726 -	^identifier , ('=' asParser) , constantExpression
   1.727 -!
   1.728 -
   1.729 -staticFinalDeclarationList
   1.730 -
   1.731 -	^staticFinalDeclaration , (((',' asParser) , staticFinalDeclaration) star)
   1.732 -!
   1.733 -
   1.734 -superCallOrFieldInitializer
   1.735 -
   1.736 -	^ ((TokenParser for:#super) , arguments)
   1.737 -	/ ((TokenParser for:#super) , ('.' asParser) , identifier , arguments)
   1.738 -	/ fieldInitializer
   1.739 -	
   1.740 -!
   1.741 -
   1.742 -superclass
   1.743 -
   1.744 -        ^(TokenParser for: #extends) , type
   1.745 -
   1.746 -    "Modified: / 11-01-2013 / 10:10:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.747 -!
   1.748 -
   1.749 -superinterfaces
   1.750 -
   1.751 -        ^(TokenParser for: #extends) , typeList
   1.752 -
   1.753 -    "Modified: / 11-01-2013 / 10:10:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.754 -!
   1.755 -
   1.756 -switchCase
   1.757 -
   1.758 -	^(label optional) , (((TokenParser for:#case) , constantExpression , (':' asParser)) plus) , statements
   1.759 -!
   1.760 -
   1.761 -topLevelDefinition
   1.762 -
   1.763 -	^ classDefinition
   1.764 -	/ interfaceDefinition
   1.765 -	/ functionTypeAlias
   1.766 -	/ (functionDeclaration , functionBodyOrNative)
   1.767 -	/ ((returnType optional) , getOrSet , identifier , formalParameterList , functionBodyOrNative)
   1.768 -	/ ((TokenParser for:#final) , (type optional) , staticFinalDeclarationList , (';' asParser))
   1.769 -	/ (constInitializedVariableDeclaration , (';' asParser))
   1.770 -	
   1.771 -!
   1.772 -
   1.773 -tryStatement
   1.774 -
   1.775 -        ^(TokenParser for: #try) , block , (((catchPart plus) , (finallyPart optional)) / finallyPart )
   1.776 -
   1.777 -    "Modified: / 11-01-2013 / 10:10:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.778 -!
   1.779 -
   1.780 -type
   1.781 -
   1.782 -	^qualified , (typeArguments optional)
   1.783 -!
   1.784 -
   1.785 -typeArguments
   1.786 -
   1.787 -	^('<' asParser) , typeList , ('>' asParser)
   1.788 -!
   1.789 -
   1.790 -typeList
   1.791 -
   1.792 -	^type , (((',' asParser) , type) star)
   1.793 -!
   1.794 -
   1.795 -typeParameter
   1.796 -
   1.797 -        ^identifier , (((TokenParser for: #extends) , type) optional)
   1.798 -
   1.799 -    "Modified: / 11-01-2013 / 10:11:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.800 -!
   1.801 -
   1.802 -typeParameters
   1.803 -
   1.804 -	^('<' asParser) , typeParameter , (((',' asParser) , typeParameter) star) , ('>' asParser)
   1.805 -!
   1.806 -
   1.807 -unaryExpression
   1.808 -
   1.809 -	^ postfixExpression
   1.810 -	/ (prefixOperator , unaryExpression)
   1.811 -	/ (negateOperator , (TokenParser for:#super))
   1.812 -	/ (('-' asParser) , (TokenParser for:#super))
   1.813 -	/ (postfixOperator , assignableExpression)
   1.814 -	
   1.815 -!
   1.816 -
   1.817 -userDefinableOperator
   1.818 -
   1.819 -        ^ multiplicativeOperator
   1.820 -        / additiveOperator
   1.821 -        / shiftOperator
   1.822 -        / relationalOperator
   1.823 -        / bitwiseOperator
   1.824 -        / ('==' asParser)
   1.825 -        / ('~' asParser)
   1.826 -        / (TokenParser for: #negate)
   1.827 -        / (('[' asParser) , (']' asParser))
   1.828 -        / (('[' asParser) , (']' asParser) , ('=' asParser))
   1.829 -
   1.830 -    "Modified: / 11-01-2013 / 10:11:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.831 -!
   1.832 -
   1.833 -variableDeclaration
   1.834 -
   1.835 -	^declaredIdentifier , (((',' asParser) , identifier) star)
   1.836 -! !
   1.837 -
   1.838  !Parser class methodsFor:'initialization'!
   1.839  
   1.840  debugging: aBoolean