Because the same parser is used to read all footprint files of a library,
the parser must be reinitialized (internal variable cleared) before reading
a new file, otherwise the previous parser state is applied to the next file.
Fixes#7627https://gitlab.com/kicad/code/kicad/issues/7627
Looked like a minor issue, but was due to a more serious bug, when using 2 different DSN_LEXERS which were not synchronized.
The fix is not perfect, but unfortunately, the parser used to read the PCB_PLOT_PARAMS in .kicad_pcb files is also used in legacy board file reader.
Therefore it is better than write 2 parser functions, one for legacy files, the other for the .kicad_pcb files, which make the same thing.
This keeps it out of the KiCad mode path, making that leaner and less confusing about
what is supported in KiCad mode. Within KiCad mode, treat quoted vs. non-quoted tokens
as the two general categories, with non-quoted having sub-categories. Eliminate
an unimplemented, unused function declaration in DSNLEXER.
Improve the output formatting of THROW_PARSE_ERROR().
This is limited to round tripping the lines of commented text in the
loading and saving to disk through PCBIO::Format() and PCBIO::Parse().
No editing of the comments is given.
* Fix debug build warning (lp:793373).
* Changed sheet edit restore and undo to use object copy and replace method.
* Add minimum width and height constraints when resizing sheets that have
hierarchical pins.
* Fix drag sheet hot key bug.
* Change Doxygen configuration to extract private methods and members
when creating documentation.
* Fix a bunch of Doxygen comment warnings.
* DSNLEXER::NextTok() now uses two separate modes to parse quoted strings.
This gives us the freedom to control our own destiny separate from the
constraints put on us by the Specctra DSN spec.
* Added Documentation/s-expressions.txt to explain all this.
* Enhanced our quoting protocol by moving away from doubling up double quotes
to a C line escape mechanism.
* Now support multi-line strings, which when properly escaped, can still be
read in as a token originating on a single line.
* TokenList2DsnLexer.cmake now supports comments, which start with a leading
# character, and may be either on their own line or on a line after a token.
* DSNLEXER::PopReader() now pops even the last LINE_READER* and returns it.
++pcbnew:
* SPECCTRA_DB now inherits from new class SPECCTRA_LEXER, which led to a great
deal of simplification and code factoring.
* Moved specctra keywords into specctra.keywords.
* Added the basic structure to the Sweet parser in sch_part.cpp.
* Got inheritence working off of the 'extends' keyword and PART::inherit()
* Tossed the units support out of sweet.keywords, since we agreed to go dimensionless.
++richio:
* Added the problemInputLine support to PARSE_ERROR, so UI can show the
offending line of bytes. Yes bytes, not even guaranteed to be characters.