Commit 654b8909 authored by Dick Hollenbeck's avatar Dick Hollenbeck

fix documentation bugs

parent 126fe260
...@@ -12,7 +12,7 @@ email address. ...@@ -12,7 +12,7 @@ email address.
constraints put on us by the Specctra DSN spec. constraints put on us by the Specctra DSN spec.
* Added Documentation/s-expressions.txt to explain all this. * Added Documentation/s-expressions.txt to explain all this.
* Enhanced our quoting protocol by moving away from doubling up double quotes * Enhanced our quoting protocol by moving away from doubling up double quotes
to a C line escape mechanism. to a C like escape mechanism.
* Now support multi-line strings, which when properly escaped, can still be * Now support multi-line strings, which when properly escaped, can still be
read in as a token originating on a single line. read in as a token originating on a single line.
......
...@@ -11,7 +11,7 @@ corresponds to a string, while a list corresponds to an s-expression. The ...@@ -11,7 +11,7 @@ corresponds to a string, while a list corresponds to an s-expression. The
following grammar represents our definition of an s-expression: following grammar represents our definition of an s-expression:
sexpr ::= ( sx ) sexpr ::= ( sx )
sx ::= atom sxtail | sexptr sxtail | NULL sx ::= atom sxtail | sexpr sxtail | NULL
sxtail ::= sx | NULL sxtail ::= sx | NULL
atom :: quoted | value atom :: quoted | value
quoted :: "ws_string" quoted :: "ws_string"
...@@ -62,12 +62,12 @@ Any null string is wrapped in quotes, and so is any string which starts with ...@@ -62,12 +62,12 @@ Any null string is wrapped in quotes, and so is any string which starts with
Kicad S-expression Syntax and Quoting Protocol (non-specctraMode): Kicad S-expression Syntax and Quoting Protocol (non-specctraMode):
================================================================== ==================================================================
*) All Kicad s-expression files are saved using a UTF8 encoding and should *) Some atoms are considered keywords, and constitute a grammar superimposed on
support any international characters in the atoms. Some atoms are considered the s-expressions. All keywords are ASCII and lowercase. International characters
keywords, and constitute a grammar superimposed on the s-expressions. are not to be used here.
*) All keywords are ASCII and lowercase. International characters are not to be *) All Kicad s-expression files are saved using a UTF8 encoding and should
used here. support any international characters in the atoms which are not keywords.
*) DSNLEXER::NextTok() requires that any token be on a single line of input. If *) DSNLEXER::NextTok() requires that any token be on a single line of input. If
you want to save a multi-line string, Quoted() will automatically escape the \n you want to save a multi-line string, Quoted() will automatically escape the \n
...@@ -75,10 +75,10 @@ or \r for you and put the output on a single line. It should round-trip fine. ...@@ -75,10 +75,10 @@ or \r for you and put the output on a single line. It should round-trip fine.
*) There can be escape sequences in a quoted string only. Escape sequences allow *) There can be escape sequences in a quoted string only. Escape sequences allow
foreign tools to generate byte patterns in the input stream. C style 2 byte hex foreign tools to generate byte patterns in the input stream. C style 2 byte hex
codes are supported, and so are 3 byte octal escape sequences. See DSNLEXER::NextTok() codes are supported, and so are 3 byte octal escape sequences. See
for the full list of escape sequences, by searching file dsnlexer.cpp for the DSNLEXER::NextTok() for the full list of escape sequences, by searching file
string "ESCAPE SEQUENCES". Any use of the escape mechanism must still produce dsnlexer.cpp for the string "ESCAPE SEQUENCES". Any use of the escape mechanism
UTF-8 encoded text after the escape handling is applied. must still produce UTF-8 encoded text after the escape handling is applied.
*) Just because an escape sequence is supported on input, does not mean that *) Just because an escape sequence is supported on input, does not mean that
OUTPUTFORMATTER::Quoted() must generate such an escape sequence for output. For OUTPUTFORMATTER::Quoted() must generate such an escape sequence for output. For
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment