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


Groups > comp.compilers > #3097

Compiler-compiler-compiler

From Christopher F Clark <christopher.f.clark@compiler-resources.com>
Newsgroups comp.compilers
Subject Compiler-compiler-compiler
Date 2022-06-25 18:32 +0300
Organization Compilers Central
Message-ID <22-06-076@comp.compilers> (permalink)
References <22-06-073@comp.compilers> <22-06-074@comp.compilers>

Show all headers | View raw


I think we should have (not sure about the word "need", "should have" is
close enough) compiler-compiler-compilers.

We know enough to write a single algorithm that can generate regular
expression recognizers as either NFAs or DFAs, LL(k) parsers, LR(k)
parsers, GLR(k) parsers, PEG parsers, and can incorporate captures,
back-references, predicates, adaptive rules, permutations, dynamic
precedence rules, etc.  We also know enough to include the generation of
visitors, attribute evaluators, and other next-level "assistants".
Having it accept a variety of notations is also relatively easy.

And to truly make it a compiler-compiler-compiler, one needs to make the
parts separable and be able to be "generated" in the special case forms
(e.g. to be able to recreate an LL version like ANTLR or an LR version like
Bison and of course, the variations in between).  Circa 2000 we already had
a version of our Yacc++ that could generate something close to recursive
descent code from an LR grammar, so this is just extending that concept.
ANTLR4 is doing something close to the reverse and moving to a more
state-machine-like description of (mostly) LL grammars.

Thus, creating a compiler-compiler-compiler is a feasible (although
non-trivial task).  It's on my "to-do" list.

--
******************************************************************************

Chris Clark                  email:
christopher.f.clark@compiler-resources.com
Compiler Resources, Inc.  Web Site: http://world.std.com/~compres
23 Bailey Rd                 voice: (508) 435-5016
Berlin, MA  01503 USA      twitter: @intel_chris
------------------------------------------------------------------------------

Back to comp.compilers | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

The remarkable similarities between Flex/Lex and XSLT Roger L Costello <costello@mitre.org> - 2022-06-24 10:57 +0000
  Re: The remarkable similarities between Flex/Lex and XSLT gah4 <gah4@u.washington.edu> - 2022-06-24 06:43 -0700
    Compiler-compiler-compiler Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-06-25 18:32 +0300
  Re: The remarkable similarities between Flex/Lex and XSLT "matt.ti...@gmail.com" <matt.timmermans@gmail.com> - 2022-06-25 09:20 -0700

csiph-web