---
title: "There's something to be said for returning the whole syntax tree. — Larry Wall Quote #152 | QuotesBy.net"
description: "There's something to be said for returning the whole syntax tree. — a quote by Larry Wall."
image: "https://quotesby.net/wp-content/themes/quotesby-editorial/assets/og-default.png"
---

> # There's something to be said for returning the whole syntax tree.

[Larry Wall](https://quotesby.net/Larry-Wall)\#152

[Syntax](https://quotesby.net/Larry-Wall/syntax/)[Parsing](https://quotesby.net/Larry-Wall/parsing/)

[WhatsApp (opens in a new tab)](https://wa.me/?text=%E2%80%9CThere%27s%20something%20to%20be%20said%20for%20returning%20the%20whole%20syntax%20tree.%E2%80%9D%20%E2%80%94%20Larry%20Wall%20https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F152%2F)[X (opens in a new tab)](https://twitter.com/intent/tweet?text=%E2%80%9CThere%27s%20something%20to%20be%20said%20for%20returning%20the%20whole%20syntax%20tree.%E2%80%9D%20%E2%80%94%20Larry%20Wall&url=https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F152%2F)[Facebook (opens in a new tab)](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F152%2F)

## About this quote

What does it mean?Wall says there’s value in returning the entire syntax tree from a parser.In plain termsReturning the full syntax tree has advantages.What can you take from it?Having the whole tree enables deeper analysis and manipulation.

### Where it applies

- compiler design
- code analysis tools

### Putting it to work

- expose full AST to downstream tools

### Questions to consider

- When is a full AST worth the overhead?

### Another view

It may increase memory usage and processing time.

## More from Larry Wall

1. > You don't have to wait--you can have it in 5.004\_54 or so. :-)

[Permalink to quote \#151](https://quotesby.net/Larry-Wall/151/ "Permalink to quote 151")
2. > It's not really a rule--it's more like a trend.

[Permalink to quote \#153](https://quotesby.net/Larry-Wall/153/ "Permalink to quote 153")
3. > Wow, I'm being shot at from both sides. That means I \*must\* be right. :-)

[Permalink to quote \#150](https://quotesby.net/Larry-Wall/150/ "Permalink to quote 150")

## Related quotes

1. > /\* This bit of chicanery makes a unary function followed by a parenthesis into a function with one argument, highest precedence. \*/

[Larry Wall](https://quotesby.net/Larry-Wall)[Larry Wall quote \#264](https://quotesby.net/Larry-Wall/264/ "Permalink to quote 264")
2. > And don't tell me there isn't one bit of difference between null and space, because that's exactly how much difference there is. :-)

[Larry Wall](https://quotesby.net/Larry-Wall)[Larry Wall quote \#2](https://quotesby.net/Larry-Wall/2/ "Permalink to quote 2")
3. > We toast the Lisp programmer who pens his thoughts within nests of parentheses.

[Alan Perlis](https://quotesby.net/Alan-Perlis)[Alan Perlis quote \#2](https://quotesby.net/Alan-Perlis/2/ "Permalink to quote 2")

```json
{
    "@context": "https://schema.org",
    "@type": "Quotation",
    "text": "There's something to be said for returning the whole syntax tree.",
    "url": "https://quotesby.net/Larry-Wall/152/",
    "spokenByCharacter": {
        "@type": "Person",
        "name": "Larry Wall"
    }
}
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "name": "Home",
            "item": "https://quotesby.net/"
        },
        {
            "@type": "ListItem",
            "position": 2,
            "name": "Authors",
            "item": "https://quotesby.net/authors/"
        },
        {
            "@type": "ListItem",
            "position": 3,
            "name": "Larry Wall",
            "item": "https://quotesby.net/Larry-Wall"
        },
        {
            "@type": "ListItem",
            "position": 4,
            "name": "Quote #152",
            "item": "https://quotesby.net/Larry-Wall/152/"
        }
    ]
}
```
