diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-08-22 10:23:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-08-22 10:23:06 +0200 |
commit | 522e21fa892dfc8b436eb6e7cb46f386a9116316 (patch) | |
tree | f9020fe4aa1daa7cd44278f281bb338c8fe15889 | |
parent | 94f0866683bdf063b30323bac227e11a23110fa2 (diff) |
Update language grammar
-rw-r--r-- | doc/language.txt | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/doc/language.txt b/doc/language.txt index fa357dd..865a4d3 100644 --- a/doc/language.txt +++ b/doc/language.txt @@ -1,15 +1,15 @@ -@@ No support for template ids -@@ No support for expressions (e.g., 2*2) - Token types: keyword identifier - punctuation (";" "{" "}" "(" ")" "," "|" "=" ":") - bracket-literal - string-literal + punctuation (";" "{" "}" "(" ")" "," "|" "=" ":") + path-literal + char-literal + string-literal bool-literal int-literal float-literal + call-expr (e.g., (a, 2)) + template-expr (e.g., <a, 2>) end-of-stream def-unit: @@ -59,27 +59,30 @@ option-name: string-literal initializer: - "=" argument-expr - "(" argument-seq(opt) ")" - -argument-seq: - argument-expr - argument-seq "," argument-expr + "=" initializer-expr + call-expr -argument-expr: +initializer-expr: bool-literal int-literal float-literal + char-literal string-literal qualified-name + call-expr qualified-name: - identifier - qualified-name "::" identifier + "::" qualified-name-trailer + qualified-name-trailer + +qualified-name-trailer: + template-id + qualified-name "::" template-id + +template-id: + identifier template-expr(opt) fundamental-type-spec: "bool" ... "long double" - - |