I updated the SmaCC chapter in the PharoForTheEnterprise book; it is also available as help inside Pharo itself.
Thierry
regards,
Usman
Keyword [^\n] *
isn't it?
Thierry
[|string allStyles text|string := (PharoFilesOpener default changesFileOrNil contents copyFrom: 1 to: 60000).text := string asText.allStyles := {'Announcement' -> TextColor green.'Collections' -> TextColor blue.'File' -> TextColor blue.'Metacello' -> TextColor red.'Monticello' -> TextColor magenta.'Morphic' -> TextColor orange.'Mooose' -> TextColor green.'FAMIX' -> TextColor green.'Roassal' -> TextColor green.}.allStyles do: [ :assoc | ((assoc key asParser, #newline asParser negate star) matchingRangesIn: string) do: [:aRange | text addAttribute: (assoc value) from: aRange first to: aRange last] ].text] timeToRun ==> 15 sec
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev