Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #2384 > unrolled thread

Yacc with multiple entry points.

Started byrockbrentwood@gmail.com
First post2019-12-09 16:13 -0800
Last post2019-12-09 16:13 -0800
Articles 1 — 1 participant

Back to article view | Back to comp.compilers


Contents

  Yacc with multiple entry points. rockbrentwood@gmail.com - 2019-12-09 16:13 -0800

#2384 — Yacc with multiple entry points.

Fromrockbrentwood@gmail.com
Date2019-12-09 16:13 -0800
SubjectYacc with multiple entry points.
Message-ID<19-12-003@comp.compilers>
There is a lot of saving and code-reuse possible if multiple entry points are allowed in a parser generator. This can be done by a simple extension of the LR process, but does complicate the issue of end-markers a little.

You'll see brief mention of it, by the way, here on page 199 of the Lex and Yacc reference. https://books.google.com/books?id=vsHcnR4kXIAC&pg=PA199&lpg=PA199 authored by (... searching author page ...) Oh! The moderator, John!

[I put the same trick on pp 163-164 of flex&bison.  Fiddle the lexer
so it sends the parser a fake token when it starts and use initial
rules with the fake token to select the real entry point.  That works
in plain yacc or bison.  -John]

[toc] | [standalone]


Back to top | Article view | comp.compilers


csiph-web