OSSP CVS Repository

ossp - Check-in [2251]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2251
Date: 2002-Jul-06 14:23:43 (local)
2002-Jul-06 12:23:43 (UTC)
User:rse
Branch:
Comment: document flexible quoted string and line continuation
Tickets:
Inspections:
Files:
ossp-pkg/cfg/cfg.pod      1.1 -> 1.2     25 inserted, 2 deleted

ossp-pkg/cfg/cfg.pod 1.1 -> 1.2

--- cfg.pod      2002/07/03 13:25:34     1.1
+++ cfg.pod      2002/07/06 12:23:43     1.2
@@ -64,6 +64,7 @@
 
 B<string>        ::= B<DQ_STRING>   # double quoted string
                 | B<SQ_STRING>   # single quoted string
+                | B<FQ_STRING>   # flexible quoted string
                 | B<PT_STRING>   # plain text string
 
 The other contained terminal symbols are defined itself by the following
@@ -82,9 +83,10 @@
                 | B<DQ_CHAR> B<DQ_CHARS>
 
 B<DQ_CHAR>       ::= /\\"/               # escaped quote
-                | /\\x[0-9a-zA-Z]{2}/ # hexadecimal char
+                | /\\x\{[0-9a-fA-F]+\}/ # hex-char group
+                | /\\x[0-9a-fA-F]{2}/ # hex-char
                 | /\\[0-7]{1,3}/      # octal character
-                | /\\[trn]/           # TAB, CR, NL
+                | /\\[nrtbfae]/       # NL,CR,TAB,BS,FF,BEL,ESC
                 | /\\\n[ \t]*/        # line continuation
                 | /\\\\/              # escaped escape
                 | /./                 # any other char
@@ -99,6 +101,21 @@
                 | /\\\\/              # escaped escape
                 | /./                 # any other char
 
+B<FQ_STRING>     ::= /q/ B<FQ_OPEN> B<FQ_CHARS> B<FQ_CLOSE>
+
+B<FQ_CHARS>      ::= I<empty>
+                | B<FQ_CHAR> B<FQ_CHARS>
+
+B<FQ_CHAR>       ::= /\\/ B<FQ_OPEN>    # escaped open
+                | /\\/ B<FQ_CLOSE>    # escaped close
+                | /\\\n[ \t]*/        # line contination
+                | /./                 # any other char
+
+B<FQ_OPEN>       ::= /[!"#$%&'()*+,-./:;<=>?@\[\\\]^_`{|}~]/
+
+B<FQ_CLOSE>      ::= "B<FQ_OPEN> or corresponding closing char
+                  ('}])>') if B<FQ_OPEN> is a char of '{[(<'"
+
 B<PT_STRING>     ::= B<PT_CHAR> B<PT_CHARS>
 
 B<PT_CHARS>      ::= I<empty>
@@ -121,6 +138,12 @@
 
 B<CO_SH>         ::= /#[^\n]*/
 
+Finally, any configuration line can have a trailing backslash character
+(C<\>) just before the newline character for simple line continuation.
+The backslash, the newline and (optionally) the leading whitespaces on
+the following line are silently obsorbed and as a side-effect continue
+the first line with the contents of the second lines.
+
 =head2 CONFIGURATION EXAMPLE
 
 A more intuitive description of the configuration syntax is perhaps given by

CVSTrac 2.0.1