Related articles |
---|
A simpler way to tokenize and parse? costello@mitre.org (Roger L Costello) (2023-03-24) |
Re: A simpler way to tokenize and parse? mal@wyrd.be (Lieven Marchand) (2023-03-25) |
Re: A simpler way to tokenize and parse? 864-117-4973@kylheku.com (Kaz Kylheku) (2023-03-26) |
Re: A simpler way to tokenize and parse? spibou@gmail.com (Spiros Bousbouras) (2023-03-26) |
Re: A simpler way to tokenize and parse? christopher.f.clark@compiler-resources.com (Christopher F Clark) (2023-03-26) |
Re: A simpler way to tokenize and parse? 864-117-4973@kylheku.com (Kaz Kylheku) (2023-03-26) |
Re: A simpler way to tokenize and parse? tkoenig@netcologne.de (Thomas Koenig) (2023-03-27) |
From: | Thomas Koenig <tkoenig@netcologne.de> |
Newsgroups: | comp.compilers |
Date: | Mon, 27 Mar 2023 05:08:43 -0000 (UTC) |
Organization: | news.netcologne.de |
References: | 23-03-025 |
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 |
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.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.