Open alpo opened 3 years ago
@realthunder did you see this?
I've add an argument quote_no_parse
to sexp_parser.parseSexp()
. This parameter is just to match one (or more) first token of some S-expression, and once matched, treat the quote as regular character in the rest of the tokens. Check the doc string for more information.
To test
sexp = r'''
(parser
(string_quote ")
(space_in_quoted_tokens on)
(host_cad "KiCad's Pcbnew")
(host_version "5.1.7-a382d34a8~88~ubuntu18.04.1")
)
'''
import sexp_parser
sexp_parser.parseSexp(sexp, 'string_quote')
Is it possible to modify your code to allow it to parse SPECCTRA .dsn files correctly? There is a troublesome fragment at the beginning:
In the beginning, it should be parsed without quoting, but after string_quote the quoting should start working. Your code, however, completely turns the
parser
section into a mess.The description of this piece of the format: