aboutsummaryrefslogtreecommitdiff
path: root/language/index.rst
blob: 7d11d4fef478006be805a524eb1bd751c07b9b2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Language
========

The syntax of Crowbar is designed to be similar to the syntax of C.

A Crowbar source file is UTF-8.
Unless otherwise specified, a *character* in this specification refers to a `Unicode scalar value <https://www.unicode.org/glossary/#unicode_scalar_value>`_.
Crowbar source files can come in two varieties:

A Crowbar source file is read into memory in two phases: *scanning* (which converts text into an unstructured sequence of tokens) and *parsing* (which converts an unstructured sequence of tokens into a parse tree).

Syntax elements in this document are given in the form of `parsing expression grammar <https://en.wikipedia.org/wiki/Parsing_expression_grammar>`_ rules.

..  toctree::
    :maxdepth: 1

    scanning
    source-file
    include
    type-definition
    functions
    statements/index
    types
    expression