More work on parser.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 11 Jan 2013 13:40:41 +0000
changeset 346c322c66a29
parent 2 8fedb5e096fc
child 4 5ef74750c3bc
More work on parser.
compiler/Dart__Parser.st
compiler/Dart__ParserError.st
compiler/Dart__ParserTests.st
compiler/Dart__Scanner.st
compiler/Dart__ScannerBase.st
compiler/Dart__ScannerError.st
compiler/Dart__ScannerTests.st
compiler/Dart__SyntaxError.st
compiler/Make.proto
compiler/Make.spec
compiler/abbrev.stc
compiler/bc.mak
compiler/jv_dart_compiler.st
compiler/libInit.cc
     1.1 --- a/compiler/Dart__Parser.st	Fri Jan 11 10:12:41 2013 +0000
     1.2 +++ b/compiler/Dart__Parser.st	Fri Jan 11 13:40:41 2013 +0000
     1.3 @@ -41,7 +41,7 @@
     1.4  		topLevelDefinition tryStatement type typeArguments typeList
     1.5  		typeParameter typeParameters unaryExpression
     1.6  		userDefinableOperator variableDeclaration'
     1.7 -	classVariableNames:''
     1.8 +	classVariableNames:'Debugging'
     1.9  	poolDictionaries:''
    1.10  	category:'Languages-Dart-Parser'
    1.11  !
    1.12 @@ -885,6 +885,931 @@
    1.13  	^declaredIdentifier , (((',' asParser) , identifier) star)
    1.14  ! !
    1.15  
    1.16 +!Parser class methodsFor:'initialization'!
    1.17 +
    1.18 +debugging: aBoolean
    1.19 +    Debugging := aBoolean
    1.20 +
    1.21 +    "
    1.22 +        JavaParser debugging: true.
    1.23 +        JavaParser debugging: false.
    1.24 +    "
    1.25 +
    1.26 +    "Created: / 11-01-2013 / 11:32:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.27 +!
    1.28 +
    1.29 +initialize
    1.30 +    "Invoked at system start or when the class is dynamically loaded."
    1.31 +
    1.32 +    "/ please change as required (and remove this comment)
    1.33 +
    1.34 +    Debugging := false.
    1.35 +
    1.36 +    "Modified: / 11-01-2013 / 11:32:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.37 +! !
    1.38 +
    1.39 +!Parser methodsFor:'accessing'!
    1.40 +
    1.41 +start
    1.42 +    ^compilationUnit , (TokenParser for: #EOF).
    1.43 +
    1.44 +    "Created: / 11-01-2013 / 13:19:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.45 +! !
    1.46 +
    1.47 +!Parser methodsFor:'grammar'!
    1.48 +
    1.49 +additiveExpression
    1.50 +
    1.51 +        ^ (multiplicativeExpression , ((additiveOperator , multiplicativeExpression) star))
    1.52 +        / ((TokenParser for: #super) , ((additiveOperator , multiplicativeExpression) plus))
    1.53 +
    1.54 +    "Modified: / 11-01-2013 / 09:59:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.55 +!
    1.56 +
    1.57 +additiveOperator
    1.58 +
    1.59 +	^ ('+' asParser)
    1.60 +	/ ('-' asParser)
    1.61 +	
    1.62 +!
    1.63 +
    1.64 +argumentList
    1.65 +
    1.66 +	^ (namedArgument , (((',' asParser) , namedArgument) star))
    1.67 +	/ (expressionList , (((',' asParser) , namedArgument) star))
    1.68 +	
    1.69 +!
    1.70 +
    1.71 +arguments
    1.72 +
    1.73 +	^('(' asParser) , (argumentList optional) , (')' asParser)
    1.74 +!
    1.75 +
    1.76 +assignableExpression
    1.77 +
    1.78 +        ^ (primary , (((arguments star) , assignableSelector) plus))
    1.79 +        / ((TokenParser for: #super) , assignableSelector)
    1.80 +        / identifier
    1.81 +
    1.82 +    "Modified: / 11-01-2013 / 10:00:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.83 +!
    1.84 +
    1.85 +assignableSelector
    1.86 +
    1.87 +	^ (('[' asParser) , constantExpression , (']' asParser))
    1.88 +	/ (('.' asParser) , identifier)
    1.89 +	
    1.90 +!
    1.91 +
    1.92 +assignmentOperator
    1.93 +
    1.94 +	^ ('=' asParser)
    1.95 +	/ ('*=' asParser)
    1.96 +	/ ('/=' asParser)
    1.97 +	/ ('~/=' asParser)
    1.98 +	/ ('%=' asParser)
    1.99 +	/ ('+=' asParser)
   1.100 +	/ ('-=' asParser)
   1.101 +	/ ('<<=' asParser)
   1.102 +	/ (('>' asParser) , ('>' asParser) , ('>' asParser) , ('=' asParser))
   1.103 +	/ (('>' asParser) , ('>' asParser) , ('=' asParser))
   1.104 +	/ ('&=' asParser)
   1.105 +	/ ('^=' asParser)
   1.106 +	/ ('|=' asParser)
   1.107 +	
   1.108 +!
   1.109 +
   1.110 +bitwiseAndExpression
   1.111 +
   1.112 +        ^ (equalityExpression , ((('&' asParser) , equalityExpression) star))
   1.113 +        / ((TokenParser for: #super) , ((('&' asParser) , equalityExpression) plus))
   1.114 +
   1.115 +    "Modified: / 11-01-2013 / 10:00:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.116 +!
   1.117 +
   1.118 +bitwiseOperator
   1.119 +
   1.120 +	^ ('&' asParser)
   1.121 +	/ ('^' asParser)
   1.122 +	/ ('|' asParser)
   1.123 +	
   1.124 +!
   1.125 +
   1.126 +bitwiseOrExpression
   1.127 +
   1.128 +	^ (bitwiseXorExpression , ((('|' asParser) , bitwiseXorExpression) star))
   1.129 +	/ ((TokenParser for:#super) , ((('|' asParser) , bitwiseXorExpression) plus))
   1.130 +	
   1.131 +!
   1.132 +
   1.133 +bitwiseXorExpression
   1.134 +
   1.135 +	^ (bitwiseAndExpression , ((('^' asParser) , bitwiseAndExpression) star))
   1.136 +	/ ((TokenParser for:#super) , ((('^' asParser) , bitwiseAndExpression) plus))
   1.137 +	
   1.138 +!
   1.139 +
   1.140 +block
   1.141 +
   1.142 +	^('{' asParser) , statements , ('}' asParser)
   1.143 +!
   1.144 +
   1.145 +catchPart
   1.146 +
   1.147 +	^(TokenParser for:#catch) , ('(' asParser) , declaredIdentifier , (((',' asParser) , declaredIdentifier) optional) , (')' asParser) , block
   1.148 +!
   1.149 +
   1.150 +classDefinition
   1.151 +
   1.152 +	^ ((TokenParser for:#class) , identifier , (typeParameters optional) , (superclass optional) , (interfaces optional) , ('{' asParser) , (classMemberDefinition star) , ('}' asParser))
   1.153 +	/ ((TokenParser for:#class) , identifier , (typeParameters optional) , (interfaces optional) , (TokenParser for:#native) , (TokenParser for:#string) , ('{' asParser) , (classMemberDefinition star) , ('}' asParser))
   1.154 +	
   1.155 +!
   1.156 +
   1.157 +classMemberDefinition
   1.158 +
   1.159 +	^ (declaration , (';' asParser))
   1.160 +	/ (constructorDeclaration , (';' asParser))
   1.161 +	/ (methodDeclaration , functionBodyOrNative)
   1.162 +	/ ((TokenParser for:#const) , factoryConstructorDeclaration , functionNative)
   1.163 +	
   1.164 +!
   1.165 +
   1.166 +compilationUnit
   1.167 +
   1.168 +        ^( ((TokenParser for: #'#!!') optional) , (directive star) , (topLevelDefinition star) )
   1.169 +
   1.170 +    "Modified: / 11-01-2013 / 13:18:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.171 +!
   1.172 +
   1.173 +compoundLiteral
   1.174 +
   1.175 +	^ listLiteral
   1.176 +	/ mapLiteral
   1.177 +	
   1.178 +!
   1.179 +
   1.180 +conditionalExpression
   1.181 +
   1.182 +	^logicalOrExpression , ((('?' asParser) , constantExpression , (':' asParser) , constantExpression) optional)
   1.183 +!
   1.184 +
   1.185 +constInitializedIdentifier
   1.186 +
   1.187 +	^identifier , ((('=' asParser) , constantExpression) optional)
   1.188 +!
   1.189 +
   1.190 +constInitializedVariableDeclaration
   1.191 +
   1.192 +	^declaredIdentifier , ((('=' asParser) , constantExpression) optional) , (((',' asParser) , constInitializedIdentifier) star)
   1.193 +!
   1.194 +
   1.195 +constantConstructorDeclaration
   1.196 +
   1.197 +	^(TokenParser for:#const) , qualified , formalParameterList
   1.198 +!
   1.199 +
   1.200 +constantExpression
   1.201 +
   1.202 +	^ (assignableExpression , assignmentOperator , constantExpression)
   1.203 +	/ conditionalExpression
   1.204 +	
   1.205 +!
   1.206 +
   1.207 +constructorDeclaration
   1.208 +
   1.209 +	^ (identifier , formalParameterList , ((redirection / initializers ) optional))
   1.210 +	/ (namedConstructorDeclaration , ((redirection / initializers ) optional))
   1.211 +	
   1.212 +!
   1.213 +
   1.214 +declaration
   1.215 +
   1.216 +	^ (constantConstructorDeclaration , ((redirection / initializers ) optional))
   1.217 +	/ (functionDeclaration , redirection)
   1.218 +	/ (namedConstructorDeclaration , redirection)
   1.219 +	/ ((TokenParser for:#abstract) , specialSignatureDefinition)
   1.220 +	/ ((TokenParser for:#abstract) , functionDeclaration)
   1.221 +	/ ((TokenParser for:#static) , (TokenParser for:#final) , (type optional) , staticFinalDeclarationList)
   1.222 +	/ (((TokenParser for:#static) optional) , constInitializedVariableDeclaration)
   1.223 +	
   1.224 +!
   1.225 +
   1.226 +declaredIdentifier
   1.227 +
   1.228 +	^ ((TokenParser for:#final) , (type optional) , identifier)
   1.229 +	/ ((TokenParser for:#var) , identifier)
   1.230 +	/ (type , identifier)
   1.231 +	
   1.232 +!
   1.233 +
   1.234 +defaultCase
   1.235 +
   1.236 +	^(label optional) , (((TokenParser for:#case) , constantExpression , (':' asParser)) star) , (TokenParser for:#default) , (':' asParser) , statements
   1.237 +!
   1.238 +
   1.239 +defaultFormalParameter
   1.240 +
   1.241 +	^normalFormalParameter , ((('=' asParser) , constantExpression) optional)
   1.242 +!
   1.243 +
   1.244 +directive
   1.245 +
   1.246 +	^('#' asParser) , identifier , arguments , (';' asParser)
   1.247 +!
   1.248 +
   1.249 +equalityExpression
   1.250 +
   1.251 +	^ (relationalExpression , ((equalityOperator , relationalExpression) optional))
   1.252 +	/ ((TokenParser for:#super) , equalityOperator , relationalExpression)
   1.253 +	
   1.254 +!
   1.255 +
   1.256 +equalityOperator
   1.257 +
   1.258 +	^ ('==' asParser)
   1.259 +	/ ('!!=' asParser)
   1.260 +	/ ('===' asParser)
   1.261 +	/ ('!!==' asParser)
   1.262 +	
   1.263 +!
   1.264 +
   1.265 +expression
   1.266 +
   1.267 +        ^ (assignableExpression , assignmentOperator , expression)
   1.268 +        / conditionalExpression
   1.269 +
   1.270 +    "Created: / 11-01-2013 / 13:22:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.271 +!
   1.272 +
   1.273 +expressionInParentheses
   1.274 +
   1.275 +	^('(' asParser) , constantExpression , (')' asParser)
   1.276 +!
   1.277 +
   1.278 +expressionList
   1.279 +
   1.280 +	^constantExpression , (((',' asParser) , constantExpression) star)
   1.281 +!
   1.282 +
   1.283 +factoryConstructorDeclaration
   1.284 +
   1.285 +	^(TokenParser for:#factory) , qualified , (typeParameters optional) , ((('.' asParser) , identifier) optional) , formalParameterList
   1.286 +!
   1.287 +
   1.288 +factorySpecification
   1.289 +
   1.290 +	^(TokenParser for:#factory) , type
   1.291 +!
   1.292 +
   1.293 +fieldFormalParameter
   1.294 +
   1.295 +	^(finalVarOrType optional) , (TokenParser for:#this) , ('.' asParser) , identifier
   1.296 +!
   1.297 +
   1.298 +fieldInitializer
   1.299 +
   1.300 +	^(((TokenParser for:#this) , ('.' asParser)) optional) , identifier , ('=' asParser) , conditionalExpression
   1.301 +!
   1.302 +
   1.303 +finalVarOrType
   1.304 +
   1.305 +	^ ((TokenParser for:#final) , (type optional))
   1.306 +	/ (TokenParser for:#var)
   1.307 +	/ type
   1.308 +	
   1.309 +!
   1.310 +
   1.311 +finallyPart
   1.312 +
   1.313 +	^(TokenParser for:#finally) , block
   1.314 +!
   1.315 +
   1.316 +forInitializerStatement
   1.317 +
   1.318 +	^ (initializedVariableDeclaration , (';' asParser))
   1.319 +	/ ((constantExpression optional) , (';' asParser))
   1.320 +	
   1.321 +!
   1.322 +
   1.323 +forLoopParts
   1.324 +
   1.325 +	^ (forInitializerStatement , (constantExpression optional) , (';' asParser) , (expressionList optional))
   1.326 +	/ (declaredIdentifier , (TokenParser for:#in) , constantExpression)
   1.327 +	/ (identifier , (TokenParser for:#in) , constantExpression)
   1.328 +	
   1.329 +!
   1.330 +
   1.331 +formalParameterList
   1.332 +
   1.333 +	^ (('(' asParser) , (namedFormalParameters optional) , (')' asParser))
   1.334 +	/ (('(' asParser) , normalFormalParameter , (normalFormalParameterTail optional) , (')' asParser))
   1.335 +	
   1.336 +!
   1.337 +
   1.338 +functionBody
   1.339 +
   1.340 +	^ (('=>' asParser) , constantExpression , (';' asParser))
   1.341 +	/ block
   1.342 +	
   1.343 +!
   1.344 +
   1.345 +functionBodyOrNative
   1.346 +
   1.347 +	^ ((TokenParser for:#native) , functionBody)
   1.348 +	/ functionNative
   1.349 +	/ functionBody
   1.350 +	
   1.351 +!
   1.352 +
   1.353 +functionDeclaration
   1.354 +
   1.355 +	^(returnType optional) , identifier , formalParameterList
   1.356 +!
   1.357 +
   1.358 +functionExpression
   1.359 +
   1.360 +	^(((returnType optional) , identifier) optional) , formalParameterList , functionExpressionBody
   1.361 +!
   1.362 +
   1.363 +functionExpressionBody
   1.364 +
   1.365 +	^ (('=>' asParser) , constantExpression)
   1.366 +	/ block
   1.367 +	
   1.368 +!
   1.369 +
   1.370 +functionNative
   1.371 +
   1.372 +	^(TokenParser for:#native) , ((TokenParser for:#string) optional) , (';' asParser)
   1.373 +!
   1.374 +
   1.375 +functionPrefix
   1.376 +
   1.377 +	^(returnType optional) , identifier
   1.378 +!
   1.379 +
   1.380 +functionTypeAlias
   1.381 +
   1.382 +	^(TokenParser for:#typedef) , functionPrefix , (typeParameters optional) , formalParameterList , (';' asParser)
   1.383 +!
   1.384 +
   1.385 +getOrSet
   1.386 +
   1.387 +	^ (TokenParser for:#get)
   1.388 +	/ (TokenParser for:#set)
   1.389 +	
   1.390 +!
   1.391 +
   1.392 +identifier
   1.393 +
   1.394 +        ^ (TokenParser for:#identifier_no_dollar)
   1.395 +        / (TokenParser for:#identifier)
   1.396 +        / (TokenParser for:#abstract)
   1.397 +        / (TokenParser for:#assert)
   1.398 +        / (TokenParser for:#class)
   1.399 +        / (TokenParser for:#extends)
   1.400 +        / (TokenParser for:#factory)
   1.401 +        / (TokenParser for:#get)
   1.402 +        / (TokenParser for:#implements)
   1.403 +        / (TokenParser for:#import)
   1.404 +        / (TokenParser for:#interface)
   1.405 +        / (TokenParser for:#is)
   1.406 +        / (TokenParser for:#library)
   1.407 +        / (TokenParser for:#native)
   1.408 +        / (TokenParser for:#negate)
   1.409 +        / (TokenParser for:#operator)
   1.410 +        / (TokenParser for:#set)
   1.411 +        / (TokenParser for:#source)
   1.412 +        / (TokenParser for:#static)
   1.413 +        / (TokenParser for:#typedef)
   1.414 +
   1.415 +    "Modified: / 11-01-2013 / 13:25:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.416 +!
   1.417 +
   1.418 +importReference
   1.419 +
   1.420 +	^(((TokenParser for:#identifier) , (':' asParser)) optional) , (TokenParser for:#string)
   1.421 +!
   1.422 +
   1.423 +importReferences
   1.424 +
   1.425 +	^importReference , (((',' asParser) , importReference) star) , ((',' asParser) optional)
   1.426 +!
   1.427 +
   1.428 +incrementOperator
   1.429 +
   1.430 +        ^ ('++' asParser)
   1.431 +        / ('--' asParser)
   1.432 +
   1.433 +    "Created: / 11-01-2013 / 13:27:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.434 +!
   1.435 +
   1.436 +initializedIdentifier
   1.437 +
   1.438 +	^identifier , ((('=' asParser) , constantExpression) optional)
   1.439 +!
   1.440 +
   1.441 +initializedIdentifierList
   1.442 +
   1.443 +	^initializedIdentifier , (((',' asParser) , initializedIdentifier) star)
   1.444 +!
   1.445 +
   1.446 +initializedVariableDeclaration
   1.447 +
   1.448 +	^declaredIdentifier , ((('=' asParser) , constantExpression) optional) , (((',' asParser) , initializedIdentifier) star)
   1.449 +!
   1.450 +
   1.451 +initializers
   1.452 +
   1.453 +	^(':' asParser) , superCallOrFieldInitializer , (((',' asParser) , superCallOrFieldInitializer) star)
   1.454 +!
   1.455 +
   1.456 +interfaceDefinition
   1.457 +
   1.458 +	^(TokenParser for:#interface) , identifier , (typeParameters optional) , (superinterfaces optional) , (factorySpecification optional) , ('{' asParser) , (interfaceMemberDefinition star) , ('}' asParser)
   1.459 +!
   1.460 +
   1.461 +interfaceMemberDefinition
   1.462 +
   1.463 +	^ ((TokenParser for:#static) , (TokenParser for:#final) , (type optional) , initializedIdentifierList , (';' asParser))
   1.464 +	/ (functionDeclaration , (';' asParser))
   1.465 +	/ (constantConstructorDeclaration , (';' asParser))
   1.466 +	/ (namedConstructorDeclaration , (';' asParser))
   1.467 +	/ (specialSignatureDefinition , (';' asParser))
   1.468 +	/ (variableDeclaration , (';' asParser))
   1.469 +	
   1.470 +!
   1.471 +
   1.472 +interfaces
   1.473 +
   1.474 +	^(TokenParser for:#implements) , typeList
   1.475 +!
   1.476 +
   1.477 +isOperator
   1.478 +
   1.479 +	^(TokenParser for:#is) , (('!!' asParser) optional)
   1.480 +!
   1.481 +
   1.482 +iterationStatement
   1.483 +
   1.484 +	^ ((TokenParser for:#while) , ('(' asParser) , constantExpression , (')' asParser) , statement)
   1.485 +	/ ((TokenParser for:#do) , statement , (TokenParser for:#while) , ('(' asParser) , constantExpression , (')' asParser) , (';' asParser))
   1.486 +	/ ((TokenParser for:#for) , ('(' asParser) , forLoopParts , (')' asParser) , statement)
   1.487 +	
   1.488 +!
   1.489 +
   1.490 +label
   1.491 +
   1.492 +	^identifier , (':' asParser)
   1.493 +!
   1.494 +
   1.495 +libraryBody
   1.496 +
   1.497 +	^(libraryImport optional) , (librarySource optional)
   1.498 +!
   1.499 +
   1.500 +libraryDefinition
   1.501 +
   1.502 +	^(TokenParser for:#library) , ('{' asParser) , libraryBody , ('}' asParser)
   1.503 +!
   1.504 +
   1.505 +libraryImport
   1.506 +
   1.507 +	^(TokenParser for:#import) , ('=' asParser) , ('[' asParser) , (importReferences optional) , (']' asParser)
   1.508 +!
   1.509 +
   1.510 +librarySource
   1.511 +
   1.512 +	^(TokenParser for:#source) , ('=' asParser) , ('[' asParser) , (sourceUrls optional) , (']' asParser)
   1.513 +!
   1.514 +
   1.515 +libraryUnit
   1.516 +
   1.517 +        ^libraryDefinition end
   1.518 +
   1.519 +    "Modified: / 11-01-2013 / 10:07:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.520 +!
   1.521 +
   1.522 +listLiteral
   1.523 +
   1.524 +	^('[' asParser) , ((expressionList , ((',' asParser) optional)) optional) , (']' asParser)
   1.525 +!
   1.526 +
   1.527 +literal
   1.528 +
   1.529 +        ^ (TokenParser for: #null)
   1.530 +        / (TokenParser for: #true)
   1.531 +        / (TokenParser for: #false)
   1.532 +        / (TokenParser for: #number)
   1.533 +        / (TokenParser for:#string)
   1.534 +
   1.535 +    "Modified: / 11-01-2013 / 10:08:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.536 +!
   1.537 +
   1.538 +logicalAndExpression
   1.539 +
   1.540 +	^bitwiseOrExpression , ((('&&' asParser) , bitwiseOrExpression) star)
   1.541 +!
   1.542 +
   1.543 +logicalOrExpression
   1.544 +
   1.545 +	^logicalAndExpression , ((('||' asParser) , logicalAndExpression) star)
   1.546 +!
   1.547 +
   1.548 +mapLiteral
   1.549 +
   1.550 +	^('{' asParser) , ((mapLiteralEntry , (((',' asParser) , mapLiteralEntry) star) , ((',' asParser) optional)) optional) , ('}' asParser)
   1.551 +!
   1.552 +
   1.553 +mapLiteralEntry
   1.554 +
   1.555 +	^(TokenParser for:#string) , (':' asParser) , constantExpression
   1.556 +!
   1.557 +
   1.558 +methodDeclaration
   1.559 +
   1.560 +	^ factoryConstructorDeclaration
   1.561 +	/ ((TokenParser for:#static) , functionDeclaration)
   1.562 +	/ specialSignatureDefinition
   1.563 +	/ (functionDeclaration , (initializers optional))
   1.564 +	/ (namedConstructorDeclaration , (initializers optional))
   1.565 +	
   1.566 +!
   1.567 +
   1.568 +multiplicativeExpression
   1.569 +
   1.570 +	^ (unaryExpression , ((multiplicativeOperator , unaryExpression) star))
   1.571 +	/ ((TokenParser for:#super) , ((multiplicativeOperator , unaryExpression) plus))
   1.572 +	
   1.573 +!
   1.574 +
   1.575 +multiplicativeOperator
   1.576 +
   1.577 +	^ ('*' asParser)
   1.578 +	/ ('/' asParser)
   1.579 +	/ ('%' asParser)
   1.580 +	/ ('~/' asParser)
   1.581 +	
   1.582 +!
   1.583 +
   1.584 +namedArgument
   1.585 +
   1.586 +	^label , constantExpression
   1.587 +!
   1.588 +
   1.589 +namedConstructorDeclaration
   1.590 +
   1.591 +	^identifier , ('.' asParser) , identifier , formalParameterList
   1.592 +!
   1.593 +
   1.594 +namedFormalParameters
   1.595 +
   1.596 +	^('[' asParser) , defaultFormalParameter , (((',' asParser) , defaultFormalParameter) star) , (']' asParser)
   1.597 +!
   1.598 +
   1.599 +negateOperator
   1.600 +
   1.601 +	^ ('!!' asParser)
   1.602 +	/ ('~' asParser)
   1.603 +	
   1.604 +!
   1.605 +
   1.606 +nonLabelledStatement
   1.607 +
   1.608 +        ^ block
   1.609 +        / (initializedVariableDeclaration , (';' asParser))
   1.610 +        / iterationStatement
   1.611 +        / selectionStatement
   1.612 +        / tryStatement
   1.613 +        / ((TokenParser for: #break) , (identifier optional) , (';' asParser))
   1.614 +        / ((TokenParser for: #continue) , (identifier optional) , (';' asParser))
   1.615 +        / ((TokenParser for: #return) , (constantExpression optional) , (';' asParser))
   1.616 +        / ((TokenParser for: #throw) , (constantExpression optional) , (';' asParser))
   1.617 +        / ((constantExpression optional) , (';' asParser))
   1.618 +        / ((TokenParser for: #assert) , ('(' asParser) , conditionalExpression , (')' asParser) , (';' asParser))
   1.619 +        / (functionDeclaration , functionBody)
   1.620 +
   1.621 +    "Modified: / 11-01-2013 / 10:09:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.622 +!
   1.623 +
   1.624 +normalFormalParameter
   1.625 +
   1.626 +	^ functionDeclaration
   1.627 +	/ fieldFormalParameter
   1.628 +	/ simpleFormalParameter
   1.629 +	
   1.630 +!
   1.631 +
   1.632 +normalFormalParameterTail
   1.633 +
   1.634 +	^ ((',' asParser) , namedFormalParameters)
   1.635 +	/ ((',' asParser) , normalFormalParameter , (normalFormalParameterTail optional))
   1.636 +	
   1.637 +!
   1.638 +
   1.639 +postfixExpression
   1.640 +
   1.641 +	^ (assignableExpression , postfixOperator)
   1.642 +	/ (primary , (selector star))
   1.643 +	
   1.644 +!
   1.645 +
   1.646 +postfixOperator
   1.647 +
   1.648 +	^ ('++' asParser)
   1.649 +	/ ('--' asParser)
   1.650 +	
   1.651 +!
   1.652 +
   1.653 +prefixOperator
   1.654 +
   1.655 +	^ additiveOperator
   1.656 +	/ negateOperator
   1.657 +	
   1.658 +!
   1.659 +
   1.660 +primary
   1.661 +
   1.662 +	^ primaryNoFE
   1.663 +	/ primaryFE
   1.664 +	
   1.665 +!
   1.666 +
   1.667 +primaryFE
   1.668 +
   1.669 +	^ functionExpression
   1.670 +	/ primaryNoFE
   1.671 +	
   1.672 +!
   1.673 +
   1.674 +primaryNoFE
   1.675 +
   1.676 +        ^ (TokenParser for:#this)
   1.677 +        / ((TokenParser for:#super) , assignableSelector)
   1.678 +        / literal
   1.679 +        / identifier
   1.680 +        / (((TokenParser for:#const) optional) , (typeArguments optional) , compoundLiteral)
   1.681 +        / (((TokenParser for: #new) / (TokenParser for:#const) ) , type , ((('.' asParser) , identifier) optional) , arguments)
   1.682 +        / expressionInParentheses
   1.683 +
   1.684 +    "Modified: / 11-01-2013 / 10:09:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.685 +!
   1.686 +
   1.687 +qualified
   1.688 +
   1.689 +	^identifier , ((('.' asParser) , identifier) optional)
   1.690 +!
   1.691 +
   1.692 +redirection
   1.693 +
   1.694 +	^(':' asParser) , (TokenParser for:#this) , ((('.' asParser) , identifier) optional) , arguments
   1.695 +!
   1.696 +
   1.697 +relationalExpression
   1.698 +
   1.699 +	^ (shiftExpression , (((isOperator , type) / (relationalOperator , shiftExpression) ) optional))
   1.700 +	/ ((TokenParser for:#super) , relationalOperator , shiftExpression)
   1.701 +	
   1.702 +!
   1.703 +
   1.704 +relationalOperator
   1.705 +
   1.706 +	^ (('>' asParser) , ('=' asParser))
   1.707 +	/ ('>' asParser)
   1.708 +	/ ('<=' asParser)
   1.709 +	/ ('<' asParser)
   1.710 +	
   1.711 +!
   1.712 +
   1.713 +returnType
   1.714 +
   1.715 +        ^ (TokenParser for: #void)
   1.716 +        / type
   1.717 +
   1.718 +    "Modified: / 11-01-2013 / 10:09:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.719 +!
   1.720 +
   1.721 +selectionStatement
   1.722 +
   1.723 +        ^ ((TokenParser for: #if) , ('(' asParser) , constantExpression , (')' asParser) , statement , (((TokenParser for: #else) , statement) optional))
   1.724 +        / ((TokenParser for: #switch) , ('(' asParser) , constantExpression , (')' asParser) , ('{' asParser) , (switchCase star) , (defaultCase optional) , ('}' asParser))
   1.725 +
   1.726 +    "Modified: / 11-01-2013 / 10:10:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.727 +!
   1.728 +
   1.729 +selector
   1.730 +
   1.731 +	^ assignableSelector
   1.732 +	/ arguments
   1.733 +	
   1.734 +!
   1.735 +
   1.736 +shiftExpression
   1.737 +
   1.738 +	^ (additiveExpression , ((shiftOperator , additiveExpression) star))
   1.739 +	/ ((TokenParser for:#super) , ((shiftOperator , additiveExpression) plus))
   1.740 +	
   1.741 +!
   1.742 +
   1.743 +shiftOperator
   1.744 +
   1.745 +	^ ('<<' asParser)
   1.746 +	/ (('>' asParser) , ('>' asParser) , ('>' asParser))
   1.747 +	/ (('>' asParser) , ('>' asParser))
   1.748 +	
   1.749 +!
   1.750 +
   1.751 +simpleFormalParameter
   1.752 +
   1.753 +	^ declaredIdentifier
   1.754 +	/ identifier
   1.755 +	
   1.756 +!
   1.757 +
   1.758 +sourceUrls
   1.759 +
   1.760 +	^(TokenParser for:#string) , (((',' asParser) , (TokenParser for:#string)) star) , ((',' asParser) optional)
   1.761 +!
   1.762 +
   1.763 +specialSignatureDefinition
   1.764 +
   1.765 +        ^ (((TokenParser for:#static) optional) , (returnType optional) , getOrSet , identifier , formalParameterList)
   1.766 +        / ((returnType optional) , (TokenParser for: #operator) , userDefinableOperator , formalParameterList)
   1.767 +
   1.768 +    "Modified: / 11-01-2013 / 10:10:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.769 +!
   1.770 +
   1.771 +statement
   1.772 +
   1.773 +	^(label star) , nonLabelledStatement
   1.774 +!
   1.775 +
   1.776 +statements
   1.777 +
   1.778 +	^statement star
   1.779 +!
   1.780 +
   1.781 +staticFinalDeclaration
   1.782 +
   1.783 +	^identifier , ('=' asParser) , constantExpression
   1.784 +!
   1.785 +
   1.786 +staticFinalDeclarationList
   1.787 +
   1.788 +	^staticFinalDeclaration , (((',' asParser) , staticFinalDeclaration) star)
   1.789 +!
   1.790 +
   1.791 +superCallOrFieldInitializer
   1.792 +
   1.793 +	^ ((TokenParser for:#super) , arguments)
   1.794 +	/ ((TokenParser for:#super) , ('.' asParser) , identifier , arguments)
   1.795 +	/ fieldInitializer
   1.796 +	
   1.797 +!
   1.798 +
   1.799 +superclass
   1.800 +
   1.801 +        ^(TokenParser for: #extends) , type
   1.802 +
   1.803 +    "Modified: / 11-01-2013 / 10:10:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.804 +!
   1.805 +
   1.806 +superinterfaces
   1.807 +
   1.808 +        ^(TokenParser for: #extends) , typeList
   1.809 +
   1.810 +    "Modified: / 11-01-2013 / 10:10:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.811 +!
   1.812 +
   1.813 +switchCase
   1.814 +
   1.815 +	^(label optional) , (((TokenParser for:#case) , constantExpression , (':' asParser)) plus) , statements
   1.816 +!
   1.817 +
   1.818 +topLevelDefinition
   1.819 +
   1.820 +	^ classDefinition
   1.821 +	/ interfaceDefinition
   1.822 +	/ functionTypeAlias
   1.823 +	/ (functionDeclaration , functionBodyOrNative)
   1.824 +	/ ((returnType optional) , getOrSet , identifier , formalParameterList , functionBodyOrNative)
   1.825 +	/ ((TokenParser for:#final) , (type optional) , staticFinalDeclarationList , (';' asParser))
   1.826 +	/ (constInitializedVariableDeclaration , (';' asParser))
   1.827 +	
   1.828 +!
   1.829 +
   1.830 +tryStatement
   1.831 +
   1.832 +        ^(TokenParser for: #try) , block , (((catchPart plus) , (finallyPart optional)) / finallyPart )
   1.833 +
   1.834 +    "Modified: / 11-01-2013 / 10:10:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.835 +!
   1.836 +
   1.837 +type
   1.838 +
   1.839 +	^qualified , (typeArguments optional)
   1.840 +!
   1.841 +
   1.842 +typeArguments
   1.843 +
   1.844 +	^('<' asParser) , typeList , ('>' asParser)
   1.845 +!
   1.846 +
   1.847 +typeList
   1.848 +
   1.849 +	^type , (((',' asParser) , type) star)
   1.850 +!
   1.851 +
   1.852 +typeParameter
   1.853 +
   1.854 +        ^identifier , (((TokenParser for: #extends) , type) optional)
   1.855 +
   1.856 +    "Modified: / 11-01-2013 / 10:11:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.857 +!
   1.858 +
   1.859 +typeParameters
   1.860 +
   1.861 +	^('<' asParser) , typeParameter , (((',' asParser) , typeParameter) star) , ('>' asParser)
   1.862 +!
   1.863 +
   1.864 +unaryExpression
   1.865 +
   1.866 +	^ postfixExpression
   1.867 +	/ (prefixOperator , unaryExpression)
   1.868 +	/ (negateOperator , (TokenParser for:#super))
   1.869 +	/ (('-' asParser) , (TokenParser for:#super))
   1.870 +	/ (postfixOperator , assignableExpression)
   1.871 +	
   1.872 +!
   1.873 +
   1.874 +userDefinableOperator
   1.875 +
   1.876 +        ^ multiplicativeOperator
   1.877 +        / additiveOperator
   1.878 +        / shiftOperator
   1.879 +        / relationalOperator
   1.880 +        / bitwiseOperator
   1.881 +        / ('==' asParser)
   1.882 +        / ('~' asParser)
   1.883 +        / (TokenParser for: #negate)
   1.884 +        / (('[' asParser) , (']' asParser))
   1.885 +        / (('[' asParser) , (']' asParser) , ('=' asParser))
   1.886 +
   1.887 +    "Modified: / 11-01-2013 / 10:11:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.888 +!
   1.889 +
   1.890 +variableDeclaration
   1.891 +
   1.892 +	^declaredIdentifier , (((',' asParser) , identifier) star)
   1.893 +! !
   1.894 +
   1.895 +!Parser methodsFor:'initialization'!
   1.896 +
   1.897 +initializeStartingAt: aSymbol
   1.898 +        | allVariableNames ignoredVariableNames productionIndexesAndNames debugger |
   1.899 +        self initialize.        
   1.900 +
   1.901 +        Debugging ifTrue:[
   1.902 +            PPDebugger notNil ifTrue:[
   1.903 +                self assert: (Smalltalk loadPackage: 'stx:goodies/petitparser/devtools').
   1.904 +                debugger := PPDebugger new
   1.905 +            ].
   1.906 +        ].
   1.907 +        "find all the productions that need to be initialized"
   1.908 +        allVariableNames := self class allInstVarNames
   1.909 +                collect: [ :each | each asSymbol ].
   1.910 +        ignoredVariableNames := self class ignoredNames
   1.911 +                collect: [ :each | each asSymbol ].
   1.912 +        productionIndexesAndNames := ((1 to: self class instSize)
   1.913 +                collect: [ :index | index -> (allVariableNames at: index) ])
   1.914 +                reject: [ :assoc | ignoredVariableNames includes: assoc value ].
   1.915 +
   1.916 +        "initialize productions with an undefined parser to be replaced later"
   1.917 +        parser := PPUnresolvedParser named: aSymbol.
   1.918 +        productionIndexesAndNames do: [ :assoc |
   1.919 +                self instVarAt: assoc key put: (PPUnresolvedParser named: assoc value) ].
   1.920 +        parser def: (self perform: aSymbol).
   1.921 +
   1.922 +        "resolve unresolved parsers with their actual implementation"
   1.923 +        productionIndexesAndNames do: [ :assoc |
   1.924 +                (self respondsTo: assoc value)
   1.925 +                        ifFalse: [ self error: 'Unable to initialize ' , assoc value printString ]
   1.926 +                        ifTrue: [ 
   1.927 +                            | production |
   1.928 +                            production := ((self perform: assoc value)  name: assoc value; yourself).
   1.929 +                            Debugging ifTrue:[
   1.930 +                                production := PPDebuggingParser parser: production  debugger: debugger
   1.931 +                            ].
   1.932 +
   1.933 +                            (self instVarAt: assoc key) def: production.
   1.934 +
   1.935 +                                ] ]
   1.936 +
   1.937 +    "Created: / 12-03-2012 / 16:51:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.938 +    "Modified: / 11-01-2013 / 11:35:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   1.939 +! !
   1.940 +
   1.941  !Parser::TokenParser class methodsFor:'instance creation'!
   1.942  
   1.943  for: tokenType
   1.944 @@ -931,3 +1856,5 @@
   1.945  
   1.946      ^ '$Changeset: <not expanded> $'
   1.947  ! !
   1.948 +
   1.949 +Parser initialize!
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/compiler/Dart__ParserError.st	Fri Jan 11 13:40:41 2013 +0000
     2.3 @@ -0,0 +1,44 @@
     2.4 +"{ Package: 'jv:dart/compiler' }"
     2.5 +
     2.6 +"{ NameSpace: Dart }"
     2.7 +
     2.8 +Error subclass:#ParserError
     2.9 +	instanceVariableNames:'startPosition endPosition lineNumber'
    2.10 +	classVariableNames:''
    2.11 +	poolDictionaries:''
    2.12 +	category:'Languages-Dart-Parser'
    2.13 +!
    2.14 +
    2.15 +
    2.16 +!ParserError methodsFor:'accessing'!
    2.17 +
    2.18 +endPosition
    2.19 +    ^ endPosition
    2.20 +!
    2.21 +
    2.22 +endPosition:something
    2.23 +    endPosition := something.
    2.24 +!
    2.25 +
    2.26 +lineNumber
    2.27 +    ^ lineNumber
    2.28 +!
    2.29 +
    2.30 +lineNumber:something
    2.31 +    lineNumber := something.
    2.32 +!
    2.33 +
    2.34 +startPosition
    2.35 +    ^ startPosition
    2.36 +!
    2.37 +
    2.38 +startPosition:something
    2.39 +    startPosition := something.
    2.40 +! !
    2.41 +
    2.42 +!ParserError class methodsFor:'documentation'!
    2.43 +
    2.44 +version_HG
    2.45 +
    2.46 +    ^ '$Changeset: <not expanded> $'
    2.47 +! !
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/compiler/Dart__ParserTests.st	Fri Jan 11 13:40:41 2013 +0000
     3.3 @@ -0,0 +1,91 @@
     3.4 +"{ Package: 'jv:dart/compiler' }"
     3.5 +
     3.6 +"{ NameSpace: Dart }"
     3.7 +
     3.8 +PPCompositeParserTest subclass:#ParserTests
     3.9 +	instanceVariableNames:''
    3.10 +	classVariableNames:''
    3.11 +	poolDictionaries:''
    3.12 +	category:'Languages-Dart-Parser-Tests'
    3.13 +!
    3.14 +
    3.15 +
    3.16 +!ParserTests methodsFor:'accessing'!
    3.17 +
    3.18 +parserClass
    3.19 +        ^ Dart::Parser
    3.20 +
    3.21 +    "Modified: / 11-01-2013 / 13:14:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.22 +! !
    3.23 +
    3.24 +!ParserTests methodsFor:'parsing'!
    3.25 +
    3.26 +fail: aString rule: aSymbol 
    3.27 +
    3.28 +    ^super fail: (Dart::Scanner for: aString) rule: aSymbol
    3.29 +
    3.30 +    "Created: / 14-03-2012 / 22:51:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.31 +    "Modified: / 11-01-2013 / 13:28:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.32 +!
    3.33 +
    3.34 +parse: aString rule: aSymbol 
    3.35 +
    3.36 +    ^super parse: (Dart::Scanner for: aString) rule: aSymbol
    3.37 +
    3.38 +    "Created: / 14-03-2012 / 22:51:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.39 +    "Modified: / 11-01-2013 / 13:29:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.40 +! !
    3.41 +
    3.42 +!ParserTests methodsFor:'tests - smoke'!
    3.43 +
    3.44 +test_smoke_01
    3.45 +    self parse: 'import ''dart:html'';
    3.46 +
    3.47 +void main() {
    3.48 +
    3.49 +}'
    3.50 +
    3.51 +    "Created: / 11-01-2013 / 13:15:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.52 +!
    3.53 +
    3.54 +test_smoke_01a
    3.55 +    self parse: 'void main() { }'
    3.56 +
    3.57 +    "Created: / 11-01-2013 / 13:37:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.58 +!
    3.59 +
    3.60 +test_smoke_02
    3.61 +    self parse: 'import ''dart:html'';
    3.62 +
    3.63 +void main() {
    3.64 +    var a = 1 + 1;
    3.65 +
    3.66 +}'
    3.67 +
    3.68 +    "Created: / 11-01-2013 / 13:30:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.69 +!
    3.70 +
    3.71 +test_smoke_03
    3.72 +    self parse: '
    3.73 +
    3.74 +class Test {
    3.75 +  void foo() {
    3.76 +    print("Foo");
    3.77 +  }
    3.78 +}
    3.79 +
    3.80 +void main() {1
    3.81 +  1 = 1 + 1;
    3.82 +  Test foo = new Test();
    3.83 +  foo.foo();  
    3.84 +}'
    3.85 +
    3.86 +    "Created: / 11-01-2013 / 13:34:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.87 +! !
    3.88 +
    3.89 +!ParserTests class methodsFor:'documentation'!
    3.90 +
    3.91 +version_HG
    3.92 +
    3.93 +    ^ '$Changeset: <not expanded> $'
    3.94 +! !
     4.1 --- a/compiler/Dart__Scanner.st	Fri Jan 11 10:12:41 2013 +0000
     4.2 +++ b/compiler/Dart__Scanner.st	Fri Jan 11 13:40:41 2013 +0000
     4.3 @@ -106,7 +106,7 @@
     4.4      TypeArray := Array new:256.
     4.5  
     4.6      block := [:s :char | s nextNumber].
     4.7 -    ($0 asciiValue) to:($9 asciiValue) do:[:index |
     4.8 +    ($0 codePoint) to:($9 codePoint) do:[:index |
     4.9          ActionArray at:index put:block
    4.10      ].
    4.11  
    4.12 @@ -116,34 +116,34 @@
    4.13      ].
    4.14  
    4.15      block := [:s :char | s nextIdentifier].
    4.16 -    ($a asciiValue) to:($z asciiValue) do:[:index |
    4.17 +    ($a codePoint) to:($z codePoint) do:[:index |
    4.18          ActionArray at:index put:block
    4.19      ].
    4.20 -    ($A asciiValue) to:($Z asciiValue) do:[:index |
    4.21 +    ($A codePoint) to:($Z codePoint) do:[:index |
    4.22          ActionArray at:index put:block
    4.23      ].
    4.24 -    ActionArray at:$_ asciiValue put:block.
    4.25 +    ActionArray at:$_ codePoint put:block.
    4.26  
    4.27 -    ActionArray at:$$ asciiValue put:block.
    4.28 +    ActionArray at:$$ codePoint put:block.
    4.29  
    4.30 -    ActionArray at:($. asciiValue) put:[:s :char | s nextDotOrFloatOrEllipsis].
    4.31 +    ActionArray at:($. codePoint) put:[:s :char | s nextDotOrFloatOrEllipsis].
    4.32  
    4.33 -    ActionArray at:($' asciiValue) put:[:s :char | s nextString:$' character:true].
    4.34 -    ActionArray at:($" asciiValue) put:[:s :char | s nextString:$" character:false].
    4.35 -    ActionArray at:($!! asciiValue) put:[:s :char | s nextMulti:#(($= #'!!=')) after:char].
    4.36 -    ActionArray at:($= asciiValue) put:[:s :char | s nextMulti:#(($= #'==')) after:char].
    4.37 -    ActionArray at:($< asciiValue) put:[:s :char | s nextMulti:#(($= #'<=') ($< #'<<')) after:char].
    4.38 -    ActionArray at:($> asciiValue) put:[:s :char | s nextMulti:#(($= #'>=') ($> #'>>' $> #'>>>' $= #'>>>=')) after:char].
    4.39 +    ActionArray at:($' codePoint) put:[:s :char | s nextString:$' character:false].
    4.40 +    ActionArray at:($" codePoint) put:[:s :char | s nextString:$" character:false].
    4.41 +    ActionArray at:($!! codePoint) put:[:s :char | s nextMulti:#(($= #'!!=')) after:char].
    4.42 +    ActionArray at:($= codePoint) put:[:s :char | s nextMulti:#(($= #'==')) after:char].
    4.43 +    ActionArray at:($< codePoint) put:[:s :char | s nextMulti:#(($= #'<=') ($< #'<<')) after:char].
    4.44 +    ActionArray at:($> codePoint) put:[:s :char | s nextMulti:#(($= #'>=') ($> #'>>' $> #'>>>' $= #'>>>=')) after:char].
    4.45  
    4.46 -    ActionArray at:($- asciiValue) put:[:s :char | s nextMulti:#(($- #'--') ($= #'-=')) after:char].
    4.47 -    ActionArray at:($+ asciiValue) put:[:s :char | s nextMulti:#(($+ #'++') ($= #'+=')) after:char].
    4.48 -    ActionArray at:($* asciiValue) put:[:s :char | s nextMulti:#(($= #'*=')) after:char].
    4.49 -    ActionArray at:($/ asciiValue) put:[:s :char | s nextMulti:#(($= #'/=') ($/ nil #skipEOLComment) ($* nil #skipComment)) after:char].
    4.50 -    ActionArray at:($% asciiValue) put:[:s :char | s nextMulti:#(($= #'%=')) after:char].
    4.51 -    ActionArray at:($& asciiValue) put:[:s :char | s nextMulti:#(($= #'&=') ($& #'&&')) after:char].
    4.52 -    ActionArray at:($^ asciiValue) put:[:s :char | s nextMulti:#(($= #'^=')) after:char].
    4.53 -    ActionArray at:($~ asciiValue) put:[:s :char | s nextMulti:#(($= #'~=')) after:char].
    4.54 -    ActionArray at:($| asciiValue) put:[:s :char | s nextMulti:#(($= #'|=') ($| #'||')) after:char].
    4.55 +    ActionArray at:($- codePoint) put:[:s :char | s nextMulti:#(($- #'--') ($= #'-=')) after:char].
    4.56 +    ActionArray at:($+ codePoint) put:[:s :char | s nextMulti:#(($+ #'++') ($= #'+=')) after:char].
    4.57 +    ActionArray at:($* codePoint) put:[:s :char | s nextMulti:#(($= #'*=')) after:char].
    4.58 +    ActionArray at:($/ codePoint) put:[:s :char | s nextMulti:#(($= #'/=') ($/ nil #skipEOLComment) ($* nil #skipComment)) after:char].
    4.59 +    ActionArray at:($% codePoint) put:[:s :char | s nextMulti:#(($= #'%=')) after:char].
    4.60 +    ActionArray at:($& codePoint) put:[:s :char | s nextMulti:#(($= #'&=') ($& #'&&')) after:char].
    4.61 +    ActionArray at:($^ codePoint) put:[:s :char | s nextMulti:#(($= #'^=')) after:char].
    4.62 +    ActionArray at:($~ codePoint) put:[:s :char | s nextMulti:#(($= #'~=')) after:char].
    4.63 +    ActionArray at:($| codePoint) put:[:s :char | s nextMulti:#(($= #'|=') ($| #'||')) after:char].
    4.64  
    4.65      "
    4.66       self setupActions
    4.67 @@ -151,7 +151,7 @@
    4.68  
    4.69      "Created: / 14-05-1998 / 15:48:03 / cg"
    4.70      "Modified: / 17-05-1998 / 21:03:37 / cg"
    4.71 -    "Modified: / 16-03-2012 / 23:49:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    4.72 +    "Modified: / 11-01-2013 / 13:04:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    4.73  !
    4.74  
    4.75  setupKeywordTable
    4.76 @@ -218,6 +218,21 @@
    4.77      "Modified: / 10-01-2013 / 10:51:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    4.78  ! !
    4.79  
    4.80 +!Scanner class methodsFor:'utility scanning'!
    4.81 +
    4.82 +scan: aString
    4.83 +    | tokens scanner |
    4.84 +
    4.85 +    tokens := OrderedCollection new.
    4.86 +    scanner := (self for: aString).
    4.87 +    [ scanner atEnd ] whileFalse:[
    4.88 +        tokens add: scanner nextToken
    4.89 +    ].
    4.90 +    ^tokens
    4.91 +
    4.92 +    "Created: / 11-01-2013 / 12:57:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    4.93 +! !
    4.94 +
    4.95  !Scanner methodsFor:'accessing'!
    4.96  
    4.97  token
    4.98 @@ -1059,21 +1074,6 @@
    4.99      value := something.
   4.100  ! !
   4.101  
   4.102 -!Scanner::Token methodsFor:'printing & storing'!
   4.103 -
   4.104 -printOn:aStream
   4.105 -    "append a printed representation if the receiver to the argument, aStream"
   4.106 -
   4.107 -    super printOn:aStream.
   4.108 -    aStream nextPutAll:'type: '.
   4.109 -    type printOn:aStream.
   4.110 -    aStream nextPutAll:'value: '.
   4.111 -    value printOn:aStream.
   4.112 -    aStream nextPutAll:'startPosition: '.
   4.113 -    startPosition printOn:aStream.
   4.114 -    aStream nextPutAll:'endPosition: '.
   4.115 -    endPosition printOn:aStream.
   4.116 -! !
   4.117  
   4.118  !Scanner class methodsFor:'documentation'!
   4.119  
     5.1 --- a/compiler/Dart__ScannerBase.st	Fri Jan 11 10:12:41 2013 +0000
     5.2 +++ b/compiler/Dart__ScannerBase.st	Fri Jan 11 13:40:41 2013 +0000
     5.3 @@ -455,30 +455,39 @@
     5.4  parseError:aMessage
     5.5      "report an error"
     5.6  
     5.7 +    <resource: #skipInDebuggersWalkBack>
     5.8 +
     5.9      ^ self parseError:aMessage position:tokenStartPosition to:nil
    5.10  
    5.11 -    "Created: / 13.5.1998 / 16:45:13 / cg"
    5.12 +    "Created: / 13-05-1998 / 16:45:13 / cg"
    5.13 +    "Modified: / 11-01-2013 / 13:13:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.14  !
    5.15  
    5.16  parseError:aMessage position:position
    5.17      "report an error"
    5.18  
    5.19 +    <resource: #skipInDebuggersWalkBack>
    5.20 +
    5.21      ^ self parseError:aMessage position:position to:nil
    5.22  
    5.23 -    "Created: / 13.5.1998 / 16:45:05 / cg"
    5.24 +    "Created: / 13-05-1998 / 16:45:05 / cg"
    5.25 +    "Modified: / 11-01-2013 / 13:13:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.26  !
    5.27  
    5.28  parseError:aMessage position:position to:endPos
    5.29      "report an error"
    5.30  
    5.31 +    <resource: #skipInDebuggersWalkBack>
    5.32 +
    5.33      |m|
    5.34  
    5.35      m := (self errorMessagePrefix) , ' ' , (aMessage ? '???').
    5.36      self notifyError:m position:position to:endPos.
    5.37      ^ false
    5.38  
    5.39 -    "Created: / 13.5.1998 / 16:44:55 / cg"
    5.40 -    "Modified: / 28.9.1998 / 19:29:27 / cg"
    5.41 +    "Created: / 13-05-1998 / 16:44:55 / cg"
    5.42 +    "Modified: / 28-09-1998 / 19:29:27 / cg"
    5.43 +    "Modified: / 11-01-2013 / 13:13:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.44  !
    5.45  
    5.46  showErrorMessage:aMessage position:pos
    5.47 @@ -490,18 +499,28 @@
    5.48  syntaxError:aMessage
    5.49      "a syntax error happened - position is not known"
    5.50  
    5.51 +    <resource: #skipInDebuggersWalkBack>
    5.52 +
    5.53      ^ self syntaxError:aMessage position:tokenStartPosition
    5.54 +
    5.55 +    "Modified: / 11-01-2013 / 13:13:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.56  !
    5.57  
    5.58  syntaxError:aMessage position:position
    5.59      "a syntax error happened - only start position is known"
    5.60  
    5.61 +    <resource: #skipInDebuggersWalkBack>
    5.62 +
    5.63      ^ self syntaxError:aMessage position:position to:nil
    5.64 +
    5.65 +    "Modified: / 11-01-2013 / 13:13:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.66  !
    5.67  
    5.68  syntaxError:aMessage position:position to:endPos
    5.69      "a syntax error happened"
    5.70  
    5.71 +    <resource: #skipInDebuggersWalkBack>
    5.72 +
    5.73      |err|
    5.74  
    5.75      err := ScannerError new.
    5.76 @@ -510,24 +529,38 @@
    5.77      err lineNumber:tokenLineNr.
    5.78      err errorString:((self errorMessagePrefix) , ' ' , aMessage).
    5.79      err raiseRequest
    5.80 +
    5.81 +    "Modified: / 11-01-2013 / 13:13:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.82  !
    5.83  
    5.84  warning:aMessage
    5.85      "a warning - position is not known"
    5.86  
    5.87 +    <resource: #skipInDebuggersWalkBack>
    5.88 +
    5.89      ^ self warning:aMessage position:tokenStartPosition
    5.90 +
    5.91 +    "Modified: / 11-01-2013 / 13:13:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.92  !
    5.93  
    5.94  warning:aMessage position:position
    5.95      "a warning - only start position is known"
    5.96  
    5.97 +    <resource: #skipInDebuggersWalkBack>
    5.98 +
    5.99      ^ self warning:aMessage position:position to:nil
   5.100 +
   5.101 +    "Modified: / 11-01-2013 / 13:13:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   5.102  !
   5.103  
   5.104  warning:aMessage position:position to:endPos
   5.105      "a warning"
   5.106  
   5.107 +    <resource: #skipInDebuggersWalkBack>
   5.108 +
   5.109      ^ self notifyWarning:((self warningMessagePrefix) , ' ' , aMessage) position:position to:endPos
   5.110 +
   5.111 +    "Modified: / 11-01-2013 / 13:13:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   5.112  !
   5.113  
   5.114  warningMessagePrefix
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/compiler/Dart__ScannerError.st	Fri Jan 11 13:40:41 2013 +0000
     6.3 @@ -0,0 +1,18 @@
     6.4 +"{ Package: 'jv:dart/compiler' }"
     6.5 +
     6.6 +"{ NameSpace: Dart }"
     6.7 +
     6.8 +ParserError subclass:#ScannerError
     6.9 +	instanceVariableNames:''
    6.10 +	classVariableNames:''
    6.11 +	poolDictionaries:''
    6.12 +	category:'Languages-Dart-Parser'
    6.13 +!
    6.14 +
    6.15 +
    6.16 +!ScannerError class methodsFor:'documentation'!
    6.17 +
    6.18 +version_HG
    6.19 +
    6.20 +    ^ '$Changeset: <not expanded> $'
    6.21 +! !
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/compiler/Dart__ScannerTests.st	Fri Jan 11 13:40:41 2013 +0000
     7.3 @@ -0,0 +1,29 @@
     7.4 +"{ Package: 'jv:dart/compiler' }"
     7.5 +
     7.6 +"{ NameSpace: Dart }"
     7.7 +
     7.8 +TestCase subclass:#ScannerTests
     7.9 +	instanceVariableNames:''
    7.10 +	classVariableNames:''
    7.11 +	poolDictionaries:''
    7.12 +	category:'Languages-Dart-Parser-Tests'
    7.13 +!
    7.14 +
    7.15 +
    7.16 +!ScannerTests methodsFor:'tests'!
    7.17 +
    7.18 +test_01
    7.19 +
    7.20 +    self assert:
    7.21 +        (Dart::Scanner scan: 'import ''dart:html''; void main() { }') asArray
    7.22 +            = #(#import #String $; #void #identifier $( $) ${ $} )
    7.23 +
    7.24 +    "Created: / 11-01-2013 / 12:53:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    7.25 +! !
    7.26 +
    7.27 +!ScannerTests class methodsFor:'documentation'!
    7.28 +
    7.29 +version_HG
    7.30 +
    7.31 +    ^ '$Changeset: <not expanded> $'
    7.32 +! !
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/compiler/Dart__SyntaxError.st	Fri Jan 11 13:40:41 2013 +0000
     8.3 @@ -0,0 +1,18 @@
     8.4 +"{ Package: 'jv:dart/compiler' }"
     8.5 +
     8.6 +"{ NameSpace: Dart }"
     8.7 +
     8.8 +ParserError subclass:#SyntaxError
     8.9 +	instanceVariableNames:''
    8.10 +	classVariableNames:''
    8.11 +	poolDictionaries:''
    8.12 +	category:'Languages-Dart-Parser'
    8.13 +!
    8.14 +
    8.15 +
    8.16 +!SyntaxError class methodsFor:'documentation'!
    8.17 +
    8.18 +version_HG
    8.19 +
    8.20 +    ^ '$Changeset: <not expanded> $'
    8.21 +! !
     9.1 --- a/compiler/Make.proto	Fri Jan 11 10:12:41 2013 +0000
     9.2 +++ b/compiler/Make.proto	Fri Jan 11 13:40:41 2013 +0000
     9.3 @@ -34,7 +34,7 @@
     9.4  # add the path(es) here:,
     9.5  # ********** OPTIONAL: MODIFY the next lines ***
     9.6  # LOCALINCLUDES=-Ifoo -Ibar
     9.7 -LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/goodies/petitparser
     9.8 +LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/goodies/petitparser
     9.9  
    9.10  
    9.11  # if you need any additional defines for embedded C code,
    9.12 @@ -117,9 +117,14 @@
    9.13  
    9.14  # BEGINMAKEDEPEND --- do not remove this line; make depend needs it
    9.15  $(OUTDIR)Dart__Parser.$(O) Dart__Parser.$(H): Dart__Parser.st $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPDelegateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    9.16 +$(OUTDIR)Dart__ParserError.$(O) Dart__ParserError.$(H): Dart__ParserError.st $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    9.17 +$(OUTDIR)Dart__ParserTests.$(O) Dart__ParserTests.$(H): Dart__ParserTests.st $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPAbstractParseTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    9.18  $(OUTDIR)Dart__ScannerBase.$(O) Dart__ScannerBase.$(H): Dart__ScannerBase.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    9.19 +$(OUTDIR)Dart__ScannerTests.$(O) Dart__ScannerTests.$(H): Dart__ScannerTests.st $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    9.20  $(OUTDIR)jv_dart_compiler.$(O) jv_dart_compiler.$(H): jv_dart_compiler.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    9.21  $(OUTDIR)Dart__Scanner.$(O) Dart__Scanner.$(H): Dart__Scanner.st $(INCLUDE_TOP)/jv/dart/compiler/Dart__ScannerBase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    9.22 +$(OUTDIR)Dart__ScannerError.$(O) Dart__ScannerError.$(H): Dart__ScannerError.st $(INCLUDE_TOP)/jv/dart/compiler/Dart__ParserError.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    9.23 +$(OUTDIR)Dart__SyntaxError.$(O) Dart__SyntaxError.$(H): Dart__SyntaxError.st $(INCLUDE_TOP)/jv/dart/compiler/Dart__ParserError.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    9.24  
    9.25  # ENDMAKEDEPEND --- do not remove this line
    9.26  
    10.1 --- a/compiler/Make.spec	Fri Jan 11 10:12:41 2013 +0000
    10.2 +++ b/compiler/Make.spec	Fri Jan 11 13:40:41 2013 +0000
    10.3 @@ -54,6 +54,11 @@
    10.4  	Dart::ScannerBase \
    10.5  	Dart::Parser \
    10.6  	Dart::Scanner \
    10.7 +	Dart::ScannerTests \
    10.8 +	Dart::ParserError \
    10.9 +	Dart::SyntaxError \
   10.10 +	Dart::ScannerError \
   10.11 +	Dart::ParserTests \
   10.12  
   10.13  
   10.14  
   10.15 @@ -63,6 +68,11 @@
   10.16      $(OUTDIR)Dart__ScannerBase.$(O) \
   10.17      $(OUTDIR)Dart__Parser.$(O) \
   10.18      $(OUTDIR)Dart__Scanner.$(O) \
   10.19 +    $(OUTDIR)Dart__ScannerTests.$(O) \
   10.20 +    $(OUTDIR)Dart__ParserError.$(O) \
   10.21 +    $(OUTDIR)Dart__SyntaxError.$(O) \
   10.22 +    $(OUTDIR)Dart__ScannerError.$(O) \
   10.23 +    $(OUTDIR)Dart__ParserTests.$(O) \
   10.24  
   10.25  
   10.26  
    11.1 --- a/compiler/abbrev.stc	Fri Jan 11 10:12:41 2013 +0000
    11.2 +++ b/compiler/abbrev.stc	Fri Jan 11 13:40:41 2013 +0000
    11.3 @@ -5,3 +5,8 @@
    11.4  Dart::ScannerBase Dart__ScannerBase jv:dart/compiler 'Languages-Dart-Parser' 3
    11.5  Dart::Parser Dart__Parser jv:dart/compiler 'Languages-Dart-Parser' 0
    11.6  Dart::Scanner Dart__Scanner jv:dart/compiler 'Languages-Dart-Parser' 3
    11.7 +Dart::ScannerTests Dart__ScannerTests jv:dart/compiler 'Languages-Dart-Parser-Tests' 1
    11.8 +Dart::ParserError Dart__ParserError jv:dart/compiler 'Languages-Dart-Parser' 1
    11.9 +Dart::SyntaxError Dart__SyntaxError jv:dart/compiler 'Languages-Dart-Parser' 1
   11.10 +Dart::ScannerError Dart__ScannerError jv:dart/compiler 'Languages-Dart-Parser' 1
   11.11 +Dart::ParserTests Dart__ParserTests jv:dart/compiler 'Languages-Dart-Parser-Tests' 1
    12.1 --- a/compiler/bc.mak	Fri Jan 11 10:12:41 2013 +0000
    12.2 +++ b/compiler/bc.mak	Fri Jan 11 13:40:41 2013 +0000
    12.3 @@ -34,7 +34,7 @@
    12.4  
    12.5  
    12.6  
    12.7 -LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\goodies\petitparser
    12.8 +LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\goodies\petitparser
    12.9  LOCALDEFINES=
   12.10  
   12.11  STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES)  -varPrefix=$(LIBNAME)
   12.12 @@ -64,9 +64,14 @@
   12.13  
   12.14  # BEGINMAKEDEPEND --- do not remove this line; make depend needs it
   12.15  $(OUTDIR)Dart__Parser.$(O) Dart__Parser.$(H): Dart__Parser.st $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPDelegateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   12.16 +$(OUTDIR)Dart__ParserError.$(O) Dart__ParserError.$(H): Dart__ParserError.st $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   12.17 +$(OUTDIR)Dart__ParserTests.$(O) Dart__ParserTests.$(H): Dart__ParserTests.st $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPAbstractParseTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   12.18  $(OUTDIR)Dart__ScannerBase.$(O) Dart__ScannerBase.$(H): Dart__ScannerBase.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   12.19 +$(OUTDIR)Dart__ScannerTests.$(O) Dart__ScannerTests.$(H): Dart__ScannerTests.st $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   12.20  $(OUTDIR)jv_dart_compiler.$(O) jv_dart_compiler.$(H): jv_dart_compiler.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   12.21  $(OUTDIR)Dart__Scanner.$(O) Dart__Scanner.$(H): Dart__Scanner.st $(INCLUDE_TOP)\jv\dart\compiler\Dart__ScannerBase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   12.22 +$(OUTDIR)Dart__ScannerError.$(O) Dart__ScannerError.$(H): Dart__ScannerError.st $(INCLUDE_TOP)\jv\dart\compiler\Dart__ParserError.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   12.23 +$(OUTDIR)Dart__SyntaxError.$(O) Dart__SyntaxError.$(H): Dart__SyntaxError.st $(INCLUDE_TOP)\jv\dart\compiler\Dart__ParserError.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   12.24  
   12.25  # ENDMAKEDEPEND --- do not remove this line
   12.26  
    13.1 --- a/compiler/jv_dart_compiler.st	Fri Jan 11 10:12:41 2013 +0000
    13.2 +++ b/compiler/jv_dart_compiler.st	Fri Jan 11 13:40:41 2013 +0000
    13.3 @@ -45,9 +45,14 @@
    13.4          #'Dart::ScannerBase'
    13.5          #'Dart::Parser'
    13.6          #'Dart::Scanner'
    13.7 +        #'Dart::ScannerTests'
    13.8 +        #'Dart::ParserError'
    13.9 +        #'Dart::SyntaxError'
   13.10 +        #'Dart::ScannerError'
   13.11 +        #'Dart::ParserTests'
   13.12      )
   13.13  
   13.14 -    "Modified: / 10-01-2013 / 13:15:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   13.15 +    "Modified: / 11-01-2013 / 13:39:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   13.16  !
   13.17  
   13.18  extensionMethodNames
    14.1 --- a/compiler/libInit.cc	Fri Jan 11 10:12:41 2013 +0000
    14.2 +++ b/compiler/libInit.cc	Fri Jan 11 13:40:41 2013 +0000
    14.3 @@ -28,9 +28,14 @@
    14.4  OBJ snd; struct __vmData__ *__pRT__; {
    14.5  __BEGIN_PACKAGE2__("libjv_dart_compiler", _libjv_dart_compiler_Init, "jv:dart/compiler");
    14.6  _Dart__Parser_Init(pass,__pRT__,snd);
    14.7 +_Dart__ParserError_Init(pass,__pRT__,snd);
    14.8 +_Dart__ParserTests_Init(pass,__pRT__,snd);
    14.9  _Dart__ScannerBase_Init(pass,__pRT__,snd);
   14.10 +_Dart__ScannerTests_Init(pass,__pRT__,snd);
   14.11  _jv_137dart_137compiler_Init(pass,__pRT__,snd);
   14.12  _Dart__Scanner_Init(pass,__pRT__,snd);
   14.13 +_Dart__ScannerError_Init(pass,__pRT__,snd);
   14.14 +_Dart__SyntaxError_Init(pass,__pRT__,snd);
   14.15  
   14.16  
   14.17  __END_PACKAGE__();