On this page:
Shrubbery Notation
8.16.0.4

Shrubbery Notation🔗ℹ

Shrubbery notation is a set of text-level conventions that build toward a full programming language, such as Rhombus. The notation is line- and indentation-sensitive, and it is intended to partially group input, but leave further parsing to another layer, especially enforestation. The parsed form of a shrubbery imposes grouping to ensure that further parsing is consistent with the shrubbery’s lines and indentation.

    1 Quick Overview

      1.1 Simple Terms

      1.2 Comments

      1.3 Lines and Indentation

      1.4 Parentheses, Brackets, Braces, and Quotes

      1.5 S-Expression Interoperability

    2 Shrubbery Specification

      2.1 Groups and Blocks

        2.1.1 Grouping by Lines

        2.1.2 Grouping by Opener–Closer Pairs

        2.1.3 Blocking with : and Indentation

        2.1.4 Continuing with Indentation and an Operator

        2.1.5 Alternatives with |

        2.1.6 Separating Groups with ; and ,

        2.1.7 Line- and Column-Insensitivity with « and »

        2.1.8 Continuing a Line with \

        2.1.9 Group Comments with #//

        2.1.10 At-Notation Using @

      2.2 Token Parsing

      2.3 At-Notation Parsing

    3 Parsed Representation

    4 Language and Parser API

      4.1 Parsing API

      4.2 Source Locations and Raw-Text Properties

      4.3 Writing Shrubbery Notation

      4.4 Reconstructing Shrubbery Notation

    5 Design Considerations

      5.1 Rationale

      5.2 Prior Art

    6 Editor Support

      6.1 Shrubbery Support in DrRacket

      6.2 How to Type «»