kursjan / petitparser2

A high-performance top-down parser
MIT License
41 stars 19 forks source link

Some issues when loading into GemStone #26

Closed jgfoster closed 6 years ago

jgfoster commented 6 years ago

Compile errors with a temp variable that overlap an instance variable:

References to ByteString would be created if you simply used String or if something were added to Grease:

It would be nice if UI-related references were in a separate package:

It would be nice if there were an alternative to thisContext

PositionableStream>>asPetit2Stream references collection. Could you instead reference self contents?

Several methods ( PP2InMemoryContext->'adoptString:', PP2InMemoryContext->'next:', PP2InMemoryContext->'nextFor:', PP2InMemoryContext->'readLimit', PP2InMemoryContext->'stream:', PP2InMemoryContext->'upTo:', PP2RecordingContext->'stream:') reference readLimit that doesn't exist in GemStone. Would there be another way to test this using message sends?

GemStone doesn't have SubscriptOutOfBounds (see PP2BufferStreamTest->'testCopyFromToOOB', PP2BufferStreamTest->'testRandomAccessTooMuchBacktrack', PP2BufferStreamIntegrationTest->'testIdentifierSmallBufferError', PP2BufferStreamIntegrationTest->'testStreamBacktrackBufferTooSmall', PP2BufferStreamIntegrationTest->'testStreamBufferTooSmall', PP2BufferStream->'atPosition:', PP2BufferStream->'copyFrom:to:'). If the tests are looking only for the signals in PP2BufferStream, could you make your own subclass of Error?

Thanks!

kursjan commented 6 years ago

Hi James, Thanks for the report and suggestions. I addressed most of them, except for thisContext (see #28) and readLimit (see #29).

Cheers, Jan

jgfoster commented 6 years ago

Thanks for the quick work! I'll let you know how it goes...