| 
    KiCad PCB EDA Suite
    
   | 
 
The parser for reading the KiCad s-expression netlist format. More...
#include <kicad_netlist_parser.h>
 Public Member Functions | |
| KICAD_NETLIST_PARSER (LINE_READER *aReader, NETLIST *aNetlist) | |
| void | Parse () | 
| Function Parse parse the full netlist.   | |
| const char * | getTokenName (NL_T::T aTok) | 
| KICAD_NETLIST_PARSER (LINE_READER *aReader, NETLIST *aNetlist) | |
| void | Parse () | 
| Function Parse parse the full netlist.   | |
| const char * | getTokenName (NL_T::T aTok) | 
Private Member Functions | |
| void | skipCurrent () | 
| Skip the current token level, i.e search for the RIGHT parenthesis which closes the current description.   | |
| void | parseComponent () | 
| Parse a component description: (comp (ref P1) (value DB25FEMELLE) (footprint DB25FC) (libsource (lib conn) (part DB25)) (property (name PINCOUNT) (value 25)) (sheetpath (names /) (tstamps /)) (tstamp 3256759C))   | |
| void | parseNet () | 
| Parse a net section (net (code 20) (name /PC-A0) (node (ref BUS1) (pin 62)) (node (ref U3) (pin 3)) (node (ref U9) (pin M6)))   | |
| void | parseGroup () | 
| Parse a group section (group (name "GroupName") (member (uuid "..."))))   | |
| void | parseLibPartList () | 
| Read the section "libparts" in the netlist: (libparts (libpart (lib device) (part C) (description "Condensateur non polarise") (footprints (fp SM*) (fp C?) (fp C1-1)) (fields (field (name Reference) C) (field (name Value) C)) (pins (pin (num 1) (name ~) (type passive)) (pin (num 2) (name ~) (type passive))))   | |
| void | skipCurrent () | 
| Skip the current token level, i.e search for the RIGHT parenthesis which closes the current description.   | |
| void | parseComponent () | 
| Parse a component description: (comp (ref P1) (value DB25FEMELLE) (footprint DB25FC) (libsource (lib conn) (part DB25)) (property (name PINCOUNT) (value 25)) (sheetpath (names /) (tstamps /)) (tstamp 3256759C))   | |
| void | parseNet () | 
| Parse a net section (net (code 20) (name /PC-A0) (node (ref BUS1) (pin 62)) (node (ref U3) (pin 3)) (node (ref U9) (pin M6)))   | |
| void | parseGroup () | 
| Parse a group section (group (name "GroupName") (member (uuid "..."))))   | |
| void | parseLibPartList () | 
| Read the section "libparts" in the netlist: (libparts (libpart (lib device) (part C) (description "Condensateur non polarise") (footprints (fp SM*) (fp C?) (fp C1-1)) (fields (field (name Reference) C) (field (name Value) C)) (pins (pin (num 1) (name ~) (type passive)) (pin (num 2) (name ~) (type passive))))   | |
Private Attributes | |
| NL_T::T | token | 
| LINE_READER * | m_lineReader | 
| The line reader used to parse the netlist. Not owned.   | |
| NETLIST * | m_netlist | 
| The netlist to parse into. Not owned.   | |
The parser for reading the KiCad s-expression netlist format.
Definition at line 32 of file common/netlist_reader/kicad_netlist_parser.h.
| KICAD_NETLIST_PARSER::KICAD_NETLIST_PARSER | ( | LINE_READER * | aReader, | 
| NETLIST * | aNetlist ) | 
Definition at line 56 of file common/netlist_reader/kicad_netlist_reader.cpp.
References m_lineReader, m_netlist, and token.
| KICAD_NETLIST_PARSER::KICAD_NETLIST_PARSER | ( | LINE_READER * | aReader, | 
| NETLIST * | aNetlist ) | 
      
  | 
  inline | 
Definition at line 44 of file common/netlist_reader/kicad_netlist_parser.h.
      
  | 
  inline | 
Definition at line 44 of file pcbnew/netlist_reader/kicad_netlist_parser.h.
| void KICAD_NETLIST_PARSER::Parse | ( | ) | 
Function Parse parse the full netlist.
Definition at line 85 of file common/netlist_reader/kicad_netlist_reader.cpp.
References m_netlist, parseComponent(), parseGroup(), parseLibPartList(), parseNet(), skipCurrent(), and token.
Referenced by KICAD_NETLIST_READER::LoadNetlist().
| void KICAD_NETLIST_PARSER::Parse | ( | ) | 
Function Parse parse the full netlist.
      
  | 
  private | 
Parse a component description: (comp (ref P1) (value DB25FEMELLE) (footprint DB25FC) (libsource (lib conn) (part DB25)) (property (name PINCOUNT) (value 25)) (sheetpath (names /) (tstamps /)) (tstamp 3256759C))
Definition at line 303 of file common/netlist_reader/kicad_netlist_reader.cpp.
References _, COMPONENT, From_UTF8(), info, COMPONENT::JumperPadGroups(), library, m_netlist, name, LIB_ID::Parse(), path, COMPONENT::SetComponentClassNames(), COMPONENT::SetDuplicatePadNumbersAreJumpers(), COMPONENT::SetFields(), COMPONENT::SetHumanReadablePath(), COMPONENT::SetLibrary(), COMPONENT::SetName(), COMPONENT::SetProperties(), COMPONENT::SetUnitInfo(), skipCurrent(), THROW_IO_ERROR, and token.
Referenced by Parse().
      
  | 
  private | 
Parse a component description: (comp (ref P1) (value DB25FEMELLE) (footprint DB25FC) (libsource (lib conn) (part DB25)) (property (name PINCOUNT) (value 25)) (sheetpath (names /) (tstamps /)) (tstamp 3256759C))
      
  | 
  private | 
Parse a group section (group (name "GroupName") (member (uuid "..."))))
and set the corresponding pads netnames
Definition at line 675 of file common/netlist_reader/kicad_netlist_reader.cpp.
References _, From_UTF8(), group, m_netlist, name, LIB_ID::Parse(), skipCurrent(), THROW_IO_ERROR, and token.
Referenced by Parse().
      
  | 
  private | 
Parse a group section (group (name "GroupName") (member (uuid "..."))))
and set the corresponding pads netnames
      
  | 
  private | 
Read the section "libparts" in the netlist: (libparts (libpart (lib device) (part C) (description "Condensateur non polarise") (footprints (fp SM*) (fp C?) (fp C1-1)) (fields (field (name Reference) C) (field (name Value) C)) (pins (pin (num 1) (name ~) (type passive)) (pin (num 2) (name ~) (type passive))))
And add the strings giving the footprint filter (subsection footprints) of the corresponding footprint info
This section is used by CvPcb, and is not useful in Pcbnew, therefore it it not always read
Definition at line 777 of file common/netlist_reader/kicad_netlist_reader.cpp.
References From_UTF8(), COMPONENT::GetReference(), COMPONENT::IsLibSource(), IsNumber(), m_netlist, COMPONENT::SetFootprintFilters(), COMPONENT::SetPinCount(), skipCurrent(), and token.
Referenced by Parse().
      
  | 
  private | 
Read the section "libparts" in the netlist: (libparts (libpart (lib device) (part C) (description "Condensateur non polarise") (footprints (fp SM*) (fp C?) (fp C1-1)) (fields (field (name Reference) C) (field (name Value) C)) (pins (pin (num 1) (name ~) (type passive)) (pin (num 2) (name ~) (type passive))))
And add the strings giving the footprint filter (subsection footprints) of the corresponding footprint info
This section is used by CvPcb, and is not useful in Pcbnew, therefore it it not always read
References m_lineReader, m_netlist, and token.
      
  | 
  private | 
Parse a net section (net (code 20) (name /PC-A0) (node (ref BUS1) (pin 62)) (node (ref U3) (pin 3)) (node (ref U9) (pin M6)))
and set the corresponding pads netnames
Definition at line 199 of file common/netlist_reader/kicad_netlist_reader.cpp.
References From_UTF8(), m_netlist, name, skipCurrent(), and token.
Referenced by Parse().
      
  | 
  private | 
Parse a net section (net (code 20) (name /PC-A0) (node (ref BUS1) (pin 62)) (node (ref U3) (pin 3)) (node (ref U9) (pin M6)))
and set the corresponding pads netnames
      
  | 
  private | 
Skip the current token level, i.e search for the RIGHT parenthesis which closes the current description.
Definition at line 65 of file common/netlist_reader/kicad_netlist_reader.cpp.
References token.
Referenced by Parse(), parseComponent(), parseGroup(), parseLibPartList(), and parseNet().
      
  | 
  private | 
Skip the current token level, i.e search for the RIGHT parenthesis which closes the current description.
      
  | 
  private | 
The line reader used to parse the netlist. Not owned.
Definition at line 109 of file common/netlist_reader/kicad_netlist_parser.h.
Referenced by KICAD_NETLIST_PARSER(), and parseLibPartList().
      
  | 
  private | 
The netlist to parse into. Not owned.
Definition at line 110 of file common/netlist_reader/kicad_netlist_parser.h.
Referenced by KICAD_NETLIST_PARSER(), Parse(), parseComponent(), parseGroup(), parseLibPartList(), and parseNet().
      
  | 
  private | 
Definition at line 108 of file common/netlist_reader/kicad_netlist_parser.h.
Referenced by KICAD_NETLIST_PARSER(), Parse(), parseComponent(), parseGroup(), parseLibPartList(), parseNet(), and skipCurrent().