Status: New
Owner: ----
Labels: Type-Defect Priority-Medium GLASS-Server Version-GLASS0.231
New issue 269 by
[hidden email]: SmaCC: scanner uses incorrect stream
indexing
http://code.google.com/p/glassdb/issues/detail?id=269As a result from the different stream positioning in GS and Squeak/Pharo,
scanners can index the stream on a position of -1.
The following two methods need to set the index to 1 instead of 0 (correct
code included below).
I would commit these changes myself in gemsource, but I don't have access.
SmaCCScanner>>resetOutputToLastMatch
outputStream position: lastOutputStreamMatchPosition.
lastOutputStreamMatchPosition == 1
ifTrue:
[lastMatchWasEmpty ifTrue: [self scannerError].
lastMatchWasEmpty := true]
ifFalse: [lastMatchWasEmpty := false]
SmaCCScanner>>resetScanner
start := stream position.
outputStream reset.
lastOutputStreamMatchPosition := 1