--- a/Scanner.st Sun Jun 18 16:26:36 2017 +0200
+++ b/Scanner.st Sun Jun 18 16:32:27 2017 +0200
@@ -3292,16 +3292,18 @@
nextChar isLetter ifFalse:[
((nextChar == $_) and:[allowUnderscoreInIdentifier]) ifFalse:[
((nextChar == $.) and:[allowPeriodInSymbol]) ifFalse:[
- "/ just for the better error message
- (nextChar isNationalAlphaNumeric) ifTrue:[
- |errMsg|
-
- errMsg := 'Invalid character: ''' , nextChar asString , ''' ', '(' , (nextChar codePoint radixPrintStringRadix:16) , ').'.
- errMsg := errMsg , '\\Notice:\ Only 7-bit ascii allowed (for compatibility with other Smalltalk dialects).' withCRs.
- errMsg := errMsg , '\ If you need symbols with 8-bit characters, use the #''...'' form, or ''...'' asSymbol.' withCRs.
- self syntaxError:errMsg position:tokenPosition to:source position+1.
- ].
- ^ nil
+ (nextChar isDigit and:[parserFlags allowSymbolsStartingWithDigit]) ifFalse:[
+ "/ just for the better error message
+ (nextChar isNationalAlphaNumeric) ifTrue:[
+ |errMsg|
+
+ errMsg := 'Invalid character: ''' , nextChar asString , ''' ', '(' , (nextChar codePoint radixPrintStringRadix:16) , ').'.
+ errMsg := errMsg , '\\Notice:\ Only 7-bit ascii allowed (for compatibility with other Smalltalk dialects).' withCRs.
+ errMsg := errMsg , '\ If you need symbols with 8-bit characters, use the #''...'' form, or ''...'' asSymbol.' withCRs.
+ self syntaxError:errMsg position:tokenPosition to:source position+1.
+ ].
+ ^ nil
+ ]
]
]
].
@@ -3373,6 +3375,8 @@
tokenValue := token := string asSymbol.
tokenType := #Symbol.
^ tokenType
+
+ "Modified (format): / 18-06-2017 / 16:31:56 / cg"
!
nextToken