Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

An Ada exception is when a routine gets in trouble and says 'Beam me up, Scotty'.


devel / comp.compilers / Re: A simpler way to tokenize and parse?

SubjectAuthor
* Re: A simpler way to tokenize and parse?Christopher F Clark
`- Re: A simpler way to tokenize and parse?Thomas Koenig

1
Re: A simpler way to tokenize and parse?

<23-03-025@comp.compilers>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=759&group=comp.compilers#759

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: christopher.f.clark@compiler-resources.com (Christopher F Clark)
Newsgroups: comp.compilers
Subject: Re: A simpler way to tokenize and parse?
Date: Sun, 26 Mar 2023 17:11:14 +0300
Organization: Compilers Central
Sender: johnl@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <23-03-025@comp.compilers>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 8bit
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="3915"; mail-complaints-to="abuse@iecc.com"
Keywords: syntax
Posted-Date: 26 Mar 2023 20:50:23 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
Thread-Topic: Re: A simpler way to tokenize and parse?
 by: Christopher F Clark - Sun, 26 Mar 2023 14:11 UTC

If I recall correctly, at one time, PCCTS and it’s related tool
Sorcerer used an S-expression-like representation for ASTs, including an
equivelnt to CAR and CDR, whose names I don’t recall but they were
something like “down” and “right”.

More recent versions of ANTLR don't expose that as far at I have seen,
preferring to use a Visitor pattern for traversals.

Re: A simpler way to tokenize and parse?

<23-03-027@comp.compilers>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=761&group=comp.compilers#761

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!paganini.bofh.team!pasdenom.info!adore2!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.compilers
Subject: Re: A simpler way to tokenize and parse?
Date: Mon, 27 Mar 2023 05:08:43 -0000 (UTC)
Organization: news.netcologne.de
Sender: johnl@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <23-03-027@comp.compilers>
References: <23-03-025@comp.compilers>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="92280"; mail-complaints-to="abuse@iecc.com"
Keywords: Lisp, syntax
Posted-Date: 27 Mar 2023 09:12:08 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
 by: Thomas Koenig - Mon, 27 Mar 2023 05:08 UTC

Christopher F Clark <christopher.f.clark@compiler-resources.com> schrieb:
> If I recall correctly, at one time, PCCTS and it’s related tool
> Sorcerer used an S-expression-like representation for ASTs, including an
> equivelnt to CAR and CDR, whose names I don’t recall but they were
> something like “down” and “right”.

S-expressions are a fairly natural representation of using trees,
at least for expressions.

An example: If you use gfortran's -fdump-fortran-original option, you
will get its internal expression after parsing on standard output.

For example, the code of

real function foo(x,y)
foo = 2.3 + 5.0*x*y
end function foo

is represented as

ASSIGN foo:foo (+ 2.29999995 (* (* 5.00000000 foo:x) foo:y))

where the internal representation is a tree.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor