Implement core lexer and parser

This commit is contained in:
2026-06-16 02:02:17 +09:00
parent 12a6e9a84c
commit ddcee75c8d
7 changed files with 1083 additions and 1 deletions
+20 -1
View File
@@ -15,6 +15,25 @@ schema.dcdl
service.dcdl
```
## Module source
ファイル全体は単一の式として書ける。
また、top-level に field 定義列を書いた場合は、暗黙の object として扱う。
```dcdl
host = String;
port = Int default 8080;
```
上の source は以下と同じ意味である。
```dcdl
{
host = String;
port = Int default 8080;
}
```
## コメント
コメントは `#` から行末までとする。
@@ -38,7 +57,7 @@ host = "127.0.0.1"; # trailing comment
## 識別子
識別子の厳密な字句規則は未確定である。
識別子は ASCII 英字で始まり、ASCII 英数字または `_` を続けられる。
慣習としては `lower_snake``lowerCamel``UpperCamel` を使える想定とする。
```dcdl