diff --git a/src/Fame-ImportExport/FMMSEParser.class.st b/src/Fame-ImportExport/FMMSEParser.class.st index 3331a4d4..cf2ec92e 100644 --- a/src/Fame-ImportExport/FMMSEParser.class.st +++ b/src/Fame-ImportExport/FMMSEParser.class.st @@ -27,7 +27,8 @@ Class { 'characterSet', 'chararacter', 'buffer', - 'importer' + 'importer', + 'numberParser' ], #category : #'Fame-ImportExport-Importers' } @@ -89,7 +90,7 @@ FMMSEParser >> Identifier [ buffer nextPut: chararacter. [ self characterSet isDigit: self next ] whileTrue: [ buffer nextPut: chararacter ]. self tWHITESPACE. - ^ Integer readFrom: buffer contents readStream + ^ (numberParser on: buffer contents readStream) nextInteger ] { #category : #expressions } @@ -137,7 +138,7 @@ FMMSEParser >> Number [ self characterSet isDigit: self next ] whileTrue ")?)?" ] ]. self tWHITESPACE. - ^ Number readFrom: buffer contents readStream + ^ (numberParser on: buffer contents readStream) nextNumber ] { #category : #expressions } @@ -292,6 +293,13 @@ FMMSEParser >> incrementProgressBar [ lastUpdate := Time millisecondClockValue ] +{ #category : #initialization } +FMMSEParser >> initialize [ + + super initialize. + numberParser := NumberParser new +] + { #category : #tokens } FMMSEParser >> matchesWord: aString [ "I am checking if the next part of the stream watches a word. If it matches, I also eat the next whitespace and return true. Else I return false (I do not backtrack)"