SquareBracketAssociates / Booklet-AMiniSchemeInPharo

Describe the implementation a little scheme interpreter in Pharo as pretext to play with a language interpreter.
3 stars 3 forks source link

Scanner no longer included with Pharo (Pharo 7) #9

Open cdavidshaffer opened 5 years ago

cdavidshaffer commented 5 years ago

The Scanner class has disappeared from Pharo some time at or before Pharo 7. I tried substituting RBScanner and MCScanner but neither seemed suitable for the job.

cdavidshaffer commented 5 years ago

I have attached a parser (which uses PetitParser). I'm not sure if you want to introduce that dependency but I'm using your book for a course and needed a quick solution. This is the first time I've used PP so I can't attest to the quality of this parser. PParser.txt PParserTest.txt

cdavidshaffer commented 5 years ago

I have moved this parser to its own package:

Metacello new
    baseline: 'PhsycheParser';
    repository: 'github://cdavidshaffer/phsyche-parser';
    load

The following change needs to be made to the code in the textbook if this parser is adopted:

Phsyche>>parse: aString

    ^PParser new parse: aString
Ducasse commented 9 months ago

Thanks I'm just discovering your feedback.just 4 years later :(. I will fix it during my next holidays.