Update spec
This commit is contained in:
parent
18c724071d
commit
21a5b2cd61
@ -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.
|
`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.
|
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
|
### 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).
|
Strings are immutable and do not support any operation (e.g. concatenation).
|
||||||
Like comments, strings can span across multiple lines.
|
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.
|
Escape sequences are *not* supported.
|
||||||
|
|
||||||
The sole purpose of strings in mC is to be used with the built-in `print` function (see below).
|
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.c
|
||||||
│ ├── ast_print.c
|
│ ├── ast_print.c
|
||||||
│ ├── ast_visit.c
|
│ ├── ast_visit.c
|
||||||
│ ├── parser.y
|
│ ├── lexer.c
|
||||||
│ ├── scanner.l
|
│ ├── parser.c
|
||||||
│ └── …
|
│ └── …
|
||||||
├── test/
|
├── test/
|
||||||
│ ├── integration/ # Example inputs for integration testing.
|
│ ├── integration/ # Example inputs for integration testing.
|
||||||
|
Loading…
Reference in New Issue
Block a user