
The hyperlynx file is read using a bison/flex scanner. The flex scanner is in hyp_l, the bison parser in hyp_y.y.  For each hyperlynx construct the parser calls the corresponding exec_* routine in parser.c. Example: if the parser encounters an arc segment, the symbol in the scanner/parser is H_ARC, and the routine in parser.c is called exec_arc().

If you need a rough description of the hyperlynx format, download "bird33" from http://www.ibis.org/birds/bird33.txt . Substitute ".IBP file format" with ".HYP file format" and "SUBSTRATE_OUTLINE" with "BOARD" and you have an (old) description of the hyperlynx format.

Not all CAD programs create compliant .hyp files. The most common omission is not putting quotes around a string. This causes problems if the string contains blank space or commas.

If you change scanner or parser you need to revalidate. Try loading a collection of hyperlynx files generated by diverse CAD programs.

The python script "gensamp" creates a sample hyperlynx file which contains line, arc and unrouted segments, polygons with and without holes, polylines, etc.

Coding style used:
~/.indent.pro:
  --line-length128 -brs -br -nce --tab-size2 -ut -npsl -npcs -hnl
~/.vimrc:
  set tabstop=2

