[GoLUG] A tad bit pricey!
Steve Litt
slitt at troubleshooters.com
Wed Dec 6 16:15:05 EST 2023
Hendrik Boom said on Wed, 6 Dec 2023 14:03:09 -0500
>On Tue, Dec 05, 2023 at 11:59:42AM -0500, Steve Litt wrote:
>>
>> If you're at all curious about lex/yacc or Flex/Bison parsers, in
>> order to be able to learn anything at all you need to be at tomorrow
>> night's meeting.
>
>I was quite enthusiastic about LR(k) parsing in the early 70's,
>when the technology was being developed.
>
>I used it in my Algol 69 compiler.
>
>But nowadays I prefer recursive-descent parsing, which in theory is
>much less capable.
Unlike yacc, Bison offers an option for GLR parsing, which might be
relevant here.
>
>Why?
>
>Because when you reach a place where the automaton-generated parser
>doesn't have enough lookahead you can easily defer to hand-coded tricks
>that bypss the problem. This turns out to be much less easy with
>LR(k) grammars.
I think Bison's GLR can arbitrarily increase your lookahead.
Hendrik, GoLUG needs you!
Will you be able to present a Hello World version of recursive-descent
parsing at the January GoLUG meeting? Your example should be very
simple: Simple enough that you didn't need recursive-descent parsing in
the first place. Your goal not to demonstrate the power of
recursive-descent parsing. Your goal is to give each audience member
(who knows C) a foundational knowledge of what a recursive-descent
parser is, and how to code it in C. None of us is married to Flex
and Bison. The only requirement is you demonstrate something very
simple that works.
Thanks,
SteveT
Steve Litt
Autumn 2023 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21
More information about the GoLUG
mailing list