diff options
Diffstat (limited to 'language/index.rst')
-rw-r--r-- | language/index.rst | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/language/index.rst b/language/index.rst index 79702c5..eb2d92c 100644 --- a/language/index.rst +++ b/language/index.rst @@ -4,23 +4,17 @@ 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: -.. glossary:: - - header file - A Crowbar source file declaring types and functions. - Can be intended for internal use within a project, or to define the public API of a library. - Conventionally has the ``.hro`` file extension. - - implementation file - A Crowbar source file providing function definitions, and sometimes its own type declarations. - Conventionally has the ``.cro`` file extension. - 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 - flow-control + source-file + include + type-definition |