[pkg-d-commits] [ldc] 22/95: config file grammar comment

Matthias Klumpp mak at moszumanska.debian.org
Thu Jul 13 20:53:57 UTC 2017


This is an automated email from the git hooks/post-receive script.

mak pushed a commit to annotated tag v1.3.0-beta1
in repository ldc.

commit 7dcd7e222831eb2270a1e5577a039bf0d9e32534
Author: Remi THEBAULT <remi.thebault at gmail.com>
Date:   Fri Feb 24 23:40:48 2017 +0100

    config file grammar comment
---
 driver/config.d | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/driver/config.d b/driver/config.d
index 834e71c..e9b31ec 100644
--- a/driver/config.d
+++ b/driver/config.d
@@ -107,7 +107,9 @@ private:
 
 /+
 
-What follows is a recursive descent parser that reads the following EBNF grammar
+What follows is a recursive descent parser that reads the following
+EBNF grammar.
+It is a subset of the libconfig grammar (http://www.hyperrealm.com/libconfig).
 
 config  =   { ows , setting } , ows ;
 setting =   name , (":" | "=") , value , [";" | ","] ;
@@ -127,11 +129,19 @@ ows     =   [ ws ] ; (* optional white space *)
 ws      =   ? white space (space, tab, line feed ...) ? ;
 
 
-Single line comments are also supported in the form of "//" until line feed.
+Single line comments are also supported. They start with "//" and span until
+line feed.
 The "//" sequence is however allowed within strings and doesn't need to be
 escaped.
-Line feed are not allowed within strings. To span a string over multiple lines,
-use concatenation. ("string 1" "string 2")
+White space are significant only within strings.
+Physical line feeds are not allowed within strings. To span a string over
+multiple lines, use concatenation ("hello " "world" == "hello world").
+The following escape sequences are allowed in strings:
+  - \\
+  - \"
+  - \r
+  - \n
+  - \t
 
 +/
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git



More information about the pkg-d-commits mailing list