Commit 21a5b2cd authored by Alexander Hirsch's avatar Alexander Hirsch
Browse files

Update spec

parent 18c72407
......@@ -145,7 +145,9 @@ Comments are discarded by the parser; however, line breaks are taken into accoun
`long` and `double` are used in the compiler to store mC's `int` and `float` literals, respectively.
It is assumed that both types are big and precise enough to store the corresponding literal.
Furthermore, it is assumed that arrays and strings are at most `LONG_MAX` elements long.
String literals are at most 1000 characters long.
Arrays are at most `LONG_MAX` elements long.
### Special Semantics
......@@ -162,7 +164,7 @@ An expression used as a condition (for `if` or `while`) is expected to be of typ
Strings are immutable and do not support any operation (e.g. concatenation).
Like comments, strings can span across multiple lines.
Whitespaces (i.e. newlines, tabs, spaces) are part of the string.
Whitespace (i.e. newlines, tabs, spaces) is part of the string.
Escape sequences are *not* supported.
The sole purpose of strings in mC is to be used with the built-in `print` function (see below).
......@@ -547,8 +549,8 @@ The following directory layout is used.
│ ├── ast.c
│ ├── ast_print.c
│ ├── ast_visit.c
│ ├── parser.y
│ ├── scanner.l
│ ├── lexer.c
│ ├── parser.c
│ └── …
├── test/
│ ├── integration/ # Example inputs for integration testing.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment