[TUHS] [tuhs] Dennis Ritchie's couch

Bakul Shah bakul at iitbombay.org
Fri Jul 2 17:00:21 AEST 2021



> On Jul 1, 2021, at 11:30 PM, George Michaelson <ggm at algebras.org> wrote:
> 
> 
>> 
>> Note that this could easily have been made a table instead of a bunch of one-line functions.
> 
> a table.. hmm. so like.. we could write .. engines to "read" the table
> and do things in some kind of (maybe.. finite) way?
> 
> I know, lets write a DSL to MAKE THE TABLE...
> 
> Is all software "wheel of life" ?

It would be just an operator precedence table and two functions. One to
parse a factor and one for binary expressions. The table might be something
like an array of {singles, doubles, associativity}, where the Nth entry
has precedence N. The binary expr parser uses the table to essentially
group sub expressions based on precedence and associativity. This is an old
idea. I think at least 4-5 decades old.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20210702/b58fc9b7/attachment.htm>


More information about the TUHS mailing list