Scanner.st
changeset 4443 6b8be5255d89
parent 4441 a834368786b5
child 4453 da91ed5bc7fa
--- a/Scanner.st	Sun Jun 09 15:25:49 2019 +0200
+++ b/Scanner.st	Tue Jun 11 00:42:48 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -143,7 +145,7 @@
 extendedBinarySelectorCharacters
     "return a collection of characters which are optionally allowed in binary selectors"
 
-    "/ ^ '±×·÷«»'.
+    "/ ^ '±×·÷«»'.
     ^ String
 	with:(Character value:16rB1)  "/ plus-minus
 	with:(Character value:16rD7)  "/ times
@@ -1859,13 +1861,13 @@
 !
 
 warnParagraphAt:position
-    "warn about §-character in an identifier"
+    "warn about §-character in an identifier"
 
     ignoreWarnings ifFalse:[
 	"/ didWarnAboutParagraphInIdentifier ifFalse:[
 	    parserFlags warnParagraphInIdentifier ifTrue:[
 		self
-		    warning:'§-characters in identifiers/symbols are nonportable'
+		    warning:'§-characters in identifiers/symbols are nonportable'
 		    doNotShowAgainAction:[ ParserFlags warnParagraphInIdentifier:false ]
 		    position:position to:position.
 		"
@@ -3016,7 +3018,7 @@
 
     (((nextChar == $_) and:[allowUnderscoreInIdentifier])
       or:[ (allowDollarInIdentifier and:[nextChar == $$ ])
-      or:[ (nextChar == $§ and:[ allowParagraphInIdentifier])
+      or:[ (nextChar == $§ and:[ allowParagraphInIdentifier])
       or:[ (allowNationalCharactersInIdentifier and:[ nextChar notNil and:[nextChar isNationalLetter]])
       or:[ (allowGreekCharactersInIdentifier and:[ nextChar notNil and:[nextChar isNationalLetter]])
     ]]]]) ifTrue:[
@@ -3027,7 +3029,7 @@
             nextChar == $$ ifTrue:[
                 self warnDollarAt:pos.
             ] ifFalse:[
-                nextChar == $§ ifTrue:[
+                nextChar == $§ ifTrue:[
                     self warnParagraphAt:pos.
                 ] ifFalse:[
                     "/ self warnNationalCharacterAt:pos.
@@ -3047,7 +3049,7 @@
                 ].
                 ok := ((nextChar == $_) and:[allowUnderscoreInIdentifier])
                         or:[((nextChar == $$ ) and:[allowDollarInIdentifier])
-                        or:[((nextChar == $§ ) and:[allowParagraphInIdentifier])
+                        or:[((nextChar == $§ ) and:[allowParagraphInIdentifier])
                         or:[(nextChar notNil and:[allowNationalCharactersInIdentifier and:[nextChar isNationalLetter]])
                         or:[(nextChar notNil and:[allowGreekCharactersInIdentifier and:[nextChar isGreekLetter]])
                       ]]]].
@@ -3147,7 +3149,7 @@
           1s  -> a fixed point with precision from number of digits given.
           1s5 -> a fixed point with 5 digits precision.
           1d  -> float (technically a double precision IEEE float).
-          1q  -> long float (technically a c-long double / quad precision IEEE float).
+          1q  -> long float (technically a c-long double / extended or quad precision IEEE float).
 
           1f5 -> shortFloat (technically a single precision IEEE float) or float.
           1f  -> shortFloat (technically a single precision IEEE float) or float.
@@ -3211,7 +3213,11 @@
 
     ('eEdDqQfF' includes:nextChar) ifTrue:[
         (nextChar == $q or:[nextChar == $Q]) ifTrue:[
-            value := value asLongFloat
+            (nextChar == $Q) ifTrue:[
+                value := value asQuadFloat
+            ] ifFalse:[    
+                value := value asLongFloat
+            ].
         ] ifFalse:[
             ((nextChar == $f or:[nextChar == $F]) and:[parserFlags singlePrecisionFloatF]) ifTrue:[
                 value := value asShortFloat
@@ -3293,7 +3299,7 @@
     ^ tokenType
 
     "Modified: / 15-06-2017 / 11:07:52 / cg"
-    "Modified: / 26-05-2019 / 11:36:02 / Claus Gittinger"
+    "Modified: / 11-06-2019 / 00:41:00 / Claus Gittinger"
 !
 
 nextPrimitive
@@ -3747,7 +3753,7 @@
             "/ a nil token means: continue reading
         ] ifFalse:[
             ((ch isNationalLetter and:[parserFlags allowNationalCharactersInIdentifier])
-              or:[ (ch == $§ and:[parserFlags allowParagraphInIdentifier]) 
+              or:[ (ch == $§ and:[parserFlags allowParagraphInIdentifier]) 
               or:[ (ch isGreekLetter and:[parserFlags allowGreekCharactersInIdentifier]) 
             ]]) ifTrue:[
                 tok := self nextIdentifier.