[Cuis-dev] No regex in parser

Casey Ransberger bahweep at icloud.com
Mon Sep 23 20:16:08 PDT 2019


First, I should say I’m aware that there are external packages that do regular expressions. I’m interested in how we get by without them. 

Found myself marveling again tonight that the Smalltalk parsers of the world generally haven’t used them. That really astounded me at first, as I had been raised on lex/flex for lexical analysis. Later I learned about parsing expression grammars and saw those used for both scanning and parsing.

I still don’t know how to write a scanner without either of those tools, I’m afraid. I’m also honestly not terribly familiar with how the various Smalltalks go about this.

For context: I’ve run across a case where I want to build a scanner in a language that lacks any regular expression support at all, and thought I might look to Cuis for a good example of how to go about it. Sorry that this is only tangentially on-topic.

Questions: 

* What classes / methods should I look at to see the magic?

* Is there a formal name for the kind of pattern matching that Cuis does when tokenizing input? Asking because I’d like to track down research papers as a matter of habit.

Thanks in advance,
—Casey Ransberger





More information about the Cuis-dev mailing list