Good morning.

Asking advice on approach to fixing this the right way. End result is at minimum a functioning class and a test to catch this stuff going forward.


On Squeak 5.1 16551

First, to recreate the issue..



PG3SchemaMirror subclass: #MyDBSchemaMirror  


(and get it talking to the db via instructions here: http://forum.world.st/Status-of-PostgresV3-td4780110.html)
Then, via those same instructions, get a Postgres Function downloaded to Squeak or attempt to enter one by hand.


Second, the symptoms 

The SHParserST80) attempts to parse the code and a "Proceed for Truth" errors start popping up.


Debugging it, the culprit is in
PG3ShoutParser(SHParserST80)>>scanIdentifier



(c := self nextChar) isAlphaNumeric
or: [ allowUnderscoreSelectors and: [ c == $_ ] ] ] whileTrue.
 

Where allowUnderscoreSelectors is undefined.

As a quick fix attempt, changing to
Scanner allowUnderscoreAsAssignment 
makes that error go away. However, new ones start popping up, so I decided to dig into things a bit more.


Scanner is the wrong approach, because it and SHParserST80 are not related via inheritence (although they do share a common instance variable named "allowUnderscoreSelectors"

I wondering if SHParserST80 is superceded by Scanner and if so, I am wondering the best way to approach this bug.

Should I fix it within the SHParserST80 paradigm or is migration to Scanner in order?

Thx for your time.