[squeak-dev] specifiying the character class range for some funky characters from İstanbul

gettimothy gettimothy at zoho.com
Sun Jan 10 16:18:53 UTC 2021


poking around in the grammar some more, it defines RangeSet with a rule





Range				<-	OPEN_BRACKET s "^"? RangeSet{1,CLOSE_BRACKET}



That is tied to a callback via a pragma...





Range: excluding sets: sets

<action: 'Range' arguments: #( 3 4 )>



sets isEmpty ifTrue: [

^excluding

ifNil:	[self DOT]

ifNotNil:	[ [parser not: [parser anything]] ]].

^excluding

ifNil:	[ [parser including: sets] ]

ifNotNil:	[ [parser excluding: sets] ]






Which is too deep in the weeds to grok at the moment, but appears to be a filter



excluding is part of PEGParser



excluding: intervals

| position integer |

position := stream position.

[stream read: 1 into: cache at: 1] on: Incomplete do: [stream position: position. ^Failure].

integer := (cache at: 1) asInteger.

intervals do: [:interval | (interval includes: integer) ifTrue: [stream position: position. ^Failure]].

^cache at: 1








cordially,



t
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210110/98e8afcd/attachment.html>


More information about the Squeak-dev mailing list