From 21a5b2cd614ee2679d38eb1af3538ec73f7bddd9 Mon Sep 17 00:00:00 2001 From: Alex Hirsch Date: Wed, 27 Jan 2021 16:48:54 +0100 Subject: [PATCH] Update spec --- specification.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/specification.md b/specification.md index c4f9690..585f18b 100644 --- a/specification.md +++ b/specification.md @@ -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.