Index: scconfig/plugins.h
===================================================================
--- scconfig/plugins.h (revision 7963)
+++ scconfig/plugins.h (revision 7964)
@@ -48,7 +48,7 @@
plugin_def("import_edif", "import edif", sbuildin, 1)
plugin_def("import_netlist", "import netlist", sbuildin, 1)
plugin_def("import_dsn", "specctra .dsn importer", sbuildin, 1)
-plugin_def("import_hyp", "hyperlynx .hyp importer", sdisable, 0)
+
plugin_def("import_mucs", "import mucs routing", sbuildin, 1)
plugin_def("import_ltspice", "import ltspice .net+.asc", sbuildin, 1)
plugin_def("import_tinycad", "import tinycad .net", sbuildin, 1)
@@ -80,6 +80,7 @@
plugin_def("io_kicad_legacy", "Kicad's legacy format", sbuildin, 1)
plugin_def("io_kicad", "Kicad's s-expr format", sbuildin, 1)
plugin_def("io_eagle", "Eagle's xml format", sdisable, 0)
+plugin_def("io_hyp", "hyperlynx .hyp loader", sdisable, 0)
plugin_def("io_tedax", "tEDAx (Trivial EDA eXchange)", sbuildin, 1)
Index: src/Makefile.dep
===================================================================
--- src/Makefile.dep (revision 7963)
+++ src/Makefile.dep (revision 7964)
@@ -851,6 +851,20 @@
../src_3rd/liblihata/parser.h ../src_3rd/liblihata/genht/htsp.h \
../src_3rd/genvector/vtp0.h list_conf.h conf.h conf_core.h compat_nls.h \
macro.h compat_inc.h
+../src_plugins/fp_wget/edakrill.o: ../src_plugins/fp_wget/edakrill.c \
+ ../src_3rd/genvector/gds_char.h ../src_3rd/genvector/genvector_impl.h \
+ ../src_3rd/genvector/genvector_undef.h ../src_3rd/liblihata/genht/htsp.h \
+ ../src_3rd/liblihata/genht/ht.h ../src_3rd/liblihata/genht/ht_inlines.h \
+ ../src_3rd/liblihata/genht/hash.h ../config.h \
+ ../src_plugins/fp_wget/wget_common.h ../src_plugins/fp_wget/edakrill.h \
+ plug_footprint.h vtlibrary.h ../src_plugins/fp_wget/fp_wget_conf.h \
+ conf.h global_typedefs.h pcb_bool.h unit.h pcb-printf.h \
+ ../src_3rd/liblihata/lihata.h ../src_3rd/liblihata/dom.h \
+ ../src_3rd/liblihata/lihata.h ../src_3rd/liblihata/parser.h \
+ ../src_3rd/liblihata/genht/htsp.h ../src_3rd/genvector/vtp0.h \
+ list_conf.h conf.h ../src_3rd/genlist/gentdlist_undef.h \
+ ../src_3rd/genlist/gentdlist_impl.h ../src_3rd/genlist/gendlist.h \
+ plugins.h compat_misc.h
../src_plugins/fp_wget/fp_wget.o: ../src_plugins/fp_wget/fp_wget.c \
../config.h ../src_plugins/fp_wget/gedasymbols.h plug_footprint.h \
vtlibrary.h ../src_3rd/genvector/genvector_impl.h \
@@ -863,7 +877,8 @@
../src_3rd/liblihata/genht/ht_inlines.h ../src_3rd/genvector/vtp0.h \
list_conf.h conf.h ../src_3rd/genlist/gentdlist_undef.h \
../src_3rd/genlist/gentdlist_impl.h ../src_3rd/genlist/gendlist.h \
- plugins.h ../src_plugins/fp_wget/fp_wget_conf_fields.h
+ ../src_plugins/fp_wget/edakrill.h plugins.h \
+ ../src_plugins/fp_wget/fp_wget_conf_fields.h
../src_plugins/fp_wget/gedasymbols.o: \
../src_plugins/fp_wget/gedasymbols.c ../src_3rd/genvector/gds_char.h \
../src_3rd/genvector/genvector_impl.h \
@@ -1442,79 +1457,6 @@
../src_3rd/liblihata/lihata.h ../src_3rd/liblihata/parser.h \
../src_3rd/liblihata/genht/htsp.h ../src_3rd/genvector/vtp0.h \
list_conf.h netlist.h route_style.h rats_patch.h plug_io.h
-../src_plugins/import_hyp/hyp_l.o: ../src_plugins/import_hyp/hyp_l.c \
- ../src_plugins/import_hyp/hyp_y.h ../src_plugins/import_hyp/parser.h \
- pcb_bool.h board.h ../config.h const.h macro.h global_typedefs.h \
- pcb_bool.h unit.h vtroutestyle.h attrib.h \
- ../src_3rd/genvector/genvector_impl.h \
- ../src_3rd/genvector/genvector_undef.h layer.h globalconst.h \
- obj_all_list.h obj_arc_list.h obj_common.h \
- ../src_3rd/liblihata/genht/hash.h ../src_3rd/genlist/gendlist.h flag.h \
- obj_arc.h ../src_3rd/genlist/gentdlist_impl.h \
- ../src_3rd/genlist/gendlist.h ../src_3rd/genlist/gentdlist_undef.h \
- obj_elem_list.h obj_elem.h obj_line_list.h obj_line.h obj_pad_list.h \
- obj_pad.h obj_pinvia_list.h obj_pinvia.h obj_text.h font.h \
- ../src_3rd/liblihata/genht/htip.h ../src_3rd/liblihata/genht/ht.h \
- ../src_3rd/liblihata/genht/ht_inlines.h obj_poly.h polyarea.h \
- obj_poly_list.h box.h math_helper.h move.h misc_util.h ht_element.h \
- ../src_3rd/liblihata/genht/ht.h obj_text_list.h obj_rat_list.h obj_rat.h \
- layer_grp.h library.h rats_patch.h board.h
-../src_plugins/import_hyp/hyp_y.o: ../src_plugins/import_hyp/hyp_y.c \
- ../src_plugins/import_hyp/parser.h pcb_bool.h board.h ../config.h \
- const.h macro.h global_typedefs.h pcb_bool.h unit.h vtroutestyle.h \
- attrib.h ../src_3rd/genvector/genvector_impl.h \
- ../src_3rd/genvector/genvector_undef.h layer.h globalconst.h \
- obj_all_list.h obj_arc_list.h obj_common.h \
- ../src_3rd/liblihata/genht/hash.h ../src_3rd/genlist/gendlist.h flag.h \
- obj_arc.h ../src_3rd/genlist/gentdlist_impl.h \
- ../src_3rd/genlist/gendlist.h ../src_3rd/genlist/gentdlist_undef.h \
- obj_elem_list.h obj_elem.h obj_line_list.h obj_line.h obj_pad_list.h \
- obj_pad.h obj_pinvia_list.h obj_pinvia.h obj_text.h font.h \
- ../src_3rd/liblihata/genht/htip.h ../src_3rd/liblihata/genht/ht.h \
- ../src_3rd/liblihata/genht/ht_inlines.h obj_poly.h polyarea.h \
- obj_poly_list.h box.h math_helper.h move.h misc_util.h ht_element.h \
- ../src_3rd/liblihata/genht/ht.h obj_text_list.h obj_rat_list.h obj_rat.h \
- layer_grp.h library.h rats_patch.h board.h
-../src_plugins/import_hyp/import_hyp.o: \
- ../src_plugins/import_hyp/import_hyp.c ../config.h action_helper.h \
- global_typedefs.h pcb_bool.h unit.h compat_nls.h hid.h error.h drc.h \
- attrib.h layer.h globalconst.h obj_all_list.h obj_arc_list.h \
- obj_common.h ../src_3rd/liblihata/genht/hash.h \
- ../src_3rd/genlist/gendlist.h flag.h obj_arc.h \
- ../src_3rd/genlist/gentdlist_impl.h ../src_3rd/genlist/gendlist.h \
- ../src_3rd/genlist/gentdlist_undef.h obj_elem_list.h obj_elem.h \
- obj_line_list.h obj_line.h obj_pad_list.h obj_pad.h obj_pinvia_list.h \
- obj_pinvia.h obj_text.h font.h ../src_3rd/liblihata/genht/htip.h \
- ../src_3rd/liblihata/genht/ht.h ../src_3rd/liblihata/genht/ht_inlines.h \
- obj_poly.h polyarea.h obj_poly_list.h box.h math_helper.h macro.h move.h \
- misc_util.h ht_element.h ../src_3rd/liblihata/genht/ht.h obj_text_list.h \
- obj_rat_list.h obj_rat.h layer_grp.h hid_draw_helpers.h hid_nogui.h \
- hid_actions.h hid.h hid_init.h hid_attrib.h hid_helper.h plugins.h \
- event.h ../src_plugins/import_hyp/parser.h pcb_bool.h board.h const.h \
- vtroutestyle.h ../src_3rd/genvector/genvector_impl.h \
- ../src_3rd/genvector/genvector_undef.h library.h rats_patch.h board.h \
- dolists.h
-../src_plugins/import_hyp/parser.o: ../src_plugins/import_hyp/parser.c \
- ../src_plugins/import_hyp/parser.h pcb_bool.h board.h ../config.h \
- const.h macro.h global_typedefs.h pcb_bool.h unit.h vtroutestyle.h \
- attrib.h ../src_3rd/genvector/genvector_impl.h \
- ../src_3rd/genvector/genvector_undef.h layer.h globalconst.h \
- obj_all_list.h obj_arc_list.h obj_common.h \
- ../src_3rd/liblihata/genht/hash.h ../src_3rd/genlist/gendlist.h flag.h \
- obj_arc.h ../src_3rd/genlist/gentdlist_impl.h \
- ../src_3rd/genlist/gendlist.h ../src_3rd/genlist/gentdlist_undef.h \
- obj_elem_list.h obj_elem.h obj_line_list.h obj_line.h obj_pad_list.h \
- obj_pad.h obj_pinvia_list.h obj_pinvia.h obj_text.h font.h \
- ../src_3rd/liblihata/genht/htip.h ../src_3rd/liblihata/genht/ht.h \
- ../src_3rd/liblihata/genht/ht_inlines.h obj_poly.h polyarea.h \
- obj_poly_list.h box.h math_helper.h move.h misc_util.h ht_element.h \
- ../src_3rd/liblihata/genht/ht.h obj_text_list.h obj_rat_list.h obj_rat.h \
- layer_grp.h library.h rats_patch.h board.h \
- ../src_plugins/import_hyp/hyp_l.h ../src_plugins/import_hyp/hyp_y.h \
- error.h pcb-printf.h ../src_3rd/genvector/gds_char.h obj_all.h \
- flag_str.h polygon.h rtree.h layer.h data.h crosshair.h vtonpoint.h \
- hid.h error.h drc.h route.h buffer.h search.h rats.h netlist.h \
- route_style.h compat_misc.h
../src_plugins/import_ltspice/ltspice.o: \
../src_plugins/import_ltspice/ltspice.c ../config.h \
../src_3rd/qparse/qparse.h board.h const.h macro.h global_typedefs.h \
@@ -1715,6 +1657,77 @@
../src_3rd/liblihata/dom.h ../src_3rd/liblihata/lihata.h \
../src_3rd/liblihata/parser.h ../src_3rd/liblihata/genht/htsp.h \
../src_3rd/genvector/vtp0.h list_conf.h conf.h conf_core.h error.h
+../src_plugins/io_hyp/hyp_l.o: ../src_plugins/io_hyp/hyp_l.c \
+ ../src_plugins/io_hyp/hyp_y.h ../src_plugins/io_hyp/parser.h pcb_bool.h \
+ board.h ../config.h const.h macro.h global_typedefs.h pcb_bool.h unit.h \
+ vtroutestyle.h attrib.h ../src_3rd/genvector/genvector_impl.h \
+ ../src_3rd/genvector/genvector_undef.h layer.h globalconst.h \
+ obj_all_list.h obj_arc_list.h obj_common.h \
+ ../src_3rd/liblihata/genht/hash.h ../src_3rd/genlist/gendlist.h flag.h \
+ obj_arc.h ../src_3rd/genlist/gentdlist_impl.h \
+ ../src_3rd/genlist/gendlist.h ../src_3rd/genlist/gentdlist_undef.h \
+ obj_elem_list.h obj_elem.h obj_line_list.h obj_line.h obj_pad_list.h \
+ obj_pad.h obj_pinvia_list.h obj_pinvia.h obj_text.h font.h \
+ ../src_3rd/liblihata/genht/htip.h ../src_3rd/liblihata/genht/ht.h \
+ ../src_3rd/liblihata/genht/ht_inlines.h obj_poly.h polyarea.h \
+ obj_poly_list.h box.h math_helper.h move.h misc_util.h ht_element.h \
+ ../src_3rd/liblihata/genht/ht.h obj_text_list.h obj_rat_list.h obj_rat.h \
+ layer_grp.h library.h rats_patch.h board.h
+../src_plugins/io_hyp/hyp_y.o: ../src_plugins/io_hyp/hyp_y.c \
+ ../src_plugins/io_hyp/parser.h pcb_bool.h board.h ../config.h const.h \
+ macro.h global_typedefs.h pcb_bool.h unit.h vtroutestyle.h attrib.h \
+ ../src_3rd/genvector/genvector_impl.h \
+ ../src_3rd/genvector/genvector_undef.h layer.h globalconst.h \
+ obj_all_list.h obj_arc_list.h obj_common.h \
+ ../src_3rd/liblihata/genht/hash.h ../src_3rd/genlist/gendlist.h flag.h \
+ obj_arc.h ../src_3rd/genlist/gentdlist_impl.h \
+ ../src_3rd/genlist/gendlist.h ../src_3rd/genlist/gentdlist_undef.h \
+ obj_elem_list.h obj_elem.h obj_line_list.h obj_line.h obj_pad_list.h \
+ obj_pad.h obj_pinvia_list.h obj_pinvia.h obj_text.h font.h \
+ ../src_3rd/liblihata/genht/htip.h ../src_3rd/liblihata/genht/ht.h \
+ ../src_3rd/liblihata/genht/ht_inlines.h obj_poly.h polyarea.h \
+ obj_poly_list.h box.h math_helper.h move.h misc_util.h ht_element.h \
+ ../src_3rd/liblihata/genht/ht.h obj_text_list.h obj_rat_list.h obj_rat.h \
+ layer_grp.h library.h rats_patch.h board.h
+../src_plugins/io_hyp/io_hyp.o: ../src_plugins/io_hyp/io_hyp.c \
+ ../config.h action_helper.h global_typedefs.h pcb_bool.h unit.h \
+ compat_nls.h hid.h error.h drc.h attrib.h layer.h globalconst.h \
+ obj_all_list.h obj_arc_list.h obj_common.h \
+ ../src_3rd/liblihata/genht/hash.h ../src_3rd/genlist/gendlist.h flag.h \
+ obj_arc.h ../src_3rd/genlist/gentdlist_impl.h \
+ ../src_3rd/genlist/gendlist.h ../src_3rd/genlist/gentdlist_undef.h \
+ obj_elem_list.h obj_elem.h obj_line_list.h obj_line.h obj_pad_list.h \
+ obj_pad.h obj_pinvia_list.h obj_pinvia.h obj_text.h font.h \
+ ../src_3rd/liblihata/genht/htip.h ../src_3rd/liblihata/genht/ht.h \
+ ../src_3rd/liblihata/genht/ht_inlines.h obj_poly.h polyarea.h \
+ obj_poly_list.h box.h math_helper.h macro.h move.h misc_util.h \
+ ht_element.h ../src_3rd/liblihata/genht/ht.h obj_text_list.h \
+ obj_rat_list.h obj_rat.h layer_grp.h hid_draw_helpers.h hid_nogui.h \
+ hid_actions.h hid.h hid_init.h hid_attrib.h hid_helper.h plugins.h \
+ event.h ../src_plugins/io_hyp/parser.h pcb_bool.h board.h const.h \
+ vtroutestyle.h ../src_3rd/genvector/genvector_impl.h \
+ ../src_3rd/genvector/genvector_undef.h library.h rats_patch.h board.h \
+ dolists.h
+../src_plugins/io_hyp/parser.o: ../src_plugins/io_hyp/parser.c \
+ ../src_plugins/io_hyp/parser.h pcb_bool.h board.h ../config.h const.h \
+ macro.h global_typedefs.h pcb_bool.h unit.h vtroutestyle.h attrib.h \
+ ../src_3rd/genvector/genvector_impl.h \
+ ../src_3rd/genvector/genvector_undef.h layer.h globalconst.h \
+ obj_all_list.h obj_arc_list.h obj_common.h \
+ ../src_3rd/liblihata/genht/hash.h ../src_3rd/genlist/gendlist.h flag.h \
+ obj_arc.h ../src_3rd/genlist/gentdlist_impl.h \
+ ../src_3rd/genlist/gendlist.h ../src_3rd/genlist/gentdlist_undef.h \
+ obj_elem_list.h obj_elem.h obj_line_list.h obj_line.h obj_pad_list.h \
+ obj_pad.h obj_pinvia_list.h obj_pinvia.h obj_text.h font.h \
+ ../src_3rd/liblihata/genht/htip.h ../src_3rd/liblihata/genht/ht.h \
+ ../src_3rd/liblihata/genht/ht_inlines.h obj_poly.h polyarea.h \
+ obj_poly_list.h box.h math_helper.h move.h misc_util.h ht_element.h \
+ ../src_3rd/liblihata/genht/ht.h obj_text_list.h obj_rat_list.h obj_rat.h \
+ layer_grp.h library.h rats_patch.h board.h ../src_plugins/io_hyp/hyp_l.h \
+ ../src_plugins/io_hyp/hyp_y.h error.h pcb-printf.h \
+ ../src_3rd/genvector/gds_char.h obj_all.h flag_str.h polygon.h rtree.h \
+ layer.h data.h crosshair.h vtonpoint.h hid.h error.h drc.h route.h \
+ buffer.h search.h rats.h netlist.h route_style.h compat_misc.h
../src_plugins/io_kicad/io_kicad.o: ../src_plugins/io_kicad/io_kicad.c \
../config.h plugins.h plug_io.h library.h global_typedefs.h pcb_bool.h \
unit.h conf.h pcb-printf.h ../src_3rd/genvector/gds_char.h \
Index: src_plugins/import_hyp/hyp_y.y
===================================================================
--- src_plugins/import_hyp/hyp_y.y (revision 7963)
+++ src_plugins/import_hyp/hyp_y.y (nonexistent)
@@ -1,841 +0,0 @@
-/*
- * read hyperlynx files
- * Copyright 2012-2017 Koen De Vleeschauwer.
- *
- * This file is part of pcb-rnd.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-%code requires {
-#include "parser.h"
-}
-
-%error-verbose
-%debug
-%defines "hyp_y.h"
-%define api.prefix {hyy}
-
-%union {
- int boolval;
- int intval;
- double floatval;
- char* strval;
-}
-
-%{
-#include
-#include
-#include
-#include
-
-void hyyerror(const char *);
-
-/* HYYPRINT and hyyprint print values of the tokens when debugging is switched on */
-void hyyprint(FILE *, int, HYYSTYPE);
-#define HYYPRINT(file, type, value) hyyprint (file, type, value)
-
-/* clear parse_param struct at beginning of new record */
-void new_record();
-
-/* struct to pass to calling class */
-parse_param h;
-
-%}
-
-/*
- * Hyperlynx keywords
- */
-
- /* Punctuation: { } ( ) = , */
-
- /* Sections */
-
-%token H_BOARD_FILE H_VERSION H_DATA_MODE H_UNITS H_PLANE_SEP
-%token H_BOARD H_STACKUP H_DEVICES H_SUPPLIES
-%token H_PAD H_PADSTACK H_NET H_NET_CLASS H_END H_KEY
-
- /* Keywords */
-
-%token H_A H_ARC H_COPPER H_CURVE H_DETAILED H_DIELECTRIC H_ENGLISH H_LENGTH
-%token H_LINE H_METRIC H_N H_OPTIONS H_PERIMETER_ARC H_PERIMETER_SEGMENT H_PIN
-%token H_PLANE H_POLYGON H_POLYLINE H_POLYVOID H_POUR H_S H_SEG H_SIGNAL
-%token H_SIMPLIFIED H_SIM_BOTH H_SIM_IN H_SIM_OUT H_USEG H_VIA H_WEIGHT
-
- /* Assignments */
-
-%token H_A1 H_A2 H_BR H_C H_C_QM H_CO_QM H_D H_ER H_F H_ID
-%token H_L H_L1 H_L2 H_LPS H_LT H_M H_NAME
-%token H_P H_PKG H_PR_QM H_PS H_R H_REF H_SX H_SY H_S1 H_S1X H_S1Y H_S2 H_S2X H_S2Y H_T H_TC
-%token H_USE_DIE_FOR_METAL H_V H_V_QM H_VAL H_W H_X H_X1 H_X2
-%token H_XC H_Y H_Y1 H_Y2 H_YC H_Z H_ZL H_ZLEN H_ZW
-
- /* Booleans */
-
-%token H_YES H_NO
-
-%token H_BOOL
-%token H_POSINT
-%token H_FLOAT
-%token H_STRING
-
-%start hyp_file
-
-%%
-
-/*
- * Note:
- * Use left recursion when parsing board perimeter and nets.
- * When using left recursion cpu time is linear with board size.
- * When using right recursion we run out of memory on large boards.
- * (Typical error message: line xxx: memory exhausted at 'yyy' )
- */
-
- /*
- hyperlynx file sections:
-
- board_file
- version
- data_mode*
- units
- plane_sep*
- board*
- stackup*
- devices
- supplies*
- padstack*
- net
- net_class*
- end
-
- * = optional section
-
- */
-
-hyp_file
- : hyp_file hyp_section
- | hyp_section ;
-
-hyp_section
- : board_file
- | version
- | data_mode
- | units
- | plane_sep
- | board
- | stackup
- | devices
- | supplies
- | padstack
- | net
- | netclass
- | end
- | key
- | error '}' ;
-
- /* board_file */
-
-board_file
- : '{' H_BOARD_FILE { if (exec_board_file(&h)) YYERROR; } '}' ;
-
- /* version */
-
-version
- : '{' H_VERSION '=' H_FLOAT { h.vers = yylval.floatval; } '}' { if (exec_version(&h)) YYERROR; } ;
-
- /* data_mode */
-
-data_mode
- : '{' H_DATA_MODE '=' mode '}' { if (exec_data_mode(&h)) YYERROR; };
-
-mode
- : H_SIMPLIFIED { h.detailed = pcb_false; }
- | H_DETAILED { h.detailed = pcb_true; } ;
-
- /* units */
-
-units
- : '{' H_UNITS '=' unit_system metal_thickness_unit '}' { if (exec_units(&h)) YYERROR; } ;
-
-unit_system
- : H_ENGLISH { h.unit_system_english = pcb_true; }
- | H_METRIC { h.unit_system_english = pcb_false; };
-
-metal_thickness_unit
- : H_WEIGHT { h.metal_thickness_weight = pcb_true; }
- | H_LENGTH { h.metal_thickness_weight = pcb_false; } ;
-
- /* plane_sep */
-plane_sep
- : '{' H_PLANE_SEP '=' H_FLOAT { h.default_plane_separation = yylval.floatval; } '}' { if (exec_plane_sep(&h)) YYERROR; } ;
-
- /* board */
-
-board
- : '{' H_BOARD board_param_list '}'
- | '{' H_BOARD '}' ;
-
-board_param_list
- : board_param_list board_param_list_item
- | board_param_list_item ;
-
-board_param_list_item
- : '(' board_param ')'
- | '(' board_param { hyyerror("warning: missing ')'"); }
- | error ')' ;
- ;
-
-board_param
- : perimeter_segment
- | perimeter_arc
- | board_attribute ;
-
-perimeter_segment
- : H_PERIMETER_SEGMENT coord_line { if (exec_perimeter_segment(&h)) YYERROR; } ;
-
-perimeter_arc
- : H_PERIMETER_ARC coord_arc { if (exec_perimeter_arc(&h)) YYERROR; } ;
-
-board_attribute
- : H_A H_N '=' H_STRING { h.name = yylval.strval; } H_V '=' H_STRING { h.value = yylval.strval; } { if (exec_board_attribute(&h)) YYERROR; } ;
-
- /* stackup */
-
-stackup
- : '{' H_STACKUP stackup_paramlist '}' ;
-
-stackup_paramlist
- : stackup_paramlist stackup_param
- | stackup_param ;
-
-stackup_param
- : options
- | signal
- | dielectric
- | plane
- | '(' error ')' ;
-
-options
- : '(' H_OPTIONS options_params { if (exec_options(&h)) YYERROR; } ;
-
-options_params
- : H_USE_DIE_FOR_METAL '=' H_BOOL { h.use_die_for_metal = yylval.boolval; } ')'
- | ')'
- ;
-
-signal
- : '(' H_SIGNAL { new_record(); } signal_paramlist ')' { if (exec_signal(&h)) YYERROR; } ;
-
-signal_paramlist
- : signal_paramlist signal_param
- | signal_param ;
-
-signal_param
- : thickness
- | plating_thickness
- | H_C '=' H_FLOAT { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; }
- | bulk_resistivity
- | temperature_coefficient
- | epsilon_r
- | loss_tangent
- | layer_name
- | material_name
- | plane_separation ;
-
-dielectric
- : '(' H_DIELECTRIC { new_record(); } dielectric_paramlist ')' { if (exec_dielectric(&h)) YYERROR; } ;
-
-dielectric_paramlist
- : dielectric_paramlist dielectric_param
- | dielectric_param ;
-
-dielectric_param
- : thickness
- | H_C '=' H_FLOAT { h.epsilon_r = yylval.floatval; h.epsilon_r_set = pcb_true; }
- | epsilon_r
- | loss_tangent
- | conformal
- | prepreg
- | layer_name
- | material_name
- ;
-
-plane
- : '(' H_PLANE { new_record(); } plane_paramlist ')' { if (exec_plane(&h)) YYERROR; } ;
-
-plane_paramlist
- : plane_paramlist plane_param
- | plane_param ;
-
-plane_param
- : thickness
- | H_C '=' H_FLOAT { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; }
- | bulk_resistivity
- | temperature_coefficient
- | epsilon_r
- | loss_tangent
- | layer_name
- | material_name
- | plane_separation ;
-
-thickness
- : H_T '=' H_FLOAT { h.thickness = yylval.floatval; h.thickness_set = pcb_true; }
-
-plating_thickness
- : H_P '=' H_FLOAT { h.plating_thickness = yylval.floatval; h.plating_thickness_set = pcb_true; }
-
-bulk_resistivity
- : H_BR '=' H_FLOAT { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; }
-
-temperature_coefficient
- : H_TC '=' H_FLOAT { h.temperature_coefficient = yylval.floatval; h.temperature_coefficient_set = pcb_true; }
-
-epsilon_r
- : H_ER '=' H_FLOAT { h.epsilon_r = yylval.floatval; h.epsilon_r_set = pcb_true; }
-
-loss_tangent
- : H_LT '=' H_FLOAT { h.loss_tangent = yylval.floatval; h.loss_tangent_set = pcb_true; }
-
-layer_name
- : H_L '=' H_STRING { h.layer_name = yylval.strval; h.layer_name_set = pcb_true; }
-
-material_name
- : H_M '=' H_STRING { h.material_name = yylval.strval; h.material_name_set = pcb_true; }
-
-plane_separation
- : H_PS '=' H_FLOAT { h.plane_separation = yylval.floatval; h.plane_separation_set = pcb_true; }
-
-conformal
- : H_CO_QM '=' H_BOOL { h.conformal = yylval.boolval; h.conformal_set = pcb_true; }
-
-prepreg
- : H_PR_QM '=' H_BOOL { h.prepreg = yylval.boolval; h.prepreg_set = pcb_true; }
-
- /* devices */
-
-devices
- : '{' H_DEVICES device_list '}'
- | '{' H_DEVICES '}' ;
-
-device_list
- : device_list device
- | device ;
-
-device
- : '(' { new_record(); } H_STRING { h.device_type = yylval.strval; } H_REF '=' H_STRING { h.ref = yylval.strval; } device_paramlist ')' { if (exec_devices(&h)) YYERROR; }
- | '(' error ')' ;
-
-device_paramlist
- : name device_value
- | device_value
- ;
-
-device_value
- : value device_layer
- | device_layer
- ;
-
-device_layer
- : layer_name package
- | layer_name
- ;
-
-name
- : H_NAME '=' H_STRING { h.name = yylval.strval; h.name_set = pcb_true; } ;
-
-value
- : value_float
- | value_string
- ;
-
-value_float
- : H_VAL '=' H_FLOAT { h.value_float = yylval.floatval; h.value_float_set = pcb_true; } ;
-
-value_string
- : H_VAL '=' H_STRING { h.value_string = yylval.strval; h.value_string_set = pcb_true; } ;
-
-package
- : H_PKG '=' H_STRING { h.package = yylval.strval; h.package_set = pcb_true; } ;
-
- /* supplies */
-
-supplies
- : '{' H_SUPPLIES supply_list '}' ;
-
-supply_list
- : supply_list supply
- | supply ;
-
-supply
- : '(' H_S name value_float voltage_spec conversion ')' { if (exec_supplies(&h)) YYERROR; }
- | '(' error ')' ;
-
-voltage_spec
- : H_V_QM '=' H_BOOL { h.voltage_specified = yylval.boolval; } ;
-
-conversion
- : H_C_QM '=' H_BOOL { h.conversion = yylval.boolval; }
-
- /* padstack */
-
-padstack
- : '{' H_PADSTACK { new_record(); } '=' H_STRING { h.padstack_name = yylval.strval; h.padstack_name_set = pcb_true; } drill_size '}' { if (exec_padstack_end(&h)) YYERROR; } ;
-
-drill_size
- : ',' H_FLOAT { h.drill_size = yylval.floatval; h.drill_size_set = pcb_true; } padstack_list
- | ',' padstack_list ;
- | padstack_list ;
-
-padstack_list
- : padstack_list padstack_def
- | padstack_def ;
-
-padstack_def
- : '(' H_STRING { h.layer_name = yylval.strval; h.layer_name_set = pcb_true; } ',' pad_shape pad_coord pad_type { if (exec_padstack_element(&h)) YYERROR; new_record(); }
- | '(' error ')' ;
-
-pad_shape
- : H_FLOAT { h.pad_shape = yylval.floatval; } ','
- | ',' { h.pad_shape = -1; } /* Workaround: Altium sometimes prints an empty pad shape */
- ;
-
-pad_coord
- : H_FLOAT { h.pad_sx = yylval.floatval; } ',' H_FLOAT { h.pad_sy = yylval.floatval; } ',' H_FLOAT { h.pad_angle = yylval.floatval; }
-
-pad_type
- : ')'
- | ',' H_M ')' { h.pad_type = PAD_TYPE_METAL; h.pad_type_set = pcb_true; }
- | ',' H_A ')' { h.pad_type = PAD_TYPE_ANTIPAD; h.pad_type_set = pcb_true; }
- | ',' H_FLOAT { h.thermal_clear_shape = yylval.floatval; }
- ',' H_FLOAT { h.thermal_clear_sx = yylval.floatval; }
- ',' H_FLOAT { h.thermal_clear_sy = yylval.floatval; }
- ',' H_FLOAT { h.thermal_clear_angle = yylval.floatval; }
- ',' H_T ')' { h.pad_type = PAD_TYPE_THERMAL_RELIEF; h.pad_type_set = pcb_true; }
- ;
-
- /* net */
-
-net
- : '{' H_NET '=' H_STRING { h.net_name = yylval.strval; if (exec_net(&h)) YYERROR; } net_separation ;
-
-net_separation
- : plane_separation { if (exec_net_plane_separation(&h)) YYERROR; } net_copper
- | net_copper
-
-net_copper
- : net_subrecord_list '}'
- | { hyyerror("warning: empty net"); } '}'
- ;
-
-net_subrecord_list
- : net_subrecord_list net_subrecord
- | net_subrecord ;
-
-net_subrecord
- : seg
- | arc
- | via
- | pin
- | pad
- | useg
- | polygon
- | polyvoid
- | polyline
- | net_attribute
- | '(' error ')'
- | '{' error '}'
- ;
-
-seg
- : '(' H_SEG { new_record(); } coord_line width layer_name ps_lps_param { if (exec_seg(&h)) YYERROR; } ;
-
-arc
- : '(' H_ARC { new_record(); } coord_arc width layer_name ps_lps_param { if (exec_arc(&h)) YYERROR; } ;
-
-ps_lps_param
- : plane_separation lps_param
- | lps_param
- ;
-
-lps_param
- : left_plane_separation ')'
- | ')'
- ;
-
-width
- : H_W '=' H_FLOAT { h.width = yylval.floatval; h.width_set = pcb_true; } ;
-
-left_plane_separation
- : H_LPS '=' H_FLOAT { h.left_plane_separation = yylval.floatval; h.left_plane_separation_set = pcb_true; } ;
-
-via
- : '(' H_VIA { new_record(); } coord_point via_param_list ')' { if (exec_via(&h)) YYERROR; } ;
- ;
-
-via_param_list
- : via_param_list via_param
- | via_param
- ;
-
-via_param
- : padstack_name
- /* parameters below are for deprecated v1.0 via format */
- | H_D '=' H_FLOAT { h.drill_size = yylval.floatval; h.drill_size_set = pcb_true; }
- | layer1_name
- | layer2_name
- | H_S '=' H_STRING { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = pcb_true; }
- | H_SX '=' H_FLOAT { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = pcb_true; }
- | H_SY '=' H_FLOAT { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = pcb_true; }
- | H_A '=' H_FLOAT { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = pcb_true; }
- | H_S1 '=' H_STRING { h.via_pad1_shape = yylval.strval; h.via_pad1_shape_set = pcb_true; }
- | H_S1X '=' H_FLOAT { h.via_pad1_sx = yylval.floatval; h.via_pad1_sx_set = pcb_true; }
- | H_S1Y '=' H_FLOAT { h.via_pad1_sy = yylval.floatval; h.via_pad1_sy_set = pcb_true; }
- | H_A1 '=' H_FLOAT { h.via_pad1_angle = yylval.floatval; h.via_pad1_angle_set = pcb_true; }
- | H_S2 '=' H_STRING { h.via_pad2_shape = yylval.strval; h.via_pad2_shape_set = pcb_true; }
- | H_S2X '=' H_FLOAT { h.via_pad2_sx = yylval.floatval; h.via_pad2_sx_set = pcb_true; }
- | H_S2Y '=' H_FLOAT { h.via_pad2_sy = yylval.floatval; h.via_pad2_sy_set = pcb_true; }
- | H_A2 '=' H_FLOAT { h.via_pad2_angle = yylval.floatval; h.via_pad2_angle_set = pcb_true; }
- ;
-
-padstack_name
- : H_P '=' H_STRING { h.padstack_name = yylval.strval; h.padstack_name_set = pcb_true; } ;
-
-layer1_name
- : H_L1 '=' H_STRING { h.layer1_name = yylval.strval; h.layer1_name_set = pcb_true; } ;
-
-layer2_name
- : H_L2 '=' H_STRING { h.layer2_name = yylval.strval; h.layer2_name_set = pcb_true; } ;
-
-pin
- : '(' H_PIN { new_record(); } coord_point pin_reference pin_param { if (exec_pin(&h)) YYERROR; } ;
-
-pin_param
- : padstack_name pin_function_param
- | pin_function_param
- ;
-
-pin_function_param
- : pin_function ')'
- | ')'
- ;
-
-pin_reference
- : H_R '=' H_STRING { h.pin_reference = yylval.strval; h.pin_reference_set = pcb_true; } ;
-
-pin_function
- : H_F '=' H_SIM_OUT { h.pin_function = PIN_SIM_OUT; h.pin_function_set = pcb_true; }
- | H_F '=' H_SIM_IN { h.pin_function = PIN_SIM_IN; h.pin_function_set = pcb_true; }
- | H_F '=' H_SIM_BOTH { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = pcb_true; }
- | H_F '=' H_STRING { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = pcb_true; hyyerror("warning: SIM_BOTH assumed"); }
- ;
-
-pad /* deprecated hyperlynx v1.x only */
- : '(' H_PAD { new_record(); } coord_point pad_param_list ')' { if (exec_pad(&h)) YYERROR; } ;
-
-pad_param_list
- : pad_param_list pad_param
- | pad_param
- ;
-
-pad_param
- : layer_name
- | H_S '=' H_STRING { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = pcb_true; }
- | H_SX '=' H_FLOAT { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = pcb_true; }
- | H_SY '=' H_FLOAT { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = pcb_true; }
- | H_A '=' H_FLOAT { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = pcb_true; }
- ;
-
-useg
- : '(' H_USEG { new_record(); } coord_point1 layer1_name coord_point2 layer2_name useg_param { if (exec_useg(&h)) YYERROR; } ;
-
-useg_param
- : useg_stackup
- | useg_impedance
- ;
-
-useg_stackup
- : H_ZL '=' H_STRING { h.zlayer_name = yylval.strval; h.zlayer_name_set = pcb_true; }
- H_ZW '=' H_FLOAT { h.width = yylval.floatval; }
- H_ZLEN '=' H_FLOAT { h.length = yylval.floatval; }
- ')'
- ;
-
-useg_impedance
- : H_Z '=' H_FLOAT { h.impedance = yylval.floatval; h.impedance_set = pcb_true; }
- H_D '=' H_FLOAT { h.delay = yylval.floatval; }
- useg_resistance;
-
-useg_resistance
- : H_R '=' H_FLOAT { h.resistance = yylval.floatval; h.resistance_set = pcb_true;}
- ')'
- | ')'
- ;
-
-polygon
- : '{' H_POLYGON { new_record(); } polygon_param_list coord_point { if (exec_polygon_begin(&h)) YYERROR; }
- lines_and_curves '}' { if (exec_polygon_end(&h)) YYERROR; } ;
-
-polygon_param_list
- : polygon_param_list polygon_param
- | polygon_param
- ;
-
-polygon_param
- : layer_name
- | width
- | polygon_type
- | polygon_id
- ;
-
-polygon_id
- : H_ID '=' H_POSINT { h.id = yylval.intval; h.id_set = pcb_true; } /* polygon id is a non-negative integer */
- ;
-
-polygon_type
- : H_T '=' H_POUR { h.polygon_type = POLYGON_TYPE_POUR; h.polygon_type_set = pcb_true; }
- | H_T '=' H_PLANE { h.polygon_type = POLYGON_TYPE_PLANE; h.polygon_type_set = pcb_true; }
- | H_T '=' H_COPPER { h.polygon_type = POLYGON_TYPE_COPPER; h.polygon_type_set = pcb_true; }
- ;
-
-polyvoid
- : '{' H_POLYVOID { new_record(); } polygon_id coord_point { if (exec_polyvoid_begin(&h)) YYERROR; }
- lines_and_curves '}' { if (exec_polyvoid_end(&h)) YYERROR; } ;
-
-polyline
- : '{' H_POLYLINE { new_record(); } polygon_param_list coord_point { if (exec_polyline_begin(&h)) YYERROR; }
- lines_and_curves '}' { if (exec_polyline_end(&h)) YYERROR; } ;
-
-lines_and_curves
- : lines_and_curves line_or_curve
- | line_or_curve
- ;
-
-line_or_curve
- : line
- | curve
- | '(' error ')'
- ;
-
-line
- : '(' H_LINE { new_record(); } coord_point ')' { if (exec_line(&h)) YYERROR; } ;
-
-curve
- : '(' H_CURVE { new_record(); } coord_arc ')' { if (exec_curve(&h)) YYERROR; } ;
-
-net_attribute
- : '(' H_A H_N '=' H_STRING { h.name = yylval.strval; } H_V '=' H_STRING { h.value = yylval.strval; } ')' { if (exec_net_attribute(&h)) YYERROR; } ;
-
- /* net class */
-
-netclass
- : '{' H_NET_CLASS '=' H_STRING { h.net_class_name = yylval.strval; if (exec_net_class(&h)) YYERROR; } netclass_subrecords ;
-
-netclass_subrecords
- : netclass_paramlist '}'
- | '}'
- ;
-
-netclass_paramlist
- : netclass_paramlist netclass_param
- | netclass_param
- ;
-
-netclass_param
- : netclass_attribute
- | net_name
- | '(' error ')'
- ;
-
-net_name
- : '(' H_N H_N '=' H_STRING { h.net_name = yylval.strval; } ')' { if (exec_net_class_element(&h)) YYERROR; } ;
-
-netclass_attribute
- : '(' H_A H_N '=' H_STRING { h.name = yylval.strval; } H_V '=' H_STRING { h.value = yylval.strval; } ')' { if (exec_net_class_attribute(&h)) YYERROR; } ;
-
- /* end */
-
-end
- : '{' H_END '}' { if (exec_end(&h)) YYERROR; } ;
-
- /* key */
-
-key
- : '{' H_KEY '=' H_STRING { h.key = yylval.strval; } '}' { if (exec_key(&h)) YYERROR; } ;
-
- /* coordinates */
-
-coord_point
- : H_X '=' H_FLOAT { h.x = yylval.floatval; } H_Y '=' H_FLOAT { h.y = yylval.floatval; } ;
-
-coord_point1
- : H_X1 '=' H_FLOAT { h.x1 = yylval.floatval; } H_Y1 '=' H_FLOAT { h.y1 = yylval.floatval; } ;
-
-coord_point2
- : H_X2 '=' H_FLOAT { h.x2 = yylval.floatval; } H_Y2 '=' H_FLOAT { h.y2 = yylval.floatval; } ;
-
-coord_line
- : coord_point1 coord_point2 ;
-
-coord_arc
- : coord_line H_XC '=' H_FLOAT { h.xc = yylval.floatval; } H_YC '=' H_FLOAT { h.yc = yylval.floatval; } H_R '=' H_FLOAT { h.r = yylval.floatval; } ;
-
-%%
-
-/*
- * Supporting C routines
- */
-
-void hyyerror(const char *msg)
-{
- /* log pcb-rnd message */
- hyp_error(msg);
-}
-
-void hyyprint(FILE *file, int type, YYSTYPE value)
-{
- if (type == H_STRING)
- fprintf (file, "%s", value.strval);
- else if (type == H_FLOAT)
- fprintf (file, "%g", value.floatval);
- else if (type == H_BOOL)
- fprintf (file, "%i", value.boolval);
- return;
-}
-
-/*
- * reset parse_param struct at beginning of record
- */
-
-void new_record()
-{
- h.vers = 0;
- h.detailed = pcb_false;
- h.unit_system_english = pcb_false;
- h.metal_thickness_weight = pcb_false;
- h.default_plane_separation = 0;
- h.use_die_for_metal = pcb_false;
- h.bulk_resistivity = 0;
- h.conformal = pcb_false;
- h.epsilon_r = 0;
- h.layer_name = NULL;
- h.loss_tangent = 0;
- h.material_name = NULL;
- h.plane_separation = 0;
- h.plating_thickness = 0;
- h.prepreg = pcb_false;
- h.temperature_coefficient = 0;
- h.thickness = 0;
- h.bulk_resistivity_set = pcb_false;
- h.conformal_set = pcb_false;
- h.epsilon_r_set = pcb_false;
- h.layer_name_set = pcb_false;
- h.loss_tangent_set = pcb_false;
- h.material_name_set = pcb_false;
- h.plane_separation_set = pcb_false;
- h.plating_thickness_set = pcb_false;
- h.prepreg_set = pcb_false;
- h.temperature_coefficient_set = pcb_false;
- h.thickness_set = pcb_false;
- h.device_type = NULL;
- h.ref = NULL;
- h.value_float = 0;
- h.value_string = NULL;
- h.package = NULL;
- h.name_set = pcb_false;
- h.value_float_set = pcb_false;
- h.value_string_set = pcb_false;
- h.package_set = pcb_false;
- h.voltage_specified = pcb_false;
- h.conversion = pcb_false;
- h.padstack_name = NULL;
- h.drill_size = 0;
- h.pad_shape = 0;
- h.pad_sx = 0;
- h.pad_sy = 0;
- h.pad_angle = 0;
- h.thermal_clear_shape = 0;
- h.thermal_clear_sx = 0;
- h.thermal_clear_sy = 0;
- h.thermal_clear_angle = 0;
- h.pad_type = PAD_TYPE_METAL;
- h.padstack_name_set = pcb_false;
- h.drill_size_set = pcb_false;
- h.pad_type_set = pcb_false;
- h.width = 0;
- h.left_plane_separation = 0;
- h.width_set = pcb_false;
- h.left_plane_separation_set = pcb_false;
- h.layer1_name = NULL;
- h.layer1_name_set = pcb_false;
- h.layer2_name = NULL;
- h.layer2_name_set = pcb_false;
- h.via_pad_shape = NULL;
- h.via_pad_shape_set = pcb_false;
- h.via_pad_sx = 0;
- h.via_pad_sx_set = pcb_false;
- h.via_pad_sy = 0;
- h.via_pad_sy_set = pcb_false;
- h.via_pad_angle = 0;
- h.via_pad_angle_set = pcb_false;
- h.via_pad1_shape = NULL;
- h.via_pad1_shape_set = pcb_false;
- h.via_pad1_sx = 0;
- h.via_pad1_sx_set = pcb_false;
- h.via_pad1_sy = 0;
- h.via_pad1_sy_set = pcb_false;
- h.via_pad1_angle = 0;
- h.via_pad1_angle_set = pcb_false;
- h.via_pad2_shape = NULL;
- h.via_pad2_shape_set = pcb_false;
- h.via_pad2_sx = 0;
- h.via_pad2_sx_set = pcb_false;
- h.via_pad2_sy = 0;
- h.via_pad2_sy_set = pcb_false;
- h.via_pad2_angle = 0;
- h.via_pad2_angle_set = pcb_false;
- h.pin_reference = NULL;
- h.pin_reference_set = pcb_false;
- h.pin_function = PIN_SIM_BOTH;
- h.pin_function_set = pcb_false;
- h.zlayer_name = NULL;
- h.zlayer_name_set = pcb_false;
- h.length = 0;
- h.impedance = 0;
- h.impedance_set = pcb_false;
- h.delay = 0;
- h.resistance = 0;
- h.resistance_set = pcb_false;
- h.id = -1;
- h.id_set = pcb_false;
- h.polygon_type = POLYGON_TYPE_PLANE;
- h.polygon_type_set = pcb_false;
- h.net_class_name = NULL;
- h.net_name = NULL;
- h.key = NULL;
- h.name = NULL;
- h.value = NULL;
- h.x = 0;
- h.y = 0;
- h.x1 = 0;
- h.y1 = 0;
- h.x2 = 0;
- h.y2 = 0;
- h.xc = 0;
- h.yc = 0;
- h.r = 0;
-
- return;
-}
-
-/* not truncated */
Index: src_plugins/import_hyp/hyp_l.h
===================================================================
--- src_plugins/import_hyp/hyp_l.h (revision 7963)
+++ src_plugins/import_hyp/hyp_l.h (nonexistent)
@@ -1,452 +0,0 @@
-#ifndef hyyHEADER_H
-#define hyyHEADER_H 1
-#define hyyIN_HEADER 1
-
-#line 6 "hyp_l.h"
-
-#line 8 "hyp_l.h"
-
-#define YY_INT_ALIGNED short int
-
-/* A lexical scanner generated by flex */
-
-/* %not-for-header */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 39
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-
-/* %if-c++-only */
-/* %endif */
-
-/* %if-c-only */
-
-/* %endif */
-
-/* %if-c-only */
-
-/* %endif */
-
-/* First, we deal with platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
-/* %if-c-only */
-#include
-#include
-#include
-#include
-/* %endif */
-
-/* %if-tables-serialization */
-/* %endif */
-/* end standard C headers. */
-
-/* %if-c-or-c++ */
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have . Non-C99 systems may or may not. */
-
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
-
-#include
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
-typedef unsigned short int flex_uint16_t;
-typedef unsigned int flex_uint32_t;
-
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX (4294967295U)
-#endif
-
-#endif /* ! C99 */
-
-#endif /* ! FLEXINT_H */
-
-/* %endif */
-
-/* %if-c++-only */
-/* %endif */
-
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-/* %not-for-header */
-
-/* %not-for-header */
-
-/* %if-reentrant */
-/* %endif */
-
-/* %if-not-reentrant */
-
-/* %endif */
-
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
-#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
-#endif
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
-/* %if-not-reentrant */
-extern yy_size_t hyyleng;
-/* %endif */
-
-/* %if-c-only */
-/* %if-not-reentrant */
-extern FILE *hyyin, *hyyout;
-/* %endif */
-/* %endif */
-
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
- {
-/* %if-c-only */
- FILE *yy_input_file;
-/* %endif */
-
-/* %if-c++-only */
-/* %endif */
-
- char *yy_ch_buf; /* input buffer */
- char *yy_buf_pos; /* current position in input buffer */
-
- /* Size of input buffer in bytes, not including room for EOB
- * characters.
- */
- yy_size_t yy_buf_size;
-
- /* Number of characters read into yy_ch_buf, not including EOB
- * characters.
- */
- yy_size_t yy_n_chars;
-
- /* Whether we "own" the buffer - i.e., we know we created it,
- * and can realloc() it to grow it, and should free() it to
- * delete it.
- */
- int yy_is_our_buffer;
-
- /* Whether this is an "interactive" input source; if so, and
- * if we're using stdio for input, then we want to use getc()
- * instead of fread(), to make sure we stop fetching input after
- * each newline.
- */
- int yy_is_interactive;
-
- /* Whether we're considered to be at the beginning of a line.
- * If so, '^' rules will be active on the next match, otherwise
- * not.
- */
- int yy_at_bol;
-
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
-
- /* Whether to try to fill the input buffer when we reach the
- * end of it.
- */
- int yy_fill_buffer;
-
- int yy_buffer_status;
-
- };
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-
-/* %if-c-only Standard (non-C++) definition */
-/* %not-for-header */
-
-/* %endif */
-
-/* %if-c-only Standard (non-C++) definition */
-
-/* %if-not-reentrant */
-/* %not-for-header */
-
-/* %endif */
-
-void hyyrestart (FILE *input_file );
-void hyy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE hyy_create_buffer (FILE *file,int size );
-void hyy_delete_buffer (YY_BUFFER_STATE b );
-void hyy_flush_buffer (YY_BUFFER_STATE b );
-void hyypush_buffer_state (YY_BUFFER_STATE new_buffer );
-void hyypop_buffer_state (void );
-
-YY_BUFFER_STATE hyy_scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE hyy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE hyy_scan_bytes (yyconst char *bytes,yy_size_t len );
-
-/* %endif */
-
-void *hyyalloc (yy_size_t );
-void *hyyrealloc (void *,yy_size_t );
-void hyyfree (void * );
-
-/* %% [1.0] hyytext/hyyin/hyyout/yy_state_type/hyylineno etc. def's & init go here */
-/* Begin user sect3 */
-
-#define hyywrap() 1
-#define YY_SKIP_YYWRAP
-
-#define FLEX_DEBUG
-
-extern int hyylineno;
-
-extern char *hyytext;
-#define yytext_ptr hyytext
-
-/* %if-c-only Standard (non-C++) definition */
-
-/* %endif */
-
-#ifdef YY_HEADER_EXPORT_START_CONDITIONS
-#define INITIAL 0
-#define STATE_STRING 1
-#define STATE_POSINT 2
-#define STATE_FLOAT 3
-#define STATE_COMMENT 4
-#define STATE_COMMENT_EOL 5
-
-#endif
-
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-/* %if-c-only */
-#include
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
-
-/* %if-c-only Reentrant structure and macros (non-C++). */
-/* %if-reentrant */
-/* %if-c-only */
-
-/* %endif */
-/* %if-reentrant */
-/* %endif */
-/* %endif End reentrant structures and macros. */
-
-/* Accessor methods to globals.
- These are made visible to non-reentrant scanners for convenience. */
-
-int hyylex_destroy (void );
-
-int hyyget_debug (void );
-
-void hyyset_debug (int debug_flag );
-
-YY_EXTRA_TYPE hyyget_extra (void );
-
-void hyyset_extra (YY_EXTRA_TYPE user_defined );
-
-FILE *hyyget_in (void );
-
-void hyyset_in (FILE * in_str );
-
-FILE *hyyget_out (void );
-
-void hyyset_out (FILE * out_str );
-
-yy_size_t hyyget_leng (void );
-
-char *hyyget_text (void );
-
-int hyyget_lineno (void );
-
-void hyyset_lineno (int line_number );
-
-/* %if-bison-bridge */
-/* %endif */
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int hyywrap (void );
-#else
-extern int hyywrap (void );
-#endif
-#endif
-
-/* %not-for-header */
-
-/* %endif */
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
-#endif
-
-#ifndef YY_NO_INPUT
-/* %if-c-only Standard (non-C++) definition */
-/* %not-for-header */
-
-/* %endif */
-#endif
-
-/* %if-c-only */
-
-/* %endif */
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
-#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* %if-tables-serialization structures and prototypes */
-/* %not-for-header */
-
-/* %not-for-header */
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-/* %if-c-only Standard (non-C++) definition */
-
-extern int hyylex (void);
-
-#define YY_DECL int hyylex (void)
-/* %endif */
-/* %if-c++-only C++ definition */
-/* %endif */
-#endif /* !YY_DECL */
-
-/* %not-for-header */
-
-/* %if-c++-only */
-/* %not-for-header */
-
-/* %endif */
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-/* %if-c-only */
-/* %not-for-header */
-
-#undef YY_NEW_FILE
-#undef YY_FLUSH_BUFFER
-#undef yy_set_bol
-#undef yy_new_buffer
-#undef yy_set_interactive
-#undef YY_DO_BEFORE_ACTION
-
-#ifdef YY_DECL_IS_OURS
-#undef YY_DECL_IS_OURS
-#undef YY_DECL
-#endif
-
-#line 350 "hyp_l.l"
-
-
-#line 451 "hyp_l.h"
-#undef hyyIN_HEADER
-#endif /* hyyHEADER_H */
Index: src_plugins/import_hyp/tests/samp.hyp
===================================================================
--- src_plugins/import_hyp/tests/samp.hyp (revision 7963)
+++ src_plugins/import_hyp/tests/samp.hyp (nonexistent)
@@ -1,261 +0,0 @@
-{VERSION=2.0}
-{UNITS=METRIC LENGTH}
-{BOARD
- (PERIMETER_SEGMENT X1=1.0 Y1=0.0 X2=19.0 Y2=0.0)
- (PERIMETER_SEGMENT X1=20.0 Y1=1.0 X2=20.0 Y2=9.0)
- (PERIMETER_SEGMENT X1=19.0 Y1=10.0 X2=1.0 Y2=10.0)
- (PERIMETER_SEGMENT X1=0.0 Y1=9.0 X2=0.0 Y2=1.0)
- (PERIMETER_ARC X1=0.0 Y1=1.0 X2=1.0 Y2=0.0 XC=1.0 YC=1.0 R=1.0)
- (PERIMETER_ARC X1=1.0 Y1=10.0 X2=0.0 Y2=9.0 XC=1.0 YC=9.0 R=1.0)
- (PERIMETER_ARC X1=20.0 Y1=9.0 X2=19.0 Y2=10.0 XC=19.0 YC=9.0 R=1.0)
- (PERIMETER_ARC X1=19.0 Y1=0.0 X2=20.0 Y2=1.0 XC=19.0 YC=1.0 R=1.0)
-
- (PERIMETER_SEGMENT X1=2.0 Y1=1.0 X2=3.0 Y2=1.0)
- (PERIMETER_SEGMENT X1=3.0 Y1=9.0 X2=2.0 Y2=9.0)
- (PERIMETER_ARC X1=2.0 Y1=9.0 X2=1.0 Y2=8.0 XC=2.0 YC=8.0 R=1.0)
- (PERIMETER_SEGMENT X1=1.0 Y1=8.0 X2=1.0 Y2=2.0)
- (PERIMETER_ARC X1=1.0 Y1=2.0 X2=2.0 Y2=1.0 XC=2.0 YC=2.0 R=1.0)
- (PERIMETER_SEGMENT X1=4.0 Y1=2.0 X2=4.0 Y2=8.0)
- (PERIMETER_ARC X1=3.0 Y1=1.0 X2=4.0 Y2=2.0 XC=3.0 YC=2.0 R=1.0)
- (PERIMETER_ARC X1=4.0 Y1=8.0 X2=3.0 Y2=9.0 XC=3.0 YC=8.0 R=1.0)
- (PERIMETER_ARC X1=5.5 Y1=5.0 X2=5.5 Y2=5.0 XC=5.0 YC=5.0 R=0.5)
- (PERIMETER_ARC X1=5.5 Y1=6.0 X2=4.5 Y2=6.0 XC=5.0 YC=6.0 R=0.5)
- (PERIMETER_SEGMENT X1=4.5 Y1=6.0 X2=5.5 Y2=6.0)
- (PERIMETER_ARC X1=4.5 Y1=7.5 X2=5.5 Y2=7.5 XC=5.0 YC=7.5 R=0.5)
- (PERIMETER_SEGMENT X1=4.5 Y1=7.5 X2=5.5 Y2=7.5)
- (PERIMETER_ARC X1=5.5 Y1=8.5 X2=5.0 Y2=8.0 XC=5.0 YC=8.5 R=0.5)
- (PERIMETER_SEGMENT X1=5.0 Y1=8.0 X2=5.5 Y2=8.5)
-}
-{PLANE_SEP=0.05}
-{STACKUP
- (SIGNAL T=0.000700 L=component)
- (DIELECTRIC T=0.002000 C=4.000000)
- (PLANE T=0.000700 L=solder PS=0.508)
-}
-{DEVICES
- (? REF=U1 NAME=BC548 L=component)
-}
-{PADSTACK=roundpad, 0.2
- (MDEF, 0, 0.5, 0.5, 0)
-}
-{PADSTACK=squarepad, 0.2
- (MDEF, 1, 0.5, 0.5, 0)
-}
-{PADSTACK=oblongpad, 0.2
- (MDEF, 2, 0.5, 0.5, 0)
-}
-{PADSTACK=nodrill,
- (MDEF, 0, 0.5, 0.5, 0)
-}
-{PADSTACK=0802pad,
- (component, 1, 0.2, 0.12, 0)
-}
-{NET=segtst
- (SEG X1=6.500000 Y1=3.000000 X2=6.625000 Y2=3.000000 W=0.008333 L=component)
- (SEG X1=6.433013 Y1=3.250000 X2=6.649519 Y2=3.375000 W=0.016667 L=component)
- (SEG X1=6.250000 Y1=3.433013 X2=6.437500 Y2=3.757772 W=0.025000 L=component)
- (SEG X1=6.000000 Y1=3.500000 X2=6.000000 Y2=4.000000 W=0.033333 L=component)
- (SEG X1=5.750000 Y1=3.433013 X2=5.437500 Y2=3.974279 W=0.041667 L=component)
- (SEG X1=5.566987 Y1=3.250000 X2=4.917468 Y2=3.625000 W=0.050000 L=component)
- (SEG X1=5.500000 Y1=3.000000 X2=4.625000 Y2=3.000000 W=0.058333 L=component)
- (SEG X1=5.566987 Y1=2.750000 X2=4.700962 Y2=2.250000 W=0.066667 L=component)
- (SEG X1=5.750000 Y1=2.566987 X2=5.187500 Y2=1.592709 W=0.075000 L=component)
- (SEG X1=6.000000 Y1=2.500000 X2=6.000000 Y2=1.250000 W=0.083333 L=component)
- (SEG X1=6.250000 Y1=2.566987 X2=6.937500 Y2=1.376202 W=0.091667 L=component)
- (SEG X1=6.433013 Y1=2.750000 X2=7.732051 Y2=2.000000 W=0.100000 L=component)
-}
-{NET=arctst
- (ARC X1=9.100000 Y1=1.000000 X2=9.100000 Y2=1.000000 XC=9.000000 YC=1.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.100000 Y1=1.400000 X2=9.070711 Y2=1.470711 XC=9.000000 YC=1.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.100000 Y1=1.800000 X2=9.000000 Y2=1.900000 XC=9.000000 YC=1.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.100000 Y1=2.200000 X2=8.929289 Y2=2.270711 XC=9.000000 YC=2.200000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.100000 Y1=2.600000 X2=8.900000 Y2=2.600000 XC=9.000000 YC=2.600000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.100000 Y1=3.000000 X2=8.929289 Y2=2.929289 XC=9.000000 YC=3.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.100000 Y1=3.400000 X2=9.000000 Y2=3.300000 XC=9.000000 YC=3.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.100000 Y1=3.800000 X2=9.070711 Y2=3.729289 XC=9.000000 YC=3.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.470711 Y1=1.070711 X2=9.500000 Y2=1.000000 XC=9.400000 YC=1.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.470711 Y1=1.470711 X2=9.470711 Y2=1.470711 XC=9.400000 YC=1.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.470711 Y1=1.870711 X2=9.400000 Y2=1.900000 XC=9.400000 YC=1.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.470711 Y1=2.270711 X2=9.329289 Y2=2.270711 XC=9.400000 YC=2.200000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.470711 Y1=2.670711 X2=9.300000 Y2=2.600000 XC=9.400000 YC=2.600000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.470711 Y1=3.070711 X2=9.329289 Y2=2.929289 XC=9.400000 YC=3.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.470711 Y1=3.470711 X2=9.400000 Y2=3.300000 XC=9.400000 YC=3.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.470711 Y1=3.870711 X2=9.470711 Y2=3.729289 XC=9.400000 YC=3.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.800000 Y1=1.100000 X2=9.900000 Y2=1.000000 XC=9.800000 YC=1.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.800000 Y1=1.500000 X2=9.870711 Y2=1.470711 XC=9.800000 YC=1.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.800000 Y1=1.900000 X2=9.800000 Y2=1.900000 XC=9.800000 YC=1.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.800000 Y1=2.300000 X2=9.729289 Y2=2.270711 XC=9.800000 YC=2.200000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.800000 Y1=2.700000 X2=9.700000 Y2=2.600000 XC=9.800000 YC=2.600000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.800000 Y1=3.100000 X2=9.729289 Y2=2.929289 XC=9.800000 YC=3.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.800000 Y1=3.500000 X2=9.800000 Y2=3.300000 XC=9.800000 YC=3.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=9.800000 Y1=3.900000 X2=9.870711 Y2=3.729289 XC=9.800000 YC=3.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.129289 Y1=1.070711 X2=10.300000 Y2=1.000000 XC=10.200000 YC=1.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.129289 Y1=1.470711 X2=10.270711 Y2=1.470711 XC=10.200000 YC=1.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.129289 Y1=1.870711 X2=10.200000 Y2=1.900000 XC=10.200000 YC=1.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.129289 Y1=2.270711 X2=10.129289 Y2=2.270711 XC=10.200000 YC=2.200000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.129289 Y1=2.670711 X2=10.100000 Y2=2.600000 XC=10.200000 YC=2.600000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.129289 Y1=3.070711 X2=10.129289 Y2=2.929289 XC=10.200000 YC=3.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.129289 Y1=3.470711 X2=10.200000 Y2=3.300000 XC=10.200000 YC=3.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.129289 Y1=3.870711 X2=10.270711 Y2=3.729289 XC=10.200000 YC=3.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.500000 Y1=1.000000 X2=10.700000 Y2=1.000000 XC=10.600000 YC=1.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.500000 Y1=1.400000 X2=10.670711 Y2=1.470711 XC=10.600000 YC=1.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.500000 Y1=1.800000 X2=10.600000 Y2=1.900000 XC=10.600000 YC=1.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.500000 Y1=2.200000 X2=10.529289 Y2=2.270711 XC=10.600000 YC=2.200000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.500000 Y1=2.600000 X2=10.500000 Y2=2.600000 XC=10.600000 YC=2.600000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.500000 Y1=3.000000 X2=10.529289 Y2=2.929289 XC=10.600000 YC=3.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.500000 Y1=3.400000 X2=10.600000 Y2=3.300000 XC=10.600000 YC=3.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.500000 Y1=3.800000 X2=10.670711 Y2=3.729289 XC=10.600000 YC=3.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.929289 Y1=0.929289 X2=11.100000 Y2=1.000000 XC=11.000000 YC=1.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.929289 Y1=1.329289 X2=11.070711 Y2=1.470711 XC=11.000000 YC=1.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.929289 Y1=1.729289 X2=11.000000 Y2=1.900000 XC=11.000000 YC=1.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.929289 Y1=2.129289 X2=10.929289 Y2=2.270711 XC=11.000000 YC=2.200000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.929289 Y1=2.529289 X2=10.900000 Y2=2.600000 XC=11.000000 YC=2.600000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.929289 Y1=2.929289 X2=10.929289 Y2=2.929289 XC=11.000000 YC=3.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.929289 Y1=3.329289 X2=11.000000 Y2=3.300000 XC=11.000000 YC=3.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=10.929289 Y1=3.729289 X2=11.070711 Y2=3.729289 XC=11.000000 YC=3.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.400000 Y1=0.900000 X2=11.500000 Y2=1.000000 XC=11.400000 YC=1.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.400000 Y1=1.300000 X2=11.470711 Y2=1.470711 XC=11.400000 YC=1.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.400000 Y1=1.700000 X2=11.400000 Y2=1.900000 XC=11.400000 YC=1.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.400000 Y1=2.100000 X2=11.329289 Y2=2.270711 XC=11.400000 YC=2.200000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.400000 Y1=2.500000 X2=11.300000 Y2=2.600000 XC=11.400000 YC=2.600000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.400000 Y1=2.900000 X2=11.329289 Y2=2.929289 XC=11.400000 YC=3.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.400000 Y1=3.300000 X2=11.400000 Y2=3.300000 XC=11.400000 YC=3.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.400000 Y1=3.700000 X2=11.470711 Y2=3.729289 XC=11.400000 YC=3.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.870711 Y1=0.929289 X2=11.900000 Y2=1.000000 XC=11.800000 YC=1.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.870711 Y1=1.329289 X2=11.870711 Y2=1.470711 XC=11.800000 YC=1.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.870711 Y1=1.729289 X2=11.800000 Y2=1.900000 XC=11.800000 YC=1.800000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.870711 Y1=2.129289 X2=11.729289 Y2=2.270711 XC=11.800000 YC=2.200000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.870711 Y1=2.529289 X2=11.700000 Y2=2.600000 XC=11.800000 YC=2.600000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.870711 Y1=2.929289 X2=11.729289 Y2=2.929289 XC=11.800000 YC=3.000000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.870711 Y1=3.329289 X2=11.800000 Y2=3.300000 XC=11.800000 YC=3.400000 R=0.100000 W=0.025000 L=component)
- (ARC X1=11.870711 Y1=3.729289 X2=11.870711 Y2=3.729289 XC=11.800000 YC=3.800000 R=0.100000 W=0.025000 L=component)
-}
-{NET=viatst
- (VIA X=13 Y=1 P=roundpad)
- (VIA X=13 Y=2 P=squarepad)
- (VIA X=13 Y=3 P=oblongpad)
- (VIA X=13 Y=4 P=nodrill)
- (SEG X1=13 Y1=1 X2=13 Y2=2 W=0.1 L=component)
- (SEG X1=13 Y1=2 X2=13 Y2=3 W=0.1 L=component)
- (SEG X1=13 Y1=3 X2=13 Y2=4 W=0.1 L=component)
-}
-{NET=oldviatst
- (VIA X=14 Y=1 D=0.2 L1=component S1=ROUND S1X=0.5 S1Y=0.5)
- (VIA X=14 Y=2 D=0.2 L1=component L2=solder S1=RECT S1X=0.5 S1Y=0.5)
- (VIA X=14 Y=3 D=0.2 L1=component L2=solder S1=OBLONG S1X=0.5 S1Y=0.5)
- (VIA X=14 Y=4 D=0.0 L1=component L2=solder S1=ROUND S1X=0.5 S1Y=0.5)
- (SEG X1=14 Y1=1 X2=14 Y2=2 W=0.1 L=component)
- (SEG X1=14 Y1=2 X2=14 Y2=3 W=0.1 L=component)
- (SEG X1=14 Y1=3 X2=14 Y2=4 W=0.1 L=component)
-}
-{NET=pintst
- (PIN X=15 Y=1 R=U1.1 P=roundpad)
- (PIN X=15 Y=2 R=U1.2 P=squarepad)
- (PIN X=15 Y=3 R=U1.3 P=oblongpad)
-}
-{NET=padtst
- (PAD X=16 Y=1 L=component S=ROUND SX=0.5 SY=0.5)
- (PAD X=16 Y=2 L=component S=RECT SX=0.5 SY=0.5)
- (PAD X=16 Y=3 L=component S=OBLONG SX=0.5 SY=0.5)
- (PAD X=17 Y=1 L=solder S=ROUND SX=0.5 SY=0.5)
- (PAD X=17 Y=2 L=solder S=RECT SX=0.5 SY=0.5)
- (PAD X=17 Y=3 L=solder S=OBLONG SX=0.5 SY=0.5)
-}
-{NET=usegtst
- (USEG X1=18 Y1=1 L1=component X2=19 Y2=1 L2=component ZL=component ZW=0.1 ZLEN=2 )
- (USEG X1=18 Y1=2 L1=component X2=19 Y2=2 L2=component Z=50 D=1e-12 R=5 )
- (USEG X1=18 Y1=3 L1=component X2=19 Y2=3 L2=solder ZL=component ZW=0.1 ZLEN=2 )
- (USEG X1=18 Y1=4 L1=component X2=19 Y2=4 L2=solder Z=50 D=1e-12 R=5 )
-}
-{NET=polylinetst
- {POLYGON L=component W=0.05 ID=1 X=5.875000 Y=4.875000
- (LINE X=6.125000 Y=4.875000)
- (LINE X=6.125000 Y=5.125000)
- (LINE X=5.875000 Y=5.125000)
- (LINE X=5.875000 Y=4.875000)
- }
- {POLYLINE L=component W=0.1 ID=1 X=6.000000 Y=5.000000
- (LINE X=8.000000 Y=5.000000)
- (CURVE X1=8.000000 Y1=5.000000 X2=8.000000 Y2=5.500000 XC=8.000000 YC=5.250000 R=0.250000)
- (LINE X=6.000000 Y=5.500000)
- (CURVE X1=6.000000 Y1=6.000000 X2=6.000000 Y2=5.500000 XC=6.000000 YC=5.750000 R=0.250000)
- (LINE X=8.000000 Y=6.000000)
- (CURVE X1=8.000000 Y1=6.000000 X2=8.000000 Y2=6.500000 XC=8.000000 YC=6.250000 R=0.250000)
- (LINE X=6.000000 Y=6.500000)
- (CURVE X1=6.000000 Y1=7.000000 X2=6.000000 Y2=6.500000 XC=6.000000 YC=6.750000 R=0.250000)
- (LINE X=8.000000 Y=7.000000)
- (CURVE X1=8.000000 Y1=7.000000 X2=8.000000 Y2=7.500000 XC=8.000000 YC=7.250000 R=0.250000)
- (LINE X=6.000000 Y=7.500000)
- (CURVE X1=6.000000 Y1=8.000000 X2=6.000000 Y2=7.500000 XC=6.000000 YC=7.750000 R=0.250000)
- (LINE X=8.000000 Y=8.000000)
- (CURVE X1=8.000000 Y1=8.000000 X2=8.000000 Y2=8.500000 XC=8.000000 YC=8.250000 R=0.250000)
- (LINE X=6.000000 Y=8.500000)
- (CURVE X1=6.000000 Y1=9.000000 X2=6.000000 Y2=8.500000 XC=6.000000 YC=8.750000 R=0.250000)
- }
-}
-{NET=curvetst
- {POLYGON L=component W=0.05 ID=2 X=10.000000 Y=5.500000
- (CURVE X1=10.000000 Y1=5.500000 X2=10.000000 Y2=5.500000 XC=9.500000 YC=5.500000 R=0.500000 )
- }
- {POLYVOID ID=2 X=9.250000 Y=5.500000
- (CURVE X1=9.250000 Y1=5.500000 X2=9.750000 Y2=5.500000 XC=9.500000 YC=5.500000 R=0.250000 )
- (LINE X=9.250000 Y=5.500000)
- }
-}
-{NET=linetst
- {POLYGON L=component W=0.05 ID=3 X=9.000000 Y=6.500000
- (LINE X=10.000000 Y=6.500000)
- (LINE X=10.000000 Y=7.000000)
- (LINE X=9.500000 Y=7.000000)
- (LINE X=9.500000 Y=7.500000)
- (LINE X=9.000000 Y=7.500000)
- (LINE X=9.000000 Y=6.500000)
- }
- {POLYVOID ID=3 X=9.125000 Y=6.625000
- (LINE X=9.625000 Y=6.625000)
- (LINE X=9.625000 Y=6.875000)
- (LINE X=9.375000 Y=6.875000)
- (LINE X=9.375000 Y=7.125000)
- (LINE X=9.125000 Y=7.125000)
- (LINE X=9.125000 Y=6.625000)
- }
-}
-{NET=poly_clearance_tst PS=0.05
- (VIA X=11.750000 Y=5.250000 P=0802pad)
- (VIA X=11.750000 Y=6.250000 P=0802pad)
- (VIA X=11.750000 Y=7.250000 P=0802pad)
- (SEG X1=11.000000 Y1=5.250000 X2=11.750000 Y2=5.250000 W=0.04 L=component)
- (SEG X1=11.000000 Y1=6.250000 X2=11.750000 Y2=6.250000 W=0.04 L=component)
- (SEG X1=11.000000 Y1=7.250000 X2=11.750000 Y2=7.250000 W=0.04 L=component)
- (SEG X1=11.000000 Y1=5.250000 X2=11.000000 Y2=6.250000 W=0.04 L=component)
- (SEG X1=11.000000 Y1=6.250000 X2=11.000000 Y2=7.250000 W=0.04 L=component)
- {POLYGON L=component T=POUR W=0.1 ID=4 X=11.500000 Y=5.000000
- (LINE X=12.500000 Y=5.000000)
- (LINE X=12.500000 Y=5.500000)
- (LINE X=11.500000 Y=5.500000)
- (LINE X=11.500000 Y=5.000000)
- }
- {POLYGON L=component T=COPPER W=0.1 ID=5 X=11.500000 Y=6.000000
- (LINE X=12.500000 Y=6.000000)
- (LINE X=12.500000 Y=6.500000)
- (LINE X=11.500000 Y=6.500000)
- (LINE X=11.500000 Y=6.000000)
- }
- {POLYGON L=component T=PLANE W=0.1 ID=6 X=11.500000 Y=7.000000
- (LINE X=12.500000 Y=7.000000)
- (LINE X=12.500000 Y=7.500000)
- (LINE X=11.500000 Y=7.500000)
- (LINE X=11.500000 Y=7.000000)
- }
-}
-{NET=poly_clearance_tst2 PS=0.05
- (VIA X=12.250000 Y=5.250000 P=0802pad)
- (VIA X=12.250000 Y=6.250000 P=0802pad)
- (VIA X=12.250000 Y=7.250000 P=0802pad)
- (SEG X1=13.000000 Y1=5.250000 X2=12.250000 Y2=5.250000 W=0.04 L=component)
- (SEG X1=13.000000 Y1=6.250000 X2=12.250000 Y2=6.250000 W=0.04 L=component)
- (SEG X1=13.000000 Y1=7.250000 X2=12.250000 Y2=7.250000 W=0.04 L=component)
- (SEG X1=13.000000 Y1=5.250000 X2=13.000000 Y2=6.250000 W=0.04 L=component)
- (SEG X1=13.000000 Y1=6.250000 X2=13.000000 Y2=7.250000 W=0.04 L=component)
-}
-{END}
Index: src_plugins/import_hyp/tests/gensamp
===================================================================
--- src_plugins/import_hyp/tests/gensamp (revision 7963)
+++ src_plugins/import_hyp/tests/gensamp (nonexistent)
@@ -1,306 +0,0 @@
-#!/usr/bin/python
-"""
- Generate sample hyperlynx file
- Copyright 2017 Koen De Vleeschauwer.
-
- This file is part of pcb-rnd.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-"""
-
-from math import pi, sin, cos
-
-print "{VERSION=2.0}"
-print "{UNITS=METRIC LENGTH}"
-print "{BOARD"
-print " (PERIMETER_SEGMENT X1=1.0 Y1=0.0 X2=19.0 Y2=0.0)"
-print " (PERIMETER_SEGMENT X1=20.0 Y1=1.0 X2=20.0 Y2=9.0)"
-print " (PERIMETER_SEGMENT X1=19.0 Y1=10.0 X2=1.0 Y2=10.0)"
-print " (PERIMETER_SEGMENT X1=0.0 Y1=9.0 X2=0.0 Y2=1.0)"
-print " (PERIMETER_ARC X1=0.0 Y1=1.0 X2=1.0 Y2=0.0 XC=1.0 YC=1.0 R=1.0)"
-print " (PERIMETER_ARC X1=1.0 Y1=10.0 X2=0.0 Y2=9.0 XC=1.0 YC=9.0 R=1.0)"
-print " (PERIMETER_ARC X1=20.0 Y1=9.0 X2=19.0 Y2=10.0 XC=19.0 YC=9.0 R=1.0)"
-print " (PERIMETER_ARC X1=19.0 Y1=0.0 X2=20.0 Y2=1.0 XC=19.0 YC=1.0 R=1.0)"
-print ""
-print " (PERIMETER_SEGMENT X1=2.0 Y1=1.0 X2=3.0 Y2=1.0)"
-print " (PERIMETER_SEGMENT X1=3.0 Y1=9.0 X2=2.0 Y2=9.0)"
-print " (PERIMETER_ARC X1=2.0 Y1=9.0 X2=1.0 Y2=8.0 XC=2.0 YC=8.0 R=1.0)"
-print " (PERIMETER_SEGMENT X1=1.0 Y1=8.0 X2=1.0 Y2=2.0)"
-print " (PERIMETER_ARC X1=1.0 Y1=2.0 X2=2.0 Y2=1.0 XC=2.0 YC=2.0 R=1.0)"
-print " (PERIMETER_SEGMENT X1=4.0 Y1=2.0 X2=4.0 Y2=8.0)"
-print " (PERIMETER_ARC X1=3.0 Y1=1.0 X2=4.0 Y2=2.0 XC=3.0 YC=2.0 R=1.0)"
-print " (PERIMETER_ARC X1=4.0 Y1=8.0 X2=3.0 Y2=9.0 XC=3.0 YC=8.0 R=1.0)"
-
-print " (PERIMETER_ARC X1=5.5 Y1=5.0 X2=5.5 Y2=5.0 XC=5.0 YC=5.0 R=0.5)"
-
-print " (PERIMETER_ARC X1=5.5 Y1=6.0 X2=4.5 Y2=6.0 XC=5.0 YC=6.0 R=0.5)"
-print " (PERIMETER_SEGMENT X1=4.5 Y1=6.0 X2=5.5 Y2=6.0)"
-
-print " (PERIMETER_ARC X1=4.5 Y1=7.5 X2=5.5 Y2=7.5 XC=5.0 YC=7.5 R=0.5)"
-print " (PERIMETER_SEGMENT X1=4.5 Y1=7.5 X2=5.5 Y2=7.5)"
-
-print " (PERIMETER_ARC X1=5.5 Y1=8.5 X2=5.0 Y2=8.0 XC=5.0 YC=8.5 R=0.5)"
-print " (PERIMETER_SEGMENT X1=5.0 Y1=8.0 X2=5.5 Y2=8.5)"
-
-print "}"
-
-print "{PLANE_SEP=0.05}"
-
-print "{STACKUP"
-print " (SIGNAL T=0.000700 L=component)"
-print " (DIELECTRIC T=0.002000 C=4.000000)"
-print " (PLANE T=0.000700 L=solder PS=0.508)"
-print "}"
-print "{DEVICES"
-print " (? REF=U1 NAME=BC548 L=component)"
-print "}"
-
-#
-# PADSTACK. MDEF is shorthand for "all copper layers"
-#
-
-print "{PADSTACK=roundpad, 0.2"
-print " (MDEF, 0, 0.5, 0.5, 0)"
-print "}"
-print "{PADSTACK=squarepad, 0.2"
-print " (MDEF, 1, 0.5, 0.5, 0)"
-print "}"
-print "{PADSTACK=oblongpad, 0.2"
-print " (MDEF, 2, 0.5, 0.5, 0)"
-print "}"
-print "{PADSTACK=nodrill,"
-print " (MDEF, 0, 0.5, 0.5, 0)"
-print "}"
-print "{PADSTACK=0802pad,"
-print " (component, 1, 0.2, 0.12, 0)"
-print "}"
-
-#
-# SEG line segments
-#
-
-x0 = 6
-y0 = 3
-r1 = 0.5
-r2 = 2
-max = 12
-
-print "{NET=segtst"
-
-for x in range (0, max):
- alpha = x * 2 * pi / max
- x1 = x0 + r1 * cos (alpha)
- y1 = y0 + r1 * sin (alpha)
- r = r1 + (r2 - r1) * (x + 1) / max
- x2 = x0 + r * cos (alpha)
- y2 = y0 + r * sin (alpha)
- w = (x + 1) * 0.1 / max
- print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=%f L=component)" % ( x1, y1, x2, y2, w)
-
-print "}"
-
-#
-# ARC arc segments
-#
-
-max = 8
-x0 = 9
-y0 = 1
-r = 0.1
-w = r / 4
-
-print "{NET=arctst"
-
-for a in range (0, max):
- for b in range (0, max):
- alpha = 2 * pi * a / max
- beta = 2 * pi * b / max
- xc = x0 + 4 * r * a
- yc = y0 + 4 * r * b
- x1 = xc + r * cos (alpha)
- y1 = yc + r * sin (alpha)
- x2 = xc + r * cos (beta)
- y2 = yc + r * sin (beta)
- print " (ARC X1=%f Y1=%f X2=%f Y2=%f XC=%f YC=%f R=%f W=%f L=component)" % ( x1, y1, x2, y2, xc, yc, r, w)
-
-print "}"
-
-#
-# VIA
-#
-
-print "{NET=viatst"
-print " (VIA X=13 Y=1 P=roundpad)"
-print " (VIA X=13 Y=2 P=squarepad)"
-print " (VIA X=13 Y=3 P=oblongpad)"
-print " (VIA X=13 Y=4 P=nodrill)"
-print " (SEG X1=13 Y1=1 X2=13 Y2=2 W=0.1 L=component)"
-print " (SEG X1=13 Y1=2 X2=13 Y2=3 W=0.1 L=component)"
-print " (SEG X1=13 Y1=3 X2=13 Y2=4 W=0.1 L=component)"
-print "}"
-
-#
-# old-style VIA, compatibility only.
-#
-
-print "{NET=oldviatst"
-print " (VIA X=14 Y=1 D=0.2 L1=component S1=ROUND S1X=0.5 S1Y=0.5)"
-print " (VIA X=14 Y=2 D=0.2 L1=component L2=solder S1=RECT S1X=0.5 S1Y=0.5)"
-print " (VIA X=14 Y=3 D=0.2 L1=component L2=solder S1=OBLONG S1X=0.5 S1Y=0.5)"
-print " (VIA X=14 Y=4 D=0.0 L1=component L2=solder S1=ROUND S1X=0.5 S1Y=0.5)"
-print " (SEG X1=14 Y1=1 X2=14 Y2=2 W=0.1 L=component)"
-print " (SEG X1=14 Y1=2 X2=14 Y2=3 W=0.1 L=component)"
-print " (SEG X1=14 Y1=3 X2=14 Y2=4 W=0.1 L=component)"
-print "}"
-
-print "{NET=pintst"
-# a through-hole transistor
-print " (PIN X=15 Y=1 R=U1.1 P=roundpad)"
-print " (PIN X=15 Y=2 R=U1.2 P=squarepad)"
-print " (PIN X=15 Y=3 R=U1.3 P=oblongpad)"
-print "}"
-
-print "{NET=padtst"
-print " (PAD X=16 Y=1 L=component S=ROUND SX=0.5 SY=0.5)"
-print " (PAD X=16 Y=2 L=component S=RECT SX=0.5 SY=0.5)"
-print " (PAD X=16 Y=3 L=component S=OBLONG SX=0.5 SY=0.5)"
-print " (PAD X=17 Y=1 L=solder S=ROUND SX=0.5 SY=0.5)"
-print " (PAD X=17 Y=2 L=solder S=RECT SX=0.5 SY=0.5)"
-print " (PAD X=17 Y=3 L=solder S=OBLONG SX=0.5 SY=0.5)"
-print "}"
-
-print "{NET=usegtst"
-print " (USEG X1=18 Y1=1 L1=component X2=19 Y2=1 L2=component ZL=component ZW=0.1 ZLEN=2 )"
-print " (USEG X1=18 Y1=2 L1=component X2=19 Y2=2 L2=component Z=50 D=1e-12 R=5 )"
-print " (USEG X1=18 Y1=3 L1=component X2=19 Y2=3 L2=solder ZL=component ZW=0.1 ZLEN=2 )"
-print " (USEG X1=18 Y1=4 L1=component X2=19 Y2=4 L2=solder Z=50 D=1e-12 R=5 )"
-print "}"
-
-x0 = 6.0
-y0 = 5.0
-l = 2.0
-h = 0.5
-r = h/2.0
-w = h/4.0
-
-print "{NET=polylinetst"
-print " {POLYGON L=component W=0.05 ID=1 X=%f Y=%f" % (x0-w, y0-w)
-print " (LINE X=%f Y=%f)" % (x0+w, y0-w)
-print " (LINE X=%f Y=%f)" % (x0+w, y0+w)
-print " (LINE X=%f Y=%f)" % (x0-w, y0+w)
-print " (LINE X=%f Y=%f)" % (x0-w, y0-w)
-print " }"
-print " {POLYLINE L=component W=0.1 ID=1 X=%f Y=%f" % (x0, y0)
-for a in range (0, 8, 2):
- print " (LINE X=%f Y=%f)" % ( x0+l, y0+a*h)
- print " (CURVE X1=%f Y1=%f X2=%f Y2=%f XC=%f YC=%f R=%f)" % ( x0+l, y0+a*h, x0+l, y0+(a+1)*h, x0+l, y0+(a+0.5)*h, r)
- print " (LINE X=%f Y=%f)" % ( x0, y0+(a+1)*h)
- print " (CURVE X1=%f Y1=%f X2=%f Y2=%f XC=%f YC=%f R=%f)" % ( x0, y0+(a+2)*h, x0, y0+(a+1)*h, x0, y0+(a+1.5)*h, r)
-
-print " }"
-print "}"
-
-x0 = 9.5
-y0 = 5.5
-r = 0.5
-
-print "{NET=curvetst"
-print " {POLYGON L=component W=0.05 ID=2 X=%f Y=%f" % (x0+r, y0)
-print " (CURVE X1=%f Y1=%f X2=%f Y2=%f XC=%f YC=%f R=%f )" % (x0+r, y0, x0+r, y0, x0, y0, r)
-print " }"
-print " {POLYVOID ID=2 X=%f Y=%f" % (x0-r/2, y0)
-print " (CURVE X1=%f Y1=%f X2=%f Y2=%f XC=%f YC=%f R=%f )" % (x0-r/2, y0, x0+r/2, y0, x0, y0, r/2)
-print " (LINE X=%f Y=%f)" % (x0-r/2, y0)
-print " }"
-print "}"
-
-x0 = 9.0
-y0 = 6.5
-w = 0.5
-
-print "{NET=linetst"
-print " {POLYGON L=component W=0.05 ID=3 X=%f Y=%f" % (x0, y0)
-print " (LINE X=%f Y=%f)" % (x0+2*w, y0)
-print " (LINE X=%f Y=%f)" % (x0+2*w, y0+w)
-print " (LINE X=%f Y=%f)" % (x0+w, y0+w)
-print " (LINE X=%f Y=%f)" % (x0+w, y0+2*w)
-print " (LINE X=%f Y=%f)" % (x0, y0+2*w)
-print " (LINE X=%f Y=%f)" % (x0, y0)
-print " }"
-
-x0 = 9.125
-y0 = 6.625
-w = 0.25
-
-print " {POLYVOID ID=3 X=%f Y=%f" % (x0, y0)
-print " (LINE X=%f Y=%f)" % (x0+2*w, y0)
-print " (LINE X=%f Y=%f)" % (x0+2*w, y0+w)
-print " (LINE X=%f Y=%f)" % (x0+w, y0+w)
-print " (LINE X=%f Y=%f)" % (x0+w, y0+2*w)
-print " (LINE X=%f Y=%f)" % (x0, y0+2*w)
-print " (LINE X=%f Y=%f)" % (x0, y0)
-print " }"
-
-print "}"
-
-x0 = 11.5
-y0 = 5.0
-w = 1.0
-h = 0.5
-s = 1.0
-
-def mkpolygon (typ, id, x0, y0, w, h):
- print " {POLYGON L=component T=%s W=0.1 ID=%i X=%f Y=%f" % (typ, id, x0, y0)
- print " (LINE X=%f Y=%f)" % (x0+w, y0)
- print " (LINE X=%f Y=%f)" % (x0+w, y0+h)
- print " (LINE X=%f Y=%f)" % (x0, y0+h)
- print " (LINE X=%f Y=%f)" % (x0, y0)
- print " }"
- return
-
-
-x1 = 11.0
-x2 = x0 + w / 4.0
-print "{NET=poly_clearance_tst PS=0.05"
-print " (VIA X=%f Y=%f P=0802pad)" % (x2, y0+h/2.0)
-print " (VIA X=%f Y=%f P=0802pad)" % (x2, y0+h/2.0+s)
-print " (VIA X=%f Y=%f P=0802pad)" % (x2, y0+h/2.0+2*s)
-print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0, x2, y0+h/2.0)
-print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0+s, x2, y0+h/2.0+s)
-print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0+2*s, x2, y0+h/2.0+2*s)
-print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0, x1, y0+h/2.0+s)
-print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0+s, x1, y0+h/2.0+2*s)
-
-mkpolygon("POUR", 4, x0, y0, w, h)
-mkpolygon("COPPER", 5, x0, y0 + s, w, h)
-mkpolygon("PLANE", 6, x0, y0 + 2 * s, w, h)
-
-print "}"
-
-x1 = 13.0
-x2 = x0 + w * 3.0 / 4.0
-print "{NET=poly_clearance_tst2 PS=0.05"
-print " (VIA X=%f Y=%f P=0802pad)" % (x2, y0+h/2.0)
-print " (VIA X=%f Y=%f P=0802pad)" % (x2, y0+h/2.0+s)
-print " (VIA X=%f Y=%f P=0802pad)" % (x2, y0+h/2.0+2*s)
-print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0, x2, y0+h/2.0)
-print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0+s, x2, y0+h/2.0+s)
-print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0+2*s, x2, y0+h/2.0+2*s)
-print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0, x1, y0+h/2.0+s)
-print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0+s, x1, y0+h/2.0+2*s)
-print "}"
-
-print "{END}"
-
-# not truncated
Property changes on: src_plugins/import_hyp/tests/gensamp
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: src_plugins/import_hyp/hacking.txt
===================================================================
--- src_plugins/import_hyp/hacking.txt (revision 7963)
+++ src_plugins/import_hyp/hacking.txt (nonexistent)
@@ -1,17 +0,0 @@
-
-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
-
Index: src_plugins/import_hyp/parser.h
===================================================================
--- src_plugins/import_hyp/parser.h (revision 7963)
+++ src_plugins/import_hyp/parser.h (nonexistent)
@@ -1,251 +0,0 @@
-/*
- * read hyperlynx files
- * Copyright 2012 Koen De Vleeschauwer.
- *
- * This file is part of pcb-rnd.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#ifndef PARSER_H
-#define PARSER_H
-
-#include
-#include "pcb_bool.h"
-#include "board.h"
-
- /*
- * Parameters passed on by the parser.
- * All variables added here are initialized in new_record().
- */
-
-typedef enum { PAD_TYPE_METAL, PAD_TYPE_ANTIPAD, PAD_TYPE_THERMAL_RELIEF } pad_type_enum;
-
-typedef enum { PIN_SIM_IN, PIN_SIM_OUT, PIN_SIM_BOTH } pin_function_enum;
-
-typedef enum { POLYGON_TYPE_POUR, POLYGON_TYPE_PLANE, POLYGON_TYPE_COPPER, POLYGON_TYPE_PAD,
- POLYGON_TYPE_ANTIPAD
-} polygon_type_enum;
-
-typedef struct {
- double vers; /* version of the hyp file format */
- pcb_bool detailed; /* data detailed enough for power integrity */
- pcb_bool unit_system_english; /* english or metric units */
- pcb_bool metal_thickness_weight; /* copper by weight or by length */
- double default_plane_separation; /* trace to plane separation */
-
- /* stackup record */
- pcb_bool use_die_for_metal; /* dielectric constant and loss tangent of dielectric for metal layers */
- double bulk_resistivity;
- pcb_bool conformal;
- double epsilon_r;
- char *layer_name;
- double loss_tangent;
- char *material_name;
- double plane_separation;
- double plating_thickness;
- pcb_bool prepreg;
- double temperature_coefficient; /* temperature coefficient of resistivity */
- double thickness; /* layer thickness */
-
- /* stackup record flags */
- pcb_bool bulk_resistivity_set;
- pcb_bool conformal_set;
- pcb_bool epsilon_r_set;
- pcb_bool layer_name_set;
- pcb_bool loss_tangent_set;
- pcb_bool material_name_set;
- pcb_bool plane_separation_set;
- pcb_bool plating_thickness_set;
- pcb_bool prepreg_set;
- pcb_bool temperature_coefficient_set;
- pcb_bool thickness_set;
-
- /* device record */
- char *device_type;
- char *ref;
- double value_float;
- char *value_string;
- char *package;
-
- /* device record flags */
- pcb_bool name_set;
- pcb_bool value_float_set;
- pcb_bool value_string_set;
- pcb_bool package_set;
-
- /* supplies record */
- pcb_bool voltage_specified;
- pcb_bool conversion;
-
- /* padstack record */
- char *padstack_name;
- double drill_size;
- double pad_shape;
- double pad_sx;
- double pad_sy;
- double pad_angle;
- double thermal_clear_shape;
- double thermal_clear_sx;
- double thermal_clear_sy;
- double thermal_clear_angle;
- pad_type_enum pad_type;
-
- /* padstack record flags */
- pcb_bool padstack_name_set;
- pcb_bool drill_size_set;
- pcb_bool pad_type_set;
-
- /* net record */
- double width;
- double left_plane_separation;
- pcb_bool width_set;
- pcb_bool left_plane_separation_set;
-
- /* via subrecord of net */
- char *layer1_name;
- pcb_bool layer1_name_set;
- char *layer2_name;
- pcb_bool layer2_name_set;
- char *via_pad_shape;
- pcb_bool via_pad_shape_set;
- double via_pad_sx;
- pcb_bool via_pad_sx_set;
- double via_pad_sy;
- pcb_bool via_pad_sy_set;
- double via_pad_angle;
- pcb_bool via_pad_angle_set;
- char *via_pad1_shape;
- pcb_bool via_pad1_shape_set;
- double via_pad1_sx;
- pcb_bool via_pad1_sx_set;
- double via_pad1_sy;
- pcb_bool via_pad1_sy_set;
- double via_pad1_angle;
- pcb_bool via_pad1_angle_set;
- char *via_pad2_shape;
- pcb_bool via_pad2_shape_set;
- double via_pad2_sx;
- pcb_bool via_pad2_sx_set;
- double via_pad2_sy;
- pcb_bool via_pad2_sy_set;
- double via_pad2_angle;
- pcb_bool via_pad2_angle_set;
-
- /* pin subrecord of net */
- char *pin_reference;
- pcb_bool pin_reference_set;
- pin_function_enum pin_function;
- pcb_bool pin_function_set;
-
- /* useg subrecord of net */
- char *zlayer_name;
- pcb_bool zlayer_name_set;
- double length;
- double impedance;
- pcb_bool impedance_set;
- double delay;
- double resistance;
- pcb_bool resistance_set;
-
- /* polygon subrecord of net */
- int id;
- pcb_bool id_set;
- polygon_type_enum polygon_type;
- pcb_bool polygon_type_set;
-
- /* net class record */
- char *net_class_name;
- char *net_name;
-
- /* key record */
- char *key;
-
- /* Attributes */
- char *name; /* attribute name */
- char *value; /* attribute value */
-
- /* point, line and arc coordinates */
- double x; /* coordinates point */
- double y; /* coordinates point */
- double x1; /* coordinates point 1 */
- double y1; /* coordinates point 1 */
- double x2; /* coordinates point 2 */
- double y2; /* coordinates point 2 */
- double xc; /* coordinates arc */
- double yc; /* coordinates arc */
- double r; /* coordinates arc */
-} parse_param;
-
- /* exec_* routines are called by parser to interpret hyperlynx file */
-pcb_bool exec_board_file(parse_param * h);
-pcb_bool exec_version(parse_param * h);
-pcb_bool exec_data_mode(parse_param * h);
-pcb_bool exec_units(parse_param * h);
-pcb_bool exec_plane_sep(parse_param * h);
-pcb_bool exec_perimeter_segment(parse_param * h);
-pcb_bool exec_perimeter_arc(parse_param * h);
-pcb_bool exec_board_attribute(parse_param * h);
-
-pcb_bool exec_options(parse_param * h);
-pcb_bool exec_signal(parse_param * h);
-pcb_bool exec_dielectric(parse_param * h);
-pcb_bool exec_plane(parse_param * h);
-
-pcb_bool exec_devices(parse_param * h);
-
-pcb_bool exec_supplies(parse_param * h);
-
-pcb_bool exec_padstack_element(parse_param * h);
-pcb_bool exec_padstack_end(parse_param * h);
-
-pcb_bool exec_net(parse_param * h);
-pcb_bool exec_net_plane_separation(parse_param * h);
-pcb_bool exec_net_attribute(parse_param * h);
-pcb_bool exec_seg(parse_param * h);
-pcb_bool exec_arc(parse_param * h);
-pcb_bool exec_via(parse_param * h);
-pcb_bool exec_via_v1(parse_param * h); /* Old style via format */
-pcb_bool exec_pin(parse_param * h);
-pcb_bool exec_pad(parse_param * h);
-pcb_bool exec_useg(parse_param * h);
-
-pcb_bool exec_polygon_begin(parse_param * h);
-pcb_bool exec_polygon_end(parse_param * h);
-pcb_bool exec_polyvoid_begin(parse_param * h);
-pcb_bool exec_polyvoid_end(parse_param * h);
-pcb_bool exec_polyline_begin(parse_param * h);
-pcb_bool exec_polyline_end(parse_param * h);
-pcb_bool exec_line(parse_param * h);
-pcb_bool exec_curve(parse_param * h);
-
-pcb_bool exec_net_class(parse_param * h);
-pcb_bool exec_net_class_element(parse_param * h);
-pcb_bool exec_net_class_attribute(parse_param * h);
-
-pcb_bool exec_end(parse_param * h);
-pcb_bool exec_key(parse_param * h);
-
- /* called by pcb-rnd to load hyperlynx file */
-pcb_bool hyp_parse(pcb_data_t * dest, const char *fname, int debug);
-void hyp_error(const char *msg);
-
- /* create arc, hyperlynx-style */
-pcb_arc_t *hyp_arc_new(pcb_layer_t * Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t XC,
- pcb_coord_t YC, pcb_coord_t Width, pcb_coord_t Height, pcb_bool_t Clockwise, pcb_coord_t Thickness,
- pcb_coord_t Clearance, pcb_flag_t Flags);
-
-#endif
-
- /* not truncated */
Index: src_plugins/import_hyp/hyp_l.l
===================================================================
--- src_plugins/import_hyp/hyp_l.l (revision 7963)
+++ src_plugins/import_hyp/hyp_l.l (nonexistent)
@@ -1,376 +0,0 @@
-
-/*
- * read hyperlynx files
- * Copyright 2012, 2016 Koen De Vleeschauwer.
- *
- * This file is part of pcb-rnd.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-%option noyywrap nodefault yylineno debug
-
-/* avoid collision with other scanners */
-%option prefix="hyy"
-
-%{
-#include
-
-char *pcb_strdup(const char *s); /* from #include "compat_misc.h" */
-
-#include "hyp_y.h"
-
-/* copy a string between quotes */
-char *strunquote(const char *);
-
-/* remember hyperlynx file section we're in */
-int section = -1;
-
-%}
-
- /*
- * The scanner knows five states: INITIAL, STATE_STRING, STATE_POSINT, STATE_FLOAT and STATE_COMMENT
- *
- * In state INITIAL the scanner recognizes:
- * - punctuation (such as {}()=, )
- * - keywords (such as VERSION, BOARD, NET),
- * - strings (both between double quotes " and unquoted),
- * - and floating point numbers (with optional suffix, eg. 10 uF),
- *
- * In STATE_STRING the scanner recognizes punctuation and strings only.
- * This avoids unquoted strings being interpreted as numbers, or keywords.
- *
- * In STATE_POSINT the scanner recognizes a positive integer.
- *
- * In STATE_FLOAT the scanner recognizes a floating point number (without suffix).
- *
- * In STATE_COMMENT the scanner discards all text up to the next
- * right brace } , and then continues in state INITIAL.
- *
- */
-
-%x STATE_STRING STATE_POSINT STATE_FLOAT STATE_COMMENT STATE_COMMENT_EOL
-
- /* whitespace: space, tab, vertical tab, form feed */
-WS [ \t\v\f]
-
- /* accept windows and unix newlines */
-NEWLINE [\r\n]+
-
- /*
- * lines with an asterisk in the first column are comments
- */
-COMMENT ^\*[^\n\r]*[\n\r]+
-
- /* Left-hand side of an assignment: check whether next token is equals sign */
-LHS [ \t\v\f]*"="
-
- /*
- * Positive integer
- */
-
-POSINT [0-9]+
-
- /*
- * Floating point numbers
- */
-
- /* ordinary floating point numbers */
-SIMPLE_FLOAT [-+]?([0-9]+"."[0-9]*|"."?[0-9]+)([Ee][-+]?[0-9]+)?
-
- /* floating point numbers with suffix, e,g. pF, nH */
-FLOAT_SUFFIX [A-Za-z]*{WS}+
-FLOAT_YOTTA {SIMPLE_FLOAT}{WS}*"Y"{FLOAT_SUFFIX}
-FLOAT_ZETA {SIMPLE_FLOAT}{WS}*"Z"{FLOAT_SUFFIX}
-FLOAT_EXA {SIMPLE_FLOAT}{WS}*"E"{FLOAT_SUFFIX}
-FLOAT_PETA {SIMPLE_FLOAT}{WS}*"P"{FLOAT_SUFFIX}
-FLOAT_TERA {SIMPLE_FLOAT}{WS}*"T"{FLOAT_SUFFIX}
-FLOAT_GIGA {SIMPLE_FLOAT}{WS}*"G"{FLOAT_SUFFIX}
-FLOAT_MEGA {SIMPLE_FLOAT}{WS}*"M"{FLOAT_SUFFIX}
-FLOAT_KILO {SIMPLE_FLOAT}{WS}*[Kk]{FLOAT_SUFFIX}
-FLOAT_MILLI {SIMPLE_FLOAT}{WS}*"m"{FLOAT_SUFFIX}
-FLOAT_MICRO {SIMPLE_FLOAT}{WS}*[uU]{FLOAT_SUFFIX}
-FLOAT_NANO {SIMPLE_FLOAT}{WS}*[nN]{FLOAT_SUFFIX}
-FLOAT_PICO {SIMPLE_FLOAT}{WS}*[pP]{FLOAT_SUFFIX}
-FLOAT_FEMTO {SIMPLE_FLOAT}{WS}*[fF]{FLOAT_SUFFIX}
-FLOAT_ATTO {SIMPLE_FLOAT}{WS}*"a"{FLOAT_SUFFIX}
-FLOAT_ZEPTO {SIMPLE_FLOAT}{WS}*"z"{FLOAT_SUFFIX}
-FLOAT_YOCTO {SIMPLE_FLOAT}{WS}*"y"{FLOAT_SUFFIX}
-
- /*
- * Strings
- */
-
- /* an unquoted string */
-STRING [^ \t\v\f\r\n\{\}\(\)=\"]+
-
- /* a string enclosed in double quotes " */
-QUOTED_STRING \"([^\"\n]|\"\")*\"
-
-%%
-
- /* When in STATE_COMMENT skip all comment until next right brace */
-{
-[^\}]* { BEGIN INITIAL; /* skip all comment until next right brace */ }
-}
-
- /* When in STATE_COMMENT_EOL skip all comment until end-of-line */
-{
-[^\r\n]*{NEWLINE}+ { BEGIN INITIAL; /* skip all comment until next end-of-line */ }
-}
-
-
- /* skip comments and whitespace */
-<*>{
-
- {COMMENT} { /* skip comments */ }
-
- {WS}+ { /* skip whitespace */ }
-
- {NEWLINE}+ { /* skip newlines */ }
-
-}
-
- /*
- * Hyperlynx keywords
- */
-
- /* Sections */
-
-"BOARD_FILE" {section = H_BOARD_FILE; return H_BOARD_FILE;}
-"VERSION" {section = H_VERSION; return H_VERSION;}
-"DATA_MODE" {section = H_DATA_MODE; return H_DATA_MODE;}
-"UNITS" {section = H_UNITS; return H_UNITS;}
-"PLANE_SEP" {section = H_PLANE_SEP; return H_PLANE_SEP;}
-"BOARD" {section = H_BOARD; BEGIN STATE_COMMENT_EOL; return H_BOARD;}
-"STACKUP" {section = H_STACKUP; BEGIN STATE_COMMENT_EOL; return H_STACKUP;}
-"DEVICES" {section = H_DEVICES; BEGIN STATE_COMMENT_EOL; return H_DEVICES;}
-"SUPPLIES" {section = H_SUPPLIES; BEGIN STATE_COMMENT_EOL; return H_SUPPLIES;}
-"PADSTACK" {section = H_PADSTACK; BEGIN STATE_STRING; return H_PADSTACK;}
-"NET" {section = H_NET; BEGIN STATE_STRING; return H_NET;}
-"NET_CLASS" {section = H_NET_CLASS; return H_NET_CLASS;}
-"END" {section = H_END; return H_END;}
-"KEY" {section = H_KEY; return H_KEY;}
-
- /* Keywords */
-
-"A" {return H_A;}
-"ARC" {return H_ARC;}
-"COPPER" {return H_COPPER;}
-"CURVE" {return H_CURVE;}
-"DETAILED" {if (section == H_DATA_MODE) BEGIN STATE_COMMENT; return H_DETAILED;}
-"DIELECTRIC" {return H_DIELECTRIC;}
-"ENGLISH" {return H_ENGLISH;}
-"LENGTH" {if (section == H_UNITS) BEGIN STATE_COMMENT; return H_LENGTH;}
-"LINE" {return H_LINE;}
-"METRIC" {return H_METRIC;}
-"M" {return H_M;}
-"N" {return H_N;}
-"OPTIONS" {return H_OPTIONS;}
-"PAD" {return H_PAD;}
-"PERIMETER_ARC" {return H_PERIMETER_ARC;}
-"PERIMETER_SEGMENT" {return H_PERIMETER_SEGMENT;}
-"PIN" {return H_PIN;}
-"PLANE" {return H_PLANE;}
-"POLYGON" {return H_POLYGON;}
-"POLYLINE" {return H_POLYLINE;}
-"POLYVOID" {return H_POLYVOID;}
-"POUR" {return H_POUR;}
-"S" {return H_S;}
-"T" {return H_T;}
-"SEG" {return H_SEG;}
-"SIGNAL" {return H_SIGNAL;}
-"SIMPLIFIED" {if (section == H_DATA_MODE) BEGIN STATE_COMMENT; return H_SIMPLIFIED; }
-"SIM_BOTH" {return H_SIM_BOTH;}
-"SIM_IN" {return H_SIM_IN;}
-"SIM_OUT" {return H_SIM_OUT;}
-"USEG" {return H_USEG;}
-"VIA" {return H_VIA;}
-"WEIGHT" {if (section == H_UNITS) BEGIN STATE_COMMENT; return H_WEIGHT;}
-
- /* Assignments */
-
-"A"/{LHS} {return H_A;}
-"A1"/{LHS} {return H_A1;}
-"A2"/{LHS} {return H_A2;}
-"BR"/{LHS} {return H_BR;}
-"C"/{LHS} {return H_C;}
-"C?"/{LHS} {return H_C_QM;}
-"CO?"/{LHS} {return H_CO_QM;}
-"D"/{LHS} {return H_D;}
-"ER"/{LHS} {return H_ER;}
-"F"/{LHS} {return H_F;}
-"ID"/{LHS} {BEGIN STATE_POSINT; return H_ID;}
-"L"/{LHS} {BEGIN STATE_STRING; return H_L;}
-"L1"/{LHS} {BEGIN STATE_STRING; return H_L1;}
-"L2"/{LHS} {BEGIN STATE_STRING; return H_L2;}
-"LPS"/{LHS} {return H_LPS;}
-"LT"/{LHS} {return H_LT;}
-"M"/{LHS} {BEGIN STATE_STRING; return H_M;}
-"N"/{LHS} {BEGIN STATE_STRING; return H_N;}
-"NAME"/{LHS} {BEGIN STATE_STRING; return H_NAME;}
- /* P is used as "plating thickness" in "stackup/signal" and as "padstack" in "net/via" */
-"P"/{LHS} {if (section == H_NET) BEGIN STATE_STRING; return H_P;}
-"PKG"/{LHS} {BEGIN STATE_STRING; return H_PKG;}
-"PR?"/{LHS} {return H_PR_QM;}
-"PS"/{LHS} {return H_PS;}
-"R"/{LHS} {return H_R;}
-"REF"/{LHS} {BEGIN STATE_STRING; return H_REF;}
-"S"/{LHS} {BEGIN STATE_STRING; return H_S;}
-"SX"/{LHS} {return H_SX;}
-"SY"/{LHS} {return H_SY;}
-"S1"/{LHS} {BEGIN STATE_STRING; return H_S1;}
-"S1X"/{LHS} {return H_S1X;}
-"S1Y"/{LHS} {return H_S1Y;}
-"S2"/{LHS} {BEGIN STATE_STRING; return H_S2;}
-"S2X"/{LHS} {return H_S2X;}
-"S2Y"/{LHS} {return H_S2Y;}
-"T"/{LHS} {return H_T;}
-"TC"/{LHS} {return H_TC;}
-"USE_DIE_FOR_METAL"/{LHS} {return H_USE_DIE_FOR_METAL;}
-"V"/{LHS} {BEGIN STATE_STRING; return H_V;}
-"V?"/{LHS} {return H_V_QM;}
-"VAL"/{LHS} {return H_VAL;}
-"W"/{LHS} {return H_W;}
-"X"/{LHS} {return H_X;}
-"X1"/{LHS} {return H_X1;}
-"X2"/{LHS} {return H_X2;}
-"XC"/{LHS} {return H_XC;}
-"Y"/{LHS} {return H_Y;}
-"Y1"/{LHS} {return H_Y1;}
-"Y2"/{LHS} {return H_Y2;}
-"YC"/{LHS} {return H_YC;}
-"Z"/{LHS} {return H_Z;}
-"ZL"/{LHS} {return H_ZL;}
-"ZLEN"/{LHS} {return H_ZLEN;}
-"ZW"/{LHS} {return H_ZW;}
-
- /* Booleans */
-
-"YES"|"yes" {hyylval.boolval = 1; return H_BOOL; }
-"NO"|"no" {hyylval.boolval = 0; return H_BOOL; }
-
- /* Floats */
-
- /* ordinary floating point numbers */
-{SIMPLE_FLOAT} {hyylval.floatval = strtod(hyytext, NULL); return H_FLOAT;}
-
- /* floating point numbers with suffix, e,g. pF, nH */
-{FLOAT_YOTTA} {hyylval.floatval = strtod(hyytext, NULL) * 1e24; return H_FLOAT;}
-{FLOAT_ZETA} {hyylval.floatval = strtod(hyytext, NULL) * 1e21; return H_FLOAT;}
-{FLOAT_EXA} {hyylval.floatval = strtod(hyytext, NULL) * 1e18; return H_FLOAT;}
-{FLOAT_PETA} {hyylval.floatval = strtod(hyytext, NULL) * 1e15; return H_FLOAT;}
-{FLOAT_TERA} {hyylval.floatval = strtod(hyytext, NULL) * 1e12; return H_FLOAT;}
-{FLOAT_GIGA} {hyylval.floatval = strtod(hyytext, NULL) * 1e9; return H_FLOAT;}
-{FLOAT_MEGA} {hyylval.floatval = strtod(hyytext, NULL) * 1e6; return H_FLOAT;}
-{FLOAT_KILO} {hyylval.floatval = strtod(hyytext, NULL) * 1e3; return H_FLOAT;}
-{FLOAT_MILLI} {hyylval.floatval = strtod(hyytext, NULL) * 1e-3; return H_FLOAT;}
-{FLOAT_MICRO} {hyylval.floatval = strtod(hyytext, NULL) * 1e-6; return H_FLOAT;}
-{FLOAT_NANO} {hyylval.floatval = strtod(hyytext, NULL) * 1e-9; return H_FLOAT;}
-{FLOAT_PICO} {hyylval.floatval = strtod(hyytext, NULL) * 1e-12; return H_FLOAT;}
-{FLOAT_FEMTO} {hyylval.floatval = strtod(hyytext, NULL) * 1e-15; return H_FLOAT;}
-{FLOAT_ATTO} {hyylval.floatval = strtod(hyytext, NULL) * 1e-18; return H_FLOAT;}
-{FLOAT_ZEPTO} {hyylval.floatval = strtod(hyytext, NULL) * 1e-21; return H_FLOAT;}
-{FLOAT_YOCTO} {hyylval.floatval = strtod(hyytext, NULL) * 1e-24; return H_FLOAT;}
-
- /* floating point numbers in VERSION and PLANE_SEP have no suffix and are followed by optional comments */
-{
-{SIMPLE_FLOAT} {hyylval.floatval = strtod(hyytext, NULL); BEGIN STATE_COMMENT; return H_FLOAT;}
-}
-
- /* A positive integer is used only in polygon/polyline/polyvoid "ID = posint" */
-{
-{POSINT} { BEGIN INITIAL; hyylval.intval = atoi(hyytext); return H_POSINT; }
-}
-
-
- /*
- * This is a workaround for syntactically incorrect .hyp files.
- * We accept the following constructs as representing an empty string:
- * NAME= L1=somelayer
- * NAME= )
- * NAME= }
- */
-{
-([A-Z][A-Z1-2_]*{WS}*"="|")"|"}") { yyless(0); BEGIN INITIAL; hyylval.strval = pcb_strdup(""); return H_STRING; } /* emit empty string and reprocess */
-}
-
-<*>{
-
- "{" {return '{';}
-
- "}" {BEGIN STATE_COMMENT_EOL; return '}';}
-
- "(" {if (section == H_PADSTACK) BEGIN STATE_STRING; return '(';}
-
- /* allow for comment after the closing bracket ) */
- ")" {BEGIN STATE_COMMENT_EOL; return ')';}
-
- "," {return ',';}
-
- "=" {if ((section == H_VERSION) || (section == H_PLANE_SEP)) BEGIN STATE_FLOAT; return '=';}
-
- /* string */
- {STRING} {
- /*
- * Commas are not allowed in strings in the padstack section
- * unless the string is enclosed in double quotes (").
- */
-
- if ((section == H_PADSTACK) && strchr(hyytext, ','))
- REJECT
- else
- {
- BEGIN INITIAL;
- hyylval.strval = pcb_strdup(hyytext);
- return H_STRING;
- }
- }
-
- /* string in double quotes */
- {QUOTED_STRING} {BEGIN INITIAL; hyylval.strval = strunquote(hyytext); return H_STRING;}
-
- <> {yyterminate();}
-
- /* have bison catch all unrecognized characters with parse errors */
- . {return hyytext[0];}
-
-}
-
-%%
-
- /*
- * copy a quoted string.
- * e.g. "data 0" -> data 0
- * a double quote inside the string can be escaped by writing two consecutive double quotes
- * e.g. "net ""hi""" -> net "hi"
- */
-
- char *strunquote(const char *src)
- {
- char* dst;
- size_t len = strlen(src) + 1;
- dst = (char *)malloc(len);
- if (dst != NULL)
- {
- char* p = (char *)src + 1; /* first char after initial quote */
- char* q = dst;
- do
- if (*p == '"') p++;
- while ((*q++ = *p++) != '\0');
- }
- return dst;
- }
-
- /* not truncated */
Index: src_plugins/import_hyp/Plug.tmpasm
===================================================================
--- src_plugins/import_hyp/Plug.tmpasm (revision 7963)
+++ src_plugins/import_hyp/Plug.tmpasm (nonexistent)
@@ -1,18 +0,0 @@
-put /local/pcb/mod {import_hyp}
-
-append /local/pcb/mod/OBJS [@
- $(PLUGDIR)/import_hyp/import_hyp.o
- $(PLUGDIR)/import_hyp/hyp_l.o
- $(PLUGDIR)/import_hyp/hyp_y.o
- $(PLUGDIR)/import_hyp/parser.o
-@]
-
-put /local/pcb/mod/YACC {$(PLUGDIR)/import_hyp/hyp_y}
-put /local/pcb/mod/LEX {$(PLUGDIR)/import_hyp/hyp_l}
-
-
-switch /local/pcb/import_hyp/controls
- case {buildin} include /local/pcb/tmpasm/buildin; end;
- case {plugin} include /local/pcb/tmpasm/plugin; end;
- case {disable} include /local/pcb/tmpasm/disable; end;
-end
Index: src_plugins/import_hyp/hyp_y.c
===================================================================
--- src_plugins/import_hyp/hyp_y.c (revision 7963)
+++ src_plugins/import_hyp/hyp_y.c (nonexistent)
@@ -1,3182 +0,0 @@
-/* A Bison parser, made by GNU Bison 3.0.4. */
-
-/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see . */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
- simplifying the original so-called "semantic" parser. */
-
-/* All symbols defined below should begin with yy or YY, to avoid
- infringing on user name space. This should be done even for local
- variables, as they might otherwise be expanded by user macros.
- There are some unavoidable exceptions within include files to
- define necessary library symbols; they are noted "INFRINGES ON
- USER NAME SPACE" below. */
-
-/* Identify Bison output. */
-#define YYBISON 1
-
-/* Bison version. */
-#define YYBISON_VERSION "3.0.4"
-
-/* Skeleton name. */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers. */
-#define YYPURE 0
-
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
-
-/* Substitute the type names. */
-#define YYSTYPE HYYSTYPE
-/* Substitute the variable and function names. */
-#define yyparse hyyparse
-#define yylex hyylex
-#define yyerror hyyerror
-#define yydebug hyydebug
-#define yynerrs hyynerrs
-
-#define yylval hyylval
-#define yychar hyychar
-
-/* Copy the first part of user declarations. */
-
-#line 76 "hyp_y.c" /* yacc.c:339 */
-
-# ifndef YY_NULLPTR
-# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULLPTR nullptr
-# else
-# define YY_NULLPTR 0
-# endif
-# endif
-
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 1
-#endif
-
-/* In a future release of Bison, this section will be replaced
- by #include "hyp_y.h". */
-#ifndef YY_HYY_HYP_Y_H_INCLUDED
-# define YY_HYY_HYP_Y_H_INCLUDED
-/* Debug traces. */
-#ifndef HYYDEBUG
-# if defined YYDEBUG
-#if YYDEBUG
-# define HYYDEBUG 1
-# else
-# define HYYDEBUG 0
-# endif
-# else /* ! defined YYDEBUG */
-# define HYYDEBUG 1
-# endif /* ! defined YYDEBUG */
-#endif /* ! defined HYYDEBUG */
-#if HYYDEBUG
-extern int hyydebug;
-#endif
-/* "%code requires" blocks. */
-#line 21 "hyp_y.y" /* yacc.c:355 */
-
-#include "parser.h"
-
-#line 118 "hyp_y.c" /* yacc.c:355 */
-
-/* Token type. */
-#ifndef HYYTOKENTYPE
-# define HYYTOKENTYPE
- enum hyytokentype
- {
- H_BOARD_FILE = 258,
- H_VERSION = 259,
- H_DATA_MODE = 260,
- H_UNITS = 261,
- H_PLANE_SEP = 262,
- H_BOARD = 263,
- H_STACKUP = 264,
- H_DEVICES = 265,
- H_SUPPLIES = 266,
- H_PAD = 267,
- H_PADSTACK = 268,
- H_NET = 269,
- H_NET_CLASS = 270,
- H_END = 271,
- H_KEY = 272,
- H_A = 273,
- H_ARC = 274,
- H_COPPER = 275,
- H_CURVE = 276,
- H_DETAILED = 277,
- H_DIELECTRIC = 278,
- H_ENGLISH = 279,
- H_LENGTH = 280,
- H_LINE = 281,
- H_METRIC = 282,
- H_N = 283,
- H_OPTIONS = 284,
- H_PERIMETER_ARC = 285,
- H_PERIMETER_SEGMENT = 286,
- H_PIN = 287,
- H_PLANE = 288,
- H_POLYGON = 289,
- H_POLYLINE = 290,
- H_POLYVOID = 291,
- H_POUR = 292,
- H_S = 293,
- H_SEG = 294,
- H_SIGNAL = 295,
- H_SIMPLIFIED = 296,
- H_SIM_BOTH = 297,
- H_SIM_IN = 298,
- H_SIM_OUT = 299,
- H_USEG = 300,
- H_VIA = 301,
- H_WEIGHT = 302,
- H_A1 = 303,
- H_A2 = 304,
- H_BR = 305,
- H_C = 306,
- H_C_QM = 307,
- H_CO_QM = 308,
- H_D = 309,
- H_ER = 310,
- H_F = 311,
- H_ID = 312,
- H_L = 313,
- H_L1 = 314,
- H_L2 = 315,
- H_LPS = 316,
- H_LT = 317,
- H_M = 318,
- H_NAME = 319,
- H_P = 320,
- H_PKG = 321,
- H_PR_QM = 322,
- H_PS = 323,
- H_R = 324,
- H_REF = 325,
- H_SX = 326,
- H_SY = 327,
- H_S1 = 328,
- H_S1X = 329,
- H_S1Y = 330,
- H_S2 = 331,
- H_S2X = 332,
- H_S2Y = 333,
- H_T = 334,
- H_TC = 335,
- H_USE_DIE_FOR_METAL = 336,
- H_V = 337,
- H_V_QM = 338,
- H_VAL = 339,
- H_W = 340,
- H_X = 341,
- H_X1 = 342,
- H_X2 = 343,
- H_XC = 344,
- H_Y = 345,
- H_Y1 = 346,
- H_Y2 = 347,
- H_YC = 348,
- H_Z = 349,
- H_ZL = 350,
- H_ZLEN = 351,
- H_ZW = 352,
- H_YES = 353,
- H_NO = 354,
- H_BOOL = 355,
- H_POSINT = 356,
- H_FLOAT = 357,
- H_STRING = 358
- };
-#endif
-
-/* Value type. */
-#if ! defined HYYSTYPE && ! defined HYYSTYPE_IS_DECLARED
-
-union HYYSTYPE
-{
-#line 30 "hyp_y.y" /* yacc.c:355 */
-
- int boolval;
- int intval;
- double floatval;
- char* strval;
-
-#line 241 "hyp_y.c" /* yacc.c:355 */
-};
-
-typedef union HYYSTYPE HYYSTYPE;
-# define HYYSTYPE_IS_TRIVIAL 1
-# define HYYSTYPE_IS_DECLARED 1
-#endif
-
-
-extern HYYSTYPE hyylval;
-
-int hyyparse (void);
-
-#endif /* !YY_HYY_HYP_Y_H_INCLUDED */
-
-/* Copy the second part of user declarations. */
-#line 37 "hyp_y.y" /* yacc.c:358 */
-
-#include
-#include
-#include
-#include
-
-void hyyerror(const char *);
-
-/* HYYPRINT and hyyprint print values of the tokens when debugging is switched on */
-void hyyprint(FILE *, int, HYYSTYPE);
-#define HYYPRINT(file, type, value) hyyprint (file, type, value)
-
-/* clear parse_param struct at beginning of new record */
-void new_record();
-
-/* struct to pass to calling class */
-parse_param h;
-
-
-#line 277 "hyp_y.c" /* yacc.c:358 */
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#else
-typedef signed char yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-# define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T
-# include /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# else
-# define YYSIZE_T unsigned int
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
-# if ENABLE_NLS
-# include /* INFRINGES ON USER NAME SPACE */
-# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
-# endif
-# endif
-# ifndef YY_
-# define YY_(Msgid) Msgid
-# endif
-#endif
-
-#ifndef YY_ATTRIBUTE
-# if (defined __GNUC__ \
- && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
- || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
-# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
-# else
-# define YY_ATTRIBUTE(Spec) /* empty */
-# endif
-#endif
-
-#ifndef YY_ATTRIBUTE_PURE
-# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
-#endif
-
-#ifndef YY_ATTRIBUTE_UNUSED
-# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
-#endif
-
-#if !defined _Noreturn \
- && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
-# if defined _MSC_VER && 1200 <= _MSC_VER
-# define _Noreturn __declspec (noreturn)
-# else
-# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E. */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(E) ((void) (E))
-#else
-# define YYUSE(E) /* empty */
-#endif
-
-#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
-/* Suppress an incorrect diagnostic about yylval being uninitialized. */
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
- _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
- _Pragma ("GCC diagnostic pop")
-#else
-# define YY_INITIAL_VALUE(Value) Value
-#endif
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols. */
-
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
-# elif defined __BUILTIN_VA_ARG_INCR
-# include /* INFRINGES ON USER NAME SPACE */
-# elif defined _AIX
-# define YYSTACK_ALLOC __alloca
-# elif defined _MSC_VER
-# include /* INFRINGES ON USER NAME SPACE */
-# define alloca _alloca
-# else
-# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
-# include /* INFRINGES ON USER NAME SPACE */
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# endif
-# endif
-# endif
-
-# ifdef YYSTACK_ALLOC
- /* Pacify GCC's 'empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-# ifndef YYSTACK_ALLOC_MAXIMUM
- /* The OS might guarantee only one guard page at the bottom of the stack,
- and a page size can be as small as 4096 bytes. So we cannot safely
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
- to allow for a few compiler-allocated temporary stack slots. */
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-# endif
-# else
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
-# ifndef YYSTACK_ALLOC_MAXIMUM
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-# endif
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \
- && ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
-# include /* INFRINGES ON USER NAME SPACE */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# ifndef YYFREE
-# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
- && (! defined __cplusplus \
- || (defined HYYSTYPE_IS_TRIVIAL && HYYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member. */
-union yyalloc
-{
- yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
-};
-
-/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
- N elements. */
-# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
- + YYSTACK_GAP_MAXIMUM)
-
-# define YYCOPY_NEEDED 1
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (0)
-
-#endif
-
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from SRC to DST. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
-# else
-# define YYCOPY(Dst, Src, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (Dst)[yyi] = (Src)[yyi]; \
- } \
- while (0)
-# endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 34
-/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 761
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 110
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 179
-/* YYNRULES -- Number of rules. */
-#define YYNRULES 310
-/* YYNSTATES -- Number of states. */
-#define YYNSTATES 619
-
-/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
- by yylex, with out-of-bounds checking. */
-#define YYUNDEFTOK 2
-#define YYMAXUTOK 358
-
-#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex, without out-of-bounds checking. */
-static const yytype_uint8 yytranslate[] =
-{
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 107, 108, 2, 2, 109, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 106, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 105, 2, 104, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
- 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
- 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
- 95, 96, 97, 98, 99, 100, 101, 102, 103
-};
-
-#if HYYDEBUG
- /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
-static const yytype_uint16 yyrline[] =
-{
- 0, 127, 127, 128, 131, 132, 133, 134, 135, 136,
- 137, 138, 139, 140, 141, 142, 143, 144, 145, 150,
- 150, 155, 155, 160, 163, 164, 169, 172, 173, 176,
- 177, 181, 181, 186, 187, 190, 191, 194, 195, 196,
- 200, 201, 202, 205, 208, 211, 211, 211, 216, 219,
- 220, 223, 224, 225, 226, 227, 230, 233, 233, 234,
- 238, 238, 241, 242, 245, 246, 247, 248, 249, 250,
- 251, 252, 253, 254, 257, 257, 260, 261, 264, 265,
- 266, 267, 268, 269, 270, 271, 275, 275, 278, 279,
- 282, 283, 284, 285, 286, 287, 288, 289, 290, 293,
- 296, 299, 302, 305, 308, 311, 314, 317, 320, 323,
- 328, 329, 332, 333, 336, 336, 336, 336, 337, 340,
- 341, 345, 346, 350, 351, 355, 358, 359, 363, 366,
- 369, 374, 377, 378, 381, 382, 385, 388, 393, 393,
- 393, 396, 396, 397, 398, 401, 402, 405, 405, 406,
- 409, 409, 410, 414, 414, 414, 417, 418, 419, 420,
- 421, 422, 423, 420, 430, 430, 433, 433, 434, 437,
- 438, 438, 442, 443, 446, 447, 448, 449, 450, 451,
- 452, 453, 454, 455, 456, 457, 461, 461, 464, 464,
- 467, 468, 472, 473, 477, 480, 483, 483, 487, 488,
- 492, 494, 495, 496, 497, 498, 499, 500, 501, 502,
- 503, 504, 505, 506, 507, 508, 512, 515, 518, 521,
- 521, 524, 525, 529, 530, 534, 537, 538, 539, 540,
- 544, 544, 547, 548, 552, 553, 554, 555, 556, 560,
- 560, 563, 564, 568, 569, 570, 568, 575, 576, 575,
- 580, 580, 582, 586, 586, 586, 590, 591, 595, 596,
- 597, 598, 602, 606, 607, 608, 612, 612, 612, 616,
- 616, 616, 620, 621, 625, 626, 627, 631, 631, 634,
- 634, 637, 637, 637, 642, 642, 645, 646, 650, 651,
- 655, 656, 657, 661, 661, 664, 664, 664, 669, 674,
- 674, 679, 679, 682, 682, 685, 685, 688, 691, 691,
- 691
-};
-#endif
-
-#if HYYDEBUG || YYERROR_VERBOSE || 1
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
- "$end", "error", "$undefined", "H_BOARD_FILE", "H_VERSION",
- "H_DATA_MODE", "H_UNITS", "H_PLANE_SEP", "H_BOARD", "H_STACKUP",
- "H_DEVICES", "H_SUPPLIES", "H_PAD", "H_PADSTACK", "H_NET", "H_NET_CLASS",
- "H_END", "H_KEY", "H_A", "H_ARC", "H_COPPER", "H_CURVE", "H_DETAILED",
- "H_DIELECTRIC", "H_ENGLISH", "H_LENGTH", "H_LINE", "H_METRIC", "H_N",
- "H_OPTIONS", "H_PERIMETER_ARC", "H_PERIMETER_SEGMENT", "H_PIN",
- "H_PLANE", "H_POLYGON", "H_POLYLINE", "H_POLYVOID", "H_POUR", "H_S",
- "H_SEG", "H_SIGNAL", "H_SIMPLIFIED", "H_SIM_BOTH", "H_SIM_IN",
- "H_SIM_OUT", "H_USEG", "H_VIA", "H_WEIGHT", "H_A1", "H_A2", "H_BR",
- "H_C", "H_C_QM", "H_CO_QM", "H_D", "H_ER", "H_F", "H_ID", "H_L", "H_L1",
- "H_L2", "H_LPS", "H_LT", "H_M", "H_NAME", "H_P", "H_PKG", "H_PR_QM",
- "H_PS", "H_R", "H_REF", "H_SX", "H_SY", "H_S1", "H_S1X", "H_S1Y", "H_S2",
- "H_S2X", "H_S2Y", "H_T", "H_TC", "H_USE_DIE_FOR_METAL", "H_V", "H_V_QM",
- "H_VAL", "H_W", "H_X", "H_X1", "H_X2", "H_XC", "H_Y", "H_Y1", "H_Y2",
- "H_YC", "H_Z", "H_ZL", "H_ZLEN", "H_ZW", "H_YES", "H_NO", "H_BOOL",
- "H_POSINT", "H_FLOAT", "H_STRING", "'}'", "'{'", "'='", "'('", "')'",
- "','", "$accept", "hyp_file", "hyp_section", "board_file", "$@1",
- "version", "$@2", "data_mode", "mode", "units", "unit_system",
- "metal_thickness_unit", "plane_sep", "$@3", "board", "board_param_list",
- "board_param_list_item", "board_param", "perimeter_segment",
- "perimeter_arc", "board_attribute", "$@4", "$@5", "stackup",
- "stackup_paramlist", "stackup_param", "options", "options_params", "$@6",
- "signal", "$@7", "signal_paramlist", "signal_param", "dielectric", "$@8",
- "dielectric_paramlist", "dielectric_param", "plane", "$@9",
- "plane_paramlist", "plane_param", "thickness", "plating_thickness",
- "bulk_resistivity", "temperature_coefficient", "epsilon_r",
- "loss_tangent", "layer_name", "material_name", "plane_separation",
- "conformal", "prepreg", "devices", "device_list", "device", "$@10",
- "$@11", "$@12", "device_paramlist", "device_value", "device_layer",
- "name", "value", "value_float", "value_string", "package", "supplies",
- "supply_list", "supply", "voltage_spec", "conversion", "padstack",
- "$@13", "$@14", "drill_size", "$@15", "padstack_list", "padstack_def",
- "$@16", "pad_shape", "$@17", "pad_coord", "$@18", "$@19", "pad_type",
- "$@20", "$@21", "$@22", "$@23", "net", "$@24", "net_separation", "$@25",
- "net_copper", "$@26", "net_subrecord_list", "net_subrecord", "seg",
- "$@27", "arc", "$@28", "ps_lps_param", "lps_param", "width",
- "left_plane_separation", "via", "$@29", "via_param_list", "via_param",
- "padstack_name", "layer1_name", "layer2_name", "pin", "$@30",
- "pin_param", "pin_function_param", "pin_reference", "pin_function",
- "pad", "$@31", "pad_param_list", "pad_param", "useg", "$@32",
- "useg_param", "useg_stackup", "$@33", "$@34", "$@35", "useg_impedance",
- "$@36", "$@37", "useg_resistance", "$@38", "polygon", "$@39", "$@40",
- "polygon_param_list", "polygon_param", "polygon_id", "polygon_type",
- "polyvoid", "$@41", "$@42", "polyline", "$@43", "$@44",
- "lines_and_curves", "line_or_curve", "line", "$@45", "curve", "$@46",
- "net_attribute", "$@47", "$@48", "netclass", "$@49",
- "netclass_subrecords", "netclass_paramlist", "netclass_param",
- "net_name", "$@50", "netclass_attribute", "$@51", "$@52", "end", "key",
- "$@53", "coord_point", "$@54", "coord_point1", "$@55", "coord_point2",
- "$@56", "coord_line", "coord_arc", "$@57", "$@58", YY_NULLPTR
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[NUM] -- (External) token number corresponding to the
- (internal) symbol number NUM (which must be that of a token). */
-static const yytype_uint16 yytoknum[] =
-{
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
- 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
- 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
- 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
- 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
- 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
- 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
- 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
- 355, 356, 357, 358, 125, 123, 61, 40, 41, 44
-};
-# endif
-
-#define YYPACT_NINF -310
-
-#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-310)))
-
-#define YYTABLE_NINF -115
-
-#define yytable_value_is_error(Yytable_value) \
- 0
-
- /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-static const yytype_int16 yypact[] =
-{
- 13, -5, 319, 10, -310, -310, -310, -310, -310, -310,
- -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
- -310, -82, 0, 20, 26, 7, 49, -60, 53, -310,
- 72, 93, 117, 132, -310, -310, 151, 143, 83, 114,
- 162, 167, -310, 188, 12, -310, 175, 124, -310, -310,
- -310, -310, -310, -310, 14, 128, -310, 30, 129, -310,
- 164, 178, 183, -310, 185, -310, -310, -310, -310, 191,
- -310, -310, 8, -310, -310, 272, 219, 219, 199, -310,
- -310, -310, -310, -310, 200, -310, -22, -310, -310, -310,
- -310, 201, 207, -310, -310, 204, 247, -310, -310, 211,
- -310, -310, -310, 212, -310, -310, -310, 213, 214, 225,
- 231, 232, 230, -310, -310, -310, -310, 236, 233, -310,
- -310, 222, 203, -310, -310, -310, 234, 254, -310, -3,
- 139, 237, -310, -310, -310, 239, 241, 238, -310, 240,
- 242, 243, 244, 245, 246, 248, 249, 250, 126, -310,
- -310, -310, -310, -310, -310, -310, -310, 253, 251, 252,
- 255, 256, 112, -310, -310, -310, -310, -310, -310, -310,
- -310, -310, 257, 258, 103, -310, -310, -310, -310, -310,
- -310, -310, -310, -310, -310, 275, 262, 260, 264, 160,
- 206, 184, -310, -310, -310, 263, 120, -310, -310, -310,
- -310, -310, -310, -310, -310, -310, -310, -310, -310, 141,
- -310, 140, -310, -310, -310, -310, -310, -310, 266, 267,
- 268, 259, 269, 270, 273, 271, 276, 277, -310, -310,
- -310, 278, 279, 280, 281, -310, -310, 282, 283, -310,
- -310, 284, -310, 285, 286, 308, 17, 88, 274, 265,
- -310, 287, -310, -310, -310, 288, -310, 349, -310, -310,
- -310, -310, -310, 105, -310, -310, -310, 289, 358, 360,
- -310, -310, 307, 302, -310, -310, -310, -310, -310, -310,
- -310, -310, -310, -310, 290, -310, -310, -310, -310, -310,
- -310, 291, -310, 295, 293, 292, 294, -310, -310, 265,
- -310, -310, -310, 51, 51, 344, -310, 317, 298, 219,
- 317, 219, 219, 317, -310, -310, 299, 300, 301, 303,
- 316, 318, -310, -310, -310, 310, -310, -310, 304, 265,
- 306, 309, 311, -310, -310, 115, -310, -310, -310, 115,
- 317, 312, 25, 313, 329, 350, 329, 361, 74, 320,
- 321, 322, 324, 315, 323, 71, -310, 55, 265, 326,
- 107, 328, -310, -310, -310, -310, 330, 325, 327, 331,
- 332, -310, -1, -310, -310, 364, 333, -20, 364, 334,
- 232, 335, 336, 337, 338, 339, 340, 341, 342, 343,
- 345, 346, 347, 348, 351, 352, 2, -310, -310, -310,
- -310, -310, -310, -310, -310, 353, 354, 355, 362, 356,
- -310, -310, 37, 364, -310, -310, -310, -310, 357, -310,
- -310, -310, -310, -310, 359, 359, 359, -310, 363, 365,
- 367, 368, -310, -310, 378, -8, 369, 370, -310, -15,
- -310, -310, 366, -8, 372, 374, 371, 375, 377, 379,
- 380, 381, 382, 384, 385, 386, 388, 389, 390, 392,
- 393, -310, -310, 395, 391, -310, -310, -310, 84, 394,
- -310, -310, -310, -310, 383, -310, 170, 196, 144, -310,
- -310, -310, 145, 156, 373, -310, -310, -310, -310, 396,
- 397, -310, -36, -310, -310, 398, -310, -21, -310, -310,
- -310, -310, 198, -310, -310, -310, -310, -310, -310, -310,
- -310, -310, -310, -310, -310, -310, -310, -310, 399, -310,
- 402, -310, 401, -310, 387, -310, 1, -310, 400, -310,
- -310, -310, -310, -310, -310, 403, 404, 408, -310, -310,
- -310, -310, -310, -310, 405, 406, -310, -310, -310, 410,
- 409, -310, 412, 411, 413, -310, -310, 219, 317, 414,
- -310, -310, 415, 417, -310, 416, -310, -310, -310, 418,
- 420, 421, -310, 422, -310, -310, 423, -310, 424, 430,
- -310, -310, -310, 426, 425, -310, 432, -310, 419, 429,
- -310, 427, 435, 436, 437, -310, -310, -310, -42, 428,
- 431, 438, -310, -310, 439, 440, 441, 444, -310, -310,
- -310, 442, 433, 445, 447, -310, -310, 446, -310
-};
-
- /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE does not specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint16 yydefact[] =
-{
- 0, 0, 0, 0, 3, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 0, 0, 0, 0, 0, 0, 0, 0, 138,
- 0, 0, 0, 0, 1, 2, 0, 0, 0, 0,
- 0, 0, 34, 0, 0, 36, 0, 0, 50, 51,
- 52, 53, 54, 111, 0, 0, 113, 0, 0, 133,
- 0, 0, 0, 298, 0, 20, 21, 25, 24, 0,
- 27, 28, 0, 31, 39, 0, 0, 0, 38, 40,
- 41, 42, 33, 35, 0, 74, 0, 86, 60, 48,
- 49, 0, 0, 110, 112, 0, 0, 131, 132, 0,
- 164, 284, 299, 0, 23, 30, 29, 0, 0, 0,
- 0, 0, 0, 44, 43, 37, 55, 0, 0, 59,
- 56, 0, 0, 118, 115, 135, 0, 0, 139, 170,
- 0, 0, 22, 26, 32, 0, 0, 0, 307, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
- 78, 80, 81, 84, 85, 82, 83, 0, 0, 0,
- 0, 0, 0, 89, 90, 92, 93, 94, 95, 96,
- 97, 98, 0, 0, 0, 63, 64, 65, 67, 68,
- 69, 70, 71, 72, 73, 0, 0, 0, 0, 0,
- 0, 0, 166, 165, 168, 0, 0, 173, 174, 175,
- 176, 177, 178, 179, 180, 181, 182, 183, 287, 0,
- 285, 0, 289, 291, 290, 300, 45, 303, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 75, 76,
- 57, 0, 0, 0, 0, 87, 88, 0, 0, 61,
- 62, 0, 125, 0, 0, 0, 0, 0, 0, 144,
- 146, 0, 253, 269, 266, 0, 230, 0, 188, 219,
- 186, 239, 196, 170, 171, 169, 172, 0, 0, 0,
- 286, 288, 0, 0, 305, 308, 79, 108, 103, 105,
- 104, 106, 109, 99, 0, 101, 91, 107, 102, 66,
- 100, 0, 128, 0, 0, 0, 0, 147, 141, 143,
- 140, 145, 185, 0, 0, 0, 184, 0, 0, 0,
- 0, 0, 0, 0, 167, 292, 0, 0, 0, 0,
- 0, 0, 58, 116, 136, 0, 134, 149, 0, 0,
- 0, 0, 0, 258, 259, 0, 257, 261, 260, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 137, 0, 142, 0,
- 0, 0, 256, 254, 270, 267, 0, 0, 0, 0,
- 0, 234, 0, 233, 281, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 199, 200, 202,
- 203, 295, 293, 46, 304, 0, 0, 0, 124, 0,
- 120, 122, 0, 0, 126, 127, 150, 152, 0, 262,
- 265, 264, 263, 194, 0, 0, 0, 301, 0, 0,
- 0, 0, 231, 232, 0, 0, 0, 0, 224, 0,
- 220, 222, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 197, 198, 0, 0, 47, 306, 309, 0, 0,
- 123, 117, 119, 121, 0, 153, 0, 0, 0, 273,
- 274, 275, 0, 0, 0, 238, 235, 236, 237, 0,
- 0, 193, 0, 189, 191, 0, 225, 0, 221, 223,
- 187, 217, 0, 207, 204, 211, 215, 201, 218, 216,
- 205, 206, 208, 209, 210, 212, 213, 214, 0, 294,
- 0, 129, 0, 151, 0, 156, 0, 148, 0, 279,
- 277, 255, 272, 271, 268, 0, 0, 0, 190, 192,
- 228, 227, 226, 229, 0, 0, 240, 241, 242, 0,
- 0, 130, 0, 0, 0, 159, 276, 0, 0, 0,
- 282, 195, 0, 0, 296, 0, 154, 158, 157, 0,
- 0, 0, 302, 0, 247, 243, 0, 310, 0, 0,
- 280, 278, 283, 0, 0, 297, 0, 160, 0, 0,
- 155, 0, 0, 0, 0, 248, 244, 161, 0, 0,
- 0, 0, 252, 249, 0, 0, 0, 0, 162, 250,
- 245, 0, 0, 0, 0, 251, 246, 0, 163
-};
-
- /* YYPGOTO[NTERM-NUM]. */
-static const yytype_int16 yypgoto[] =
-{
- -310, -310, 459, -310, -310, -310, -310, -310, -310, -310,
- -310, -310, -310, -310, -310, -310, 453, -310, -310, -310,
- -310, -310, -310, -310, -310, 451, -310, -310, -310, -310,
- -310, -310, 261, -310, -310, -310, 407, -310, -310, -310,
- 305, -93, -310, -87, -80, -73, -37, -116, -31, -122,
- -310, -310, -310, -310, 468, -310, -310, -310, -310, 24,
- 70, 95, -310, 434, -310, -310, -310, -310, 443, -310,
- -310, -310, -310, -310, -310, -310, -231, -245, -310, -310,
- -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
- -310, -310, -310, 296, -310, -310, 376, -310, -310, -310,
- -310, 45, 56, -70, -310, -310, -310, -310, 153, 173,
- 205, 102, -310, -310, -310, 118, -310, -310, -310, -310,
- -310, 186, -310, -310, -310, -310, -310, -310, -310, -310,
- -310, -310, -310, -310, -310, -310, -310, 297, -309, 314,
- -310, -310, -310, -310, -310, -310, -310, -121, -269, -310,
- -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
- 448, -310, -310, -310, -310, -310, -310, -310, -310, -301,
- -310, 449, -310, 176, -310, -74, -307, -310, -310
-};
-
- /* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
-{
- -1, 3, 4, 5, 36, 6, 103, 7, 69, 8,
- 72, 107, 9, 108, 10, 44, 45, 78, 79, 80,
- 81, 272, 465, 11, 47, 48, 49, 120, 284, 50,
- 122, 174, 175, 51, 117, 148, 149, 52, 121, 162,
- 163, 150, 177, 165, 166, 151, 152, 333, 154, 171,
- 155, 156, 12, 55, 56, 92, 185, 355, 409, 410,
- 411, 127, 413, 414, 415, 470, 13, 58, 59, 245,
- 295, 14, 60, 189, 248, 329, 249, 250, 328, 418,
- 474, 476, 524, 578, 527, 569, 591, 600, 611, 15,
- 129, 193, 263, 194, 195, 196, 197, 198, 311, 199,
- 309, 493, 494, 334, 495, 200, 313, 396, 397, 398,
- 399, 400, 201, 310, 440, 441, 377, 442, 202, 307,
- 372, 373, 203, 312, 546, 547, 584, 599, 613, 548,
- 583, 598, 603, 612, 204, 303, 424, 335, 336, 337,
- 338, 205, 305, 426, 206, 304, 425, 478, 479, 480,
- 558, 481, 557, 207, 434, 573, 16, 130, 210, 211,
- 212, 213, 464, 214, 463, 576, 17, 18, 131, 342,
- 484, 111, 273, 138, 320, 112, 113, 321, 520
-};
-
- /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule whose
- number is the opposite. If YYTABLE_NINF, syntax error. */
-static const yytype_int16 yytable[] =
-{
- 184, 153, 344, 114, 301, 169, 182, 192, 41, 345,
- 34, 1, 348, 41, 1, 91, 299, 367, 296, 553,
- 381, 540, 541, 542, 37, 490, 362, 601, 164, 176,
- 362, 95, 153, 105, 363, 178, 437, 368, 364, 365,
- 382, 437, 179, 367, 53, 387, 169, 54, 167, 180,
- 383, 384, 184, 490, 301, 106, 385, 143, 182, 118,
- 160, 379, 386, 368, 554, 160, 602, 387, 96, 164,
- 369, 370, 491, 388, 389, 390, 391, 392, 393, 394,
- 395, 176, 543, 143, 168, 181, 119, 178, 438, 167,
- 170, 183, 381, 438, 179, 143, 369, 370, 358, 19,
- 491, 180, 190, 555, 191, 67, 38, 432, 330, 143,
- 461, 42, 382, 301, 43, 2, 82, -114, 2, 43,
- 297, 407, 383, 384, 68, 168, 39, 420, 385, 143,
- 331, 170, 40, 379, 386, 126, 332, 181, 70, 387,
- 421, 71, 267, 183, 422, 388, 389, 390, 391, 392,
- 393, 394, 395, 158, 172, 407, 46, 416, 142, 268,
- 57, 143, 158, 159, 417, 144, 145, 142, 173, 269,
- 143, 160, 330, 143, 144, 145, 84, 140, 61, 141,
- 160, 142, 147, 161, 143, 255, 292, 521, 144, 145,
- 298, 147, 161, 146, 331, 246, 256, 528, 85, 62,
- 332, 341, 257, 258, 86, 147, 75, 251, 87, 532,
- 190, 239, 191, 532, 532, 88, 259, 529, 76, 77,
- 235, 63, 530, 260, 265, 190, 371, 191, 89, 261,
- 262, 46, 93, 97, 228, 54, 57, 346, 64, 408,
- 252, 253, 254, 208, 270, 66, 209, 209, 531, 533,
- 570, 477, 477, 158, 172, 65, 371, 571, 142, 435,
- 534, 143, 443, 477, 73, 144, 145, 246, 173, 247,
- 99, 160, 158, 159, 375, 74, 378, 142, 525, 526,
- 143, 100, 147, 161, 144, 145, 101, 140, 102, 141,
- 160, 142, 544, 545, 143, 104, 408, 408, 144, 145,
- 109, 147, 161, 146, 482, 483, 110, 115, 116, 123,
- 124, 126, 125, 492, 128, 147, 132, 133, 134, 139,
- 137, 492, 20, 21, 22, 23, 24, 25, 26, 27,
- 28, 135, 29, 30, 31, 32, 33, 136, 187, 157,
- 186, 215, 216, 217, 218, 241, 219, 244, 220, 221,
- 222, 223, 224, 230, 225, 226, 227, 231, 232, 277,
- 294, 233, 234, 237, 238, 242, 243, 264, 274, 275,
- 276, 278, 246, 279, 281, 280, 282, 308, 300, 283,
- 285, 286, 287, 288, 289, 290, 316, 292, 317, 318,
- 291, 302, 293, 319, 323, 324, 306, 315, 322, 325,
- 326, 330, 327, 341, 343, 349, 350, 351, 353, 352,
- 356, 354, 359, 357, 332, 360, 374, 361, 366, 376,
- 379, 405, 143, 401, 402, 403, 404, 419, 469, 406,
- 423, 428, 427, 429, 386, 240, 472, 430, 431, 436,
- 444, 446, 447, 448, 449, 450, 451, 452, 453, 454,
- 412, 455, 456, 457, 458, 466, 467, 459, 460, 475,
- 489, 468, 35, 535, 471, 485, 477, 236, 486, 487,
- 488, 550, 496, 503, 499, 501, 497, 518, 504, 505,
- 588, 506, 507, 473, 508, 509, 510, 511, 500, 512,
- 513, 514, 523, 515, 516, 517, 552, 83, 90, 519,
- 522, 98, 536, 537, 551, 549, 539, 560, 556, 559,
- 561, 562, 563, 564, 566, 565, 572, 574, 577, 567,
- 575, 568, 589, 94, 604, 592, 617, 579, 580, 581,
- 582, 585, 587, 586, 590, 593, 594, 595, 596, 597,
- 605, 615, 608, 609, 606, 607, 610, 502, 538, 462,
- 439, 614, 380, 616, 618, 229, 445, 498, 433, 314,
- 0, 188, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 266, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 339, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 340,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 271,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 347
-};
-
-static const yytype_int16 yycheck[] =
-{
- 122, 117, 309, 77, 249, 121, 122, 129, 1, 310,
- 0, 1, 313, 1, 1, 1, 247, 18, 1, 18,
- 18, 42, 43, 44, 106, 61, 335, 69, 121, 122,
- 339, 1, 148, 25, 335, 122, 56, 38, 339, 340,
- 38, 56, 122, 18, 104, 65, 162, 107, 121, 122,
- 48, 49, 174, 61, 299, 47, 54, 58, 174, 81,
- 68, 59, 60, 38, 63, 68, 108, 65, 38, 162,
- 71, 72, 108, 71, 72, 73, 74, 75, 76, 77,
- 78, 174, 103, 58, 121, 122, 108, 174, 108, 162,
- 121, 122, 18, 108, 174, 58, 71, 72, 329, 104,
- 108, 174, 105, 102, 107, 22, 106, 108, 57, 58,
- 108, 104, 38, 358, 107, 105, 104, 103, 105, 107,
- 103, 84, 48, 49, 41, 162, 106, 20, 54, 58,
- 79, 162, 106, 59, 60, 64, 85, 174, 24, 65,
- 33, 27, 1, 174, 37, 71, 72, 73, 74, 75,
- 76, 77, 78, 50, 51, 84, 107, 102, 55, 18,
- 107, 58, 50, 51, 109, 62, 63, 55, 65, 28,
- 58, 68, 57, 58, 62, 63, 1, 51, 106, 53,
- 68, 55, 79, 80, 58, 1, 102, 103, 62, 63,
- 102, 79, 80, 67, 79, 107, 12, 1, 23, 106,
- 85, 86, 18, 19, 29, 79, 18, 1, 33, 478,
- 105, 108, 107, 482, 483, 40, 32, 21, 30, 31,
- 108, 104, 26, 39, 104, 105, 342, 107, 104, 45,
- 46, 107, 104, 104, 108, 107, 107, 311, 106, 355,
- 34, 35, 36, 104, 104, 102, 107, 107, 104, 104,
- 557, 107, 107, 50, 51, 104, 372, 558, 55, 375,
- 104, 58, 378, 107, 102, 62, 63, 107, 65, 109,
- 106, 68, 50, 51, 344, 108, 346, 55, 108, 109,
- 58, 103, 79, 80, 62, 63, 103, 51, 103, 53,
- 68, 55, 94, 95, 58, 104, 412, 413, 62, 63,
- 28, 79, 80, 67, 425, 426, 87, 108, 108, 108,
- 103, 64, 108, 435, 103, 79, 104, 104, 104, 89,
- 88, 443, 3, 4, 5, 6, 7, 8, 9, 10,
- 11, 106, 13, 14, 15, 16, 17, 106, 84, 106,
- 106, 104, 103, 102, 106, 70, 106, 83, 106, 106,
- 106, 106, 106, 100, 106, 106, 106, 106, 106, 100,
- 52, 106, 106, 106, 106, 103, 106, 104, 102, 102,
- 102, 102, 107, 103, 103, 102, 100, 28, 104, 102,
- 102, 102, 102, 102, 102, 102, 28, 102, 28, 82,
- 106, 104, 106, 91, 103, 100, 108, 108, 108, 106,
- 108, 57, 108, 86, 106, 106, 106, 106, 92, 106,
- 100, 93, 106, 109, 85, 106, 103, 106, 106, 69,
- 59, 106, 58, 103, 103, 103, 102, 101, 66, 106,
- 102, 106, 102, 106, 60, 174, 412, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 355, 106, 106, 106, 106, 102, 102, 106, 106, 102,
- 82, 106, 3, 90, 108, 102, 107, 162, 103, 102,
- 102, 69, 103, 102, 108, 103, 106, 82, 103, 102,
- 54, 102, 102, 413, 103, 103, 102, 102, 443, 103,
- 102, 102, 109, 103, 102, 102, 109, 44, 47, 108,
- 106, 58, 106, 106, 103, 106, 108, 103, 108, 106,
- 102, 106, 106, 103, 102, 106, 102, 102, 102, 108,
- 103, 108, 97, 55, 96, 106, 79, 109, 108, 108,
- 108, 108, 102, 109, 102, 106, 109, 102, 102, 102,
- 109, 108, 102, 102, 106, 106, 102, 445, 492, 396,
- 377, 109, 347, 108, 108, 148, 380, 439, 372, 263,
- -1, 127, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 196, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 304, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 305,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 211,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 312
-};
-
- /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
-static const yytype_uint16 yystos[] =
-{
- 0, 1, 105, 111, 112, 113, 115, 117, 119, 122,
- 124, 133, 162, 176, 181, 199, 266, 276, 277, 104,
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 13,
- 14, 15, 16, 17, 0, 112, 114, 106, 106, 106,
- 106, 1, 104, 107, 125, 126, 107, 134, 135, 136,
- 139, 143, 147, 104, 107, 163, 164, 107, 177, 178,
- 182, 106, 106, 104, 106, 104, 102, 22, 41, 118,
- 24, 27, 120, 102, 108, 18, 30, 31, 127, 128,
- 129, 130, 104, 126, 1, 23, 29, 33, 40, 104,
- 135, 1, 165, 104, 164, 1, 38, 104, 178, 106,
- 103, 103, 103, 116, 104, 25, 47, 121, 123, 28,
- 87, 281, 285, 286, 285, 108, 108, 144, 81, 108,
- 137, 148, 140, 108, 103, 108, 64, 171, 103, 200,
- 267, 278, 104, 104, 104, 106, 106, 88, 283, 89,
- 51, 53, 55, 58, 62, 63, 67, 79, 145, 146,
- 151, 155, 156, 157, 158, 160, 161, 106, 50, 51,
- 68, 80, 149, 150, 151, 153, 154, 155, 156, 157,
- 158, 159, 51, 65, 141, 142, 151, 152, 153, 154,
- 155, 156, 157, 158, 159, 166, 106, 84, 173, 183,
- 105, 107, 159, 201, 203, 204, 205, 206, 207, 209,
- 215, 222, 228, 232, 244, 251, 254, 263, 104, 107,
- 268, 269, 270, 271, 273, 104, 103, 102, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 108, 146,
- 100, 106, 106, 106, 106, 108, 150, 106, 106, 108,
- 142, 70, 103, 106, 83, 179, 107, 109, 184, 186,
- 187, 1, 34, 35, 36, 1, 12, 18, 19, 32,
- 39, 45, 46, 202, 104, 104, 206, 1, 18, 28,
- 104, 270, 131, 282, 102, 102, 102, 100, 102, 103,
- 102, 103, 100, 102, 138, 102, 102, 102, 102, 102,
- 102, 106, 102, 106, 52, 180, 1, 103, 102, 186,
- 104, 187, 104, 245, 255, 252, 108, 229, 28, 210,
- 223, 208, 233, 216, 203, 108, 28, 28, 82, 91,
- 284, 287, 108, 103, 100, 106, 108, 108, 188, 185,
- 57, 79, 85, 157, 213, 247, 248, 249, 250, 247,
- 249, 86, 279, 106, 286, 279, 285, 281, 279, 106,
- 106, 106, 106, 92, 93, 167, 100, 109, 186, 106,
- 106, 106, 248, 279, 279, 279, 106, 18, 38, 71,
- 72, 157, 230, 231, 103, 213, 69, 226, 213, 59,
- 220, 18, 38, 48, 49, 54, 60, 65, 71, 72,
- 73, 74, 75, 76, 77, 78, 217, 218, 219, 220,
- 221, 103, 103, 103, 102, 106, 106, 84, 157, 168,
- 169, 170, 171, 172, 173, 174, 102, 109, 189, 101,
- 20, 33, 37, 102, 246, 256, 253, 102, 106, 106,
- 106, 106, 108, 231, 264, 157, 106, 56, 108, 219,
- 224, 225, 227, 157, 106, 283, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 108, 218, 274, 272, 132, 102, 102, 106, 66,
- 175, 108, 169, 170, 190, 102, 191, 107, 257, 258,
- 259, 261, 257, 257, 280, 102, 103, 102, 102, 82,
- 61, 108, 159, 211, 212, 214, 103, 106, 225, 108,
- 211, 103, 221, 102, 103, 102, 102, 102, 103, 103,
- 102, 102, 103, 102, 102, 103, 102, 102, 82, 108,
- 288, 103, 106, 109, 192, 108, 109, 194, 1, 21,
- 26, 104, 258, 104, 104, 90, 106, 106, 212, 108,
- 42, 43, 44, 103, 94, 95, 234, 235, 239, 106,
- 69, 103, 109, 18, 63, 102, 108, 262, 260, 106,
- 103, 102, 106, 106, 103, 106, 102, 108, 108, 195,
- 286, 279, 102, 265, 102, 103, 275, 102, 193, 109,
- 108, 108, 108, 240, 236, 108, 109, 102, 54, 97,
- 102, 196, 106, 106, 109, 102, 102, 102, 241, 237,
- 197, 69, 108, 242, 96, 109, 106, 106, 102, 102,
- 102, 198, 243, 238, 109, 108, 108, 79, 108
-};
-
- /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint16 yyr1[] =
-{
- 0, 110, 111, 111, 112, 112, 112, 112, 112, 112,
- 112, 112, 112, 112, 112, 112, 112, 112, 112, 114,
- 113, 116, 115, 117, 118, 118, 119, 120, 120, 121,
- 121, 123, 122, 124, 124, 125, 125, 126, 126, 126,
- 127, 127, 127, 128, 129, 131, 132, 130, 133, 134,
- 134, 135, 135, 135, 135, 135, 136, 138, 137, 137,
- 140, 139, 141, 141, 142, 142, 142, 142, 142, 142,
- 142, 142, 142, 142, 144, 143, 145, 145, 146, 146,
- 146, 146, 146, 146, 146, 146, 148, 147, 149, 149,
- 150, 150, 150, 150, 150, 150, 150, 150, 150, 151,
- 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
- 162, 162, 163, 163, 165, 166, 167, 164, 164, 168,
- 168, 169, 169, 170, 170, 171, 172, 172, 173, 174,
- 175, 176, 177, 177, 178, 178, 179, 180, 182, 183,
- 181, 185, 184, 184, 184, 186, 186, 188, 187, 187,
- 190, 189, 189, 192, 193, 191, 194, 194, 194, 195,
- 196, 197, 198, 194, 200, 199, 202, 201, 201, 203,
- 204, 203, 205, 205, 206, 206, 206, 206, 206, 206,
- 206, 206, 206, 206, 206, 206, 208, 207, 210, 209,
- 211, 211, 212, 212, 213, 214, 216, 215, 217, 217,
- 218, 218, 218, 218, 218, 218, 218, 218, 218, 218,
- 218, 218, 218, 218, 218, 218, 219, 220, 221, 223,
- 222, 224, 224, 225, 225, 226, 227, 227, 227, 227,
- 229, 228, 230, 230, 231, 231, 231, 231, 231, 233,
- 232, 234, 234, 236, 237, 238, 235, 240, 241, 239,
- 243, 242, 242, 245, 246, 244, 247, 247, 248, 248,
- 248, 248, 249, 250, 250, 250, 252, 253, 251, 255,
- 256, 254, 257, 257, 258, 258, 258, 260, 259, 262,
- 261, 264, 265, 263, 267, 266, 268, 268, 269, 269,
- 270, 270, 270, 272, 271, 274, 275, 273, 276, 278,
- 277, 280, 279, 282, 281, 284, 283, 285, 287, 288,
- 286
-};
-
- /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 0,
- 4, 0, 6, 5, 1, 1, 6, 1, 1, 1,
- 1, 0, 6, 4, 3, 2, 1, 3, 2, 2,
- 1, 1, 1, 2, 2, 0, 0, 9, 4, 2,
- 1, 1, 1, 1, 1, 3, 3, 0, 5, 1,
- 0, 5, 2, 1, 1, 1, 3, 1, 1, 1,
- 1, 1, 1, 1, 0, 5, 2, 1, 1, 3,
- 1, 1, 1, 1, 1, 1, 0, 5, 2, 1,
- 1, 3, 1, 1, 1, 1, 1, 1, 1, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 4, 3, 2, 1, 0, 0, 0, 10, 3, 2,
- 1, 2, 1, 2, 1, 3, 1, 1, 3, 3,
- 3, 4, 2, 1, 7, 3, 3, 3, 0, 0,
- 8, 0, 4, 2, 1, 2, 1, 0, 7, 3,
- 0, 3, 1, 0, 0, 7, 1, 3, 3, 0,
- 0, 0, 0, 15, 0, 6, 0, 3, 1, 2,
- 0, 2, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 3, 3, 0, 7, 0, 7,
- 2, 1, 2, 1, 3, 3, 0, 6, 2, 1,
- 1, 3, 1, 1, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 0,
- 6, 2, 1, 2, 1, 3, 3, 3, 3, 3,
- 0, 6, 2, 1, 1, 3, 3, 3, 3, 0,
- 8, 1, 1, 0, 0, 0, 13, 0, 0, 9,
- 0, 5, 1, 0, 0, 8, 2, 1, 1, 1,
- 1, 1, 3, 3, 3, 3, 0, 0, 8, 0,
- 0, 8, 2, 1, 1, 1, 3, 0, 5, 0,
- 5, 0, 0, 11, 0, 6, 2, 1, 2, 1,
- 1, 1, 3, 0, 7, 0, 0, 11, 3, 0,
- 6, 0, 7, 0, 7, 0, 7, 2, 0, 0,
- 12
-};
-
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-#define YYRECOVERING() (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (0)
-
-/* Error token number */
-#define YYTERROR 1
-#define YYERRCODE 256
-
-
-
-/* Enable debugging if requested. */
-#if HYYDEBUG
-
-# ifndef YYFPRINTF
-# include /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (0)
-
-/* This macro is provided for backward compatibility. */
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
-
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (0)
-
-
-/*----------------------------------------.
-| Print this symbol's value on YYOUTPUT. |
-`----------------------------------------*/
-
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-{
- FILE *yyo = yyoutput;
- YYUSE (yyo);
- if (!yyvaluep)
- return;
-# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
- YYUSE (yytype);
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-{
- YYFPRINTF (yyoutput, "%s %s (",
- yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
-
- yy_symbol_value_print (yyoutput, yytype, yyvaluep);
- YYFPRINTF (yyoutput, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
-`------------------------------------------------------------------*/
-
-static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-{
- YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
- YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (0)
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced. |
-`------------------------------------------------*/
-
-static void
-yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
-{
- unsigned long int yylno = yyrline[yyrule];
- int yynrhs = yyr2[yyrule];
- int yyi;
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
- /* The symbols being reduced. */
- for (yyi = 0; yyi < yynrhs; yyi++)
- {
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr,
- yystos[yyssp[yyi + 1 - yynrhs]],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
- YYFPRINTF (stderr, "\n");
- }
-}
-
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyssp, yyvsp, Rule); \
-} while (0)
-
-/* Nonzero means print parse trace. It is left uninitialized so that
- multiple parsers can coexist. */
-int yydebug;
-#else /* !HYYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !HYYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
- if the built-in stack extension method is used).
-
- Do not make this value too large; the results are undefined if
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
- evaluated with infinite-precision integer arithmetic. */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen strlen
-# else
-/* Return the length of YYSTR. */
-static YYSIZE_T
-yystrlen (const char *yystr)
-{
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- continue;
- return yylen;
-}
-# endif
-# endif
-
-# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
- YYDEST. */
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-{
- char *yyd = yydest;
- const char *yys = yysrc;
-
- while ((*yyd++ = *yys++) != '\0')
- continue;
-
- return yyd - 1;
-}
-# endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
- quotes and backslashes, so that it's suitable for yyerror. The
- heuristic is that double-quoting is unnecessary unless the string
- contains an apostrophe, a comma, or backslash (other than
- backslash-backslash). YYSTR is taken from yytname. If YYRES is
- null, do not copy; instead, return the length of what the result
- would have been. */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
- if (*yystr == '"')
- {
- YYSIZE_T yyn = 0;
- char const *yyp = yystr;
-
- for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
- do_not_strip_quotes: ;
- }
-
- if (! yyres)
- return yystrlen (yystr);
-
- return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
- about the unexpected token YYTOKEN for the state stack whose top is
- YYSSP.
-
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
- not large enough to hold the message. In that case, also set
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the
- required number of bytes is too large to store. */
-static int
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
- yytype_int16 *yyssp, int yytoken)
-{
- YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
- YYSIZE_T yysize = yysize0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- /* Internationalized format string. */
- const char *yyformat = YY_NULLPTR;
- /* Arguments of yyformat. */
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- /* Number of reported tokens (one for the "unexpected", one per
- "expected"). */
- int yycount = 0;
-
- /* There are many possibilities here to consider:
- - If this state is a consistent state with a default action, then
- the only way this function was invoked is if the default action
- is an error action. In that case, don't check for expected
- tokens because there are none.
- - The only way there can be no lookahead present (in yychar) is if
- this state is a consistent state with a default action. Thus,
- detecting the absence of a lookahead is sufficient to determine
- that there is no unexpected or expected token to report. In that
- case, just report a simple "syntax error".
- - Don't assume there isn't a lookahead just because this state is a
- consistent state with a default action. There might have been a
- previous inconsistent state, consistent state with a non-default
- action, or user semantic action that manipulated yychar.
- - Of course, the expected token list depends on states to have
- correct lookahead information, and it depends on the parser not
- to perform extra reductions after fetching a lookahead from the
- scanner and before detecting a syntax error. Thus, state merging
- (from LALR or IELR) and default reductions corrupt the expected
- token list. However, the list is correct for canonical LR with
- one exception: it will still contain any token that will not be
- accepted due to an error action in a later state.
- */
- if (yytoken != YYEMPTY)
- {
- int yyn = yypact[*yyssp];
- yyarg[yycount++] = yytname[yytoken];
- if (!yypact_value_is_default (yyn))
- {
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. In other words, skip the first -YYN actions for
- this state because they are default actions. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yyx;
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- {
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
- }
- }
- }
-
- switch (yycount)
- {
-# define YYCASE_(N, S) \
- case N: \
- yyformat = S; \
- break
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
- }
-
- {
- YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
-
- if (*yymsg_alloc < yysize)
- {
- *yymsg_alloc = 2 * yysize;
- if (! (yysize <= *yymsg_alloc
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return 1;
- }
-
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- {
- char *yyp = *yymsg;
- int yyi = 0;
- while ((*yyp = *yyformat) != '\0')
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyformat += 2;
- }
- else
- {
- yyp++;
- yyformat++;
- }
- }
- return 0;
-}
-#endif /* YYERROR_VERBOSE */
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol. |
-`-----------------------------------------------*/
-
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-{
- YYUSE (yyvaluep);
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- YYUSE (yytype);
- YY_IGNORE_MAYBE_UNINITIALIZED_END
-}
-
-
-
-
-/* The lookahead symbol. */
-int yychar;
-
-/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-
-
-/*----------.
-| yyparse. |
-`----------*/
-
-int
-yyparse (void)
-{
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
-
- /* The stacks and their tools:
- 'yyss': related to states.
- 'yyvs': related to semantic values.
-
- Refer to the stacks through separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
-
- YYSIZE_T yystacksize;
-
- int yyn;
- int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken = 0;
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
-
- /* The number of symbols on the RHS of the reduced rule.
- Keep to zero when no symbol should be popped. */
- int yylen = 0;
-
- yyssp = yyss = yyssa;
- yyvsp = yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
-
- YYDPRINTF ((stderr, "Starting parse\n"));
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
- goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate. |
-`------------------------------------------------------------*/
- yynewstate:
- /* In all cases, when you get here, the value and location stacks
- have just been pushed. So pushing a state here evens the stacks. */
- yyssp++;
-
- yysetstate:
- *yyssp = yystate;
-
- if (yyss + yystacksize - 1 <= yyssp)
- {
- /* Get the current used size of the three stacks, in elements. */
- YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- {
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
- }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
- goto yyexhaustedlab;
-# else
- /* Extend the stack our own way. */
- if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
- yystacksize *= 2;
- if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
-
- {
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
- }
-# endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
-
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
-
- if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
- }
-
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
- if (yystate == YYFINAL)
- YYACCEPT;
-
- goto yybackup;
-
-/*-----------.
-| yybackup. |
-`-----------*/
-yybackup:
-
- /* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
-
- /* First try to decide what to do without reference to lookahead token. */
- yyn = yypact[yystate];
- if (yypact_value_is_default (yyn))
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token: "));
- yychar = yylex ();
- }
-
- if (yychar <= YYEOF)
- {
- yychar = yytoken = YYEOF;
- YYDPRINTF ((stderr, "Now at end of input.\n"));
- }
- else
- {
- yytoken = YYTRANSLATE (yychar);
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
- }
-
- /* If the proper action on seeing token YYTOKEN is to reduce or to
- detect an error, take that action. */
- yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
- goto yydefault;
- yyn = yytable[yyn];
- if (yyn <= 0)
- {
- if (yytable_value_is_error (yyn))
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
-
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (yyerrstatus)
- yyerrstatus--;
-
- /* Shift the lookahead token. */
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- /* Discard the shifted token. */
- yychar = YYEMPTY;
-
- yystate = yyn;
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- *++yyvsp = yylval;
- YY_IGNORE_MAYBE_UNINITIALIZED_END
-
- goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state. |
-`-----------------------------------------------------------*/
-yydefault:
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
- goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction. |
-`-----------------------------*/
-yyreduce:
- /* yyn is the number of a rule to reduce with. */
- yylen = yyr2[yyn];
-
- /* If YYLEN is nonzero, implement the default value of the action:
- '$$ = $1'.
-
- Otherwise, the following line sets YYVAL to garbage.
- This behavior is undocumented and Bison
- users should not rely upon it. Assigning to YYVAL
- unconditionally makes the parser a bit smaller, and it avoids a
- GCC warning that YYVAL may be used uninitialized. */
- yyval = yyvsp[1-yylen];
-
-
- YY_REDUCE_PRINT (yyn);
- switch (yyn)
- {
- case 19:
-#line 150 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_board_file(&h)) YYERROR; }
-#line 1872 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 21:
-#line 155 "hyp_y.y" /* yacc.c:1646 */
- { h.vers = yylval.floatval; }
-#line 1878 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 22:
-#line 155 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_version(&h)) YYERROR; }
-#line 1884 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 23:
-#line 160 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_data_mode(&h)) YYERROR; }
-#line 1890 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 24:
-#line 163 "hyp_y.y" /* yacc.c:1646 */
- { h.detailed = pcb_false; }
-#line 1896 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 25:
-#line 164 "hyp_y.y" /* yacc.c:1646 */
- { h.detailed = pcb_true; }
-#line 1902 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 26:
-#line 169 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_units(&h)) YYERROR; }
-#line 1908 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 27:
-#line 172 "hyp_y.y" /* yacc.c:1646 */
- { h.unit_system_english = pcb_true; }
-#line 1914 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 28:
-#line 173 "hyp_y.y" /* yacc.c:1646 */
- { h.unit_system_english = pcb_false; }
-#line 1920 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 29:
-#line 176 "hyp_y.y" /* yacc.c:1646 */
- { h.metal_thickness_weight = pcb_true; }
-#line 1926 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 30:
-#line 177 "hyp_y.y" /* yacc.c:1646 */
- { h.metal_thickness_weight = pcb_false; }
-#line 1932 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 31:
-#line 181 "hyp_y.y" /* yacc.c:1646 */
- { h.default_plane_separation = yylval.floatval; }
-#line 1938 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 32:
-#line 181 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_plane_sep(&h)) YYERROR; }
-#line 1944 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 38:
-#line 195 "hyp_y.y" /* yacc.c:1646 */
- { hyyerror("warning: missing ')'"); }
-#line 1950 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 43:
-#line 205 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_perimeter_segment(&h)) YYERROR; }
-#line 1956 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 44:
-#line 208 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_perimeter_arc(&h)) YYERROR; }
-#line 1962 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 45:
-#line 211 "hyp_y.y" /* yacc.c:1646 */
- { h.name = yylval.strval; }
-#line 1968 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 46:
-#line 211 "hyp_y.y" /* yacc.c:1646 */
- { h.value = yylval.strval; }
-#line 1974 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 47:
-#line 211 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_board_attribute(&h)) YYERROR; }
-#line 1980 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 56:
-#line 230 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_options(&h)) YYERROR; }
-#line 1986 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 57:
-#line 233 "hyp_y.y" /* yacc.c:1646 */
- { h.use_die_for_metal = yylval.boolval; }
-#line 1992 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 60:
-#line 238 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 1998 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 61:
-#line 238 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_signal(&h)) YYERROR; }
-#line 2004 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 66:
-#line 247 "hyp_y.y" /* yacc.c:1646 */
- { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; }
-#line 2010 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 74:
-#line 257 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2016 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 75:
-#line 257 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_dielectric(&h)) YYERROR; }
-#line 2022 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 79:
-#line 265 "hyp_y.y" /* yacc.c:1646 */
- { h.epsilon_r = yylval.floatval; h.epsilon_r_set = pcb_true; }
-#line 2028 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 86:
-#line 275 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2034 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 87:
-#line 275 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_plane(&h)) YYERROR; }
-#line 2040 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 91:
-#line 283 "hyp_y.y" /* yacc.c:1646 */
- { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; }
-#line 2046 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 99:
-#line 293 "hyp_y.y" /* yacc.c:1646 */
- { h.thickness = yylval.floatval; h.thickness_set = pcb_true; }
-#line 2052 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 100:
-#line 296 "hyp_y.y" /* yacc.c:1646 */
- { h.plating_thickness = yylval.floatval; h.plating_thickness_set = pcb_true; }
-#line 2058 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 101:
-#line 299 "hyp_y.y" /* yacc.c:1646 */
- { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; }
-#line 2064 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 102:
-#line 302 "hyp_y.y" /* yacc.c:1646 */
- { h.temperature_coefficient = yylval.floatval; h.temperature_coefficient_set = pcb_true; }
-#line 2070 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 103:
-#line 305 "hyp_y.y" /* yacc.c:1646 */
- { h.epsilon_r = yylval.floatval; h.epsilon_r_set = pcb_true; }
-#line 2076 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 104:
-#line 308 "hyp_y.y" /* yacc.c:1646 */
- { h.loss_tangent = yylval.floatval; h.loss_tangent_set = pcb_true; }
-#line 2082 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 105:
-#line 311 "hyp_y.y" /* yacc.c:1646 */
- { h.layer_name = yylval.strval; h.layer_name_set = pcb_true; }
-#line 2088 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 106:
-#line 314 "hyp_y.y" /* yacc.c:1646 */
- { h.material_name = yylval.strval; h.material_name_set = pcb_true; }
-#line 2094 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 107:
-#line 317 "hyp_y.y" /* yacc.c:1646 */
- { h.plane_separation = yylval.floatval; h.plane_separation_set = pcb_true; }
-#line 2100 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 108:
-#line 320 "hyp_y.y" /* yacc.c:1646 */
- { h.conformal = yylval.boolval; h.conformal_set = pcb_true; }
-#line 2106 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 109:
-#line 323 "hyp_y.y" /* yacc.c:1646 */
- { h.prepreg = yylval.boolval; h.prepreg_set = pcb_true; }
-#line 2112 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 114:
-#line 336 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2118 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 115:
-#line 336 "hyp_y.y" /* yacc.c:1646 */
- { h.device_type = yylval.strval; }
-#line 2124 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 116:
-#line 336 "hyp_y.y" /* yacc.c:1646 */
- { h.ref = yylval.strval; }
-#line 2130 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 117:
-#line 336 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_devices(&h)) YYERROR; }
-#line 2136 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 125:
-#line 355 "hyp_y.y" /* yacc.c:1646 */
- { h.name = yylval.strval; h.name_set = pcb_true; }
-#line 2142 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 128:
-#line 363 "hyp_y.y" /* yacc.c:1646 */
- { h.value_float = yylval.floatval; h.value_float_set = pcb_true; }
-#line 2148 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 129:
-#line 366 "hyp_y.y" /* yacc.c:1646 */
- { h.value_string = yylval.strval; h.value_string_set = pcb_true; }
-#line 2154 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 130:
-#line 369 "hyp_y.y" /* yacc.c:1646 */
- { h.package = yylval.strval; h.package_set = pcb_true; }
-#line 2160 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 134:
-#line 381 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_supplies(&h)) YYERROR; }
-#line 2166 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 136:
-#line 385 "hyp_y.y" /* yacc.c:1646 */
- { h.voltage_specified = yylval.boolval; }
-#line 2172 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 137:
-#line 388 "hyp_y.y" /* yacc.c:1646 */
- { h.conversion = yylval.boolval; }
-#line 2178 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 138:
-#line 393 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2184 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 139:
-#line 393 "hyp_y.y" /* yacc.c:1646 */
- { h.padstack_name = yylval.strval; h.padstack_name_set = pcb_true; }
-#line 2190 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 140:
-#line 393 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_padstack_end(&h)) YYERROR; }
-#line 2196 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 141:
-#line 396 "hyp_y.y" /* yacc.c:1646 */
- { h.drill_size = yylval.floatval; h.drill_size_set = pcb_true; }
-#line 2202 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 147:
-#line 405 "hyp_y.y" /* yacc.c:1646 */
- { h.layer_name = yylval.strval; h.layer_name_set = pcb_true; }
-#line 2208 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 148:
-#line 405 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_padstack_element(&h)) YYERROR; new_record(); }
-#line 2214 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 150:
-#line 409 "hyp_y.y" /* yacc.c:1646 */
- { h.pad_shape = yylval.floatval; }
-#line 2220 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 152:
-#line 410 "hyp_y.y" /* yacc.c:1646 */
- { h.pad_shape = -1; }
-#line 2226 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 153:
-#line 414 "hyp_y.y" /* yacc.c:1646 */
- { h.pad_sx = yylval.floatval; }
-#line 2232 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 154:
-#line 414 "hyp_y.y" /* yacc.c:1646 */
- { h.pad_sy = yylval.floatval; }
-#line 2238 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 155:
-#line 414 "hyp_y.y" /* yacc.c:1646 */
- { h.pad_angle = yylval.floatval; }
-#line 2244 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 157:
-#line 418 "hyp_y.y" /* yacc.c:1646 */
- { h.pad_type = PAD_TYPE_METAL; h.pad_type_set = pcb_true; }
-#line 2250 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 158:
-#line 419 "hyp_y.y" /* yacc.c:1646 */
- { h.pad_type = PAD_TYPE_ANTIPAD; h.pad_type_set = pcb_true; }
-#line 2256 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 159:
-#line 420 "hyp_y.y" /* yacc.c:1646 */
- { h.thermal_clear_shape = yylval.floatval; }
-#line 2262 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 160:
-#line 421 "hyp_y.y" /* yacc.c:1646 */
- { h.thermal_clear_sx = yylval.floatval; }
-#line 2268 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 161:
-#line 422 "hyp_y.y" /* yacc.c:1646 */
- { h.thermal_clear_sy = yylval.floatval; }
-#line 2274 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 162:
-#line 423 "hyp_y.y" /* yacc.c:1646 */
- { h.thermal_clear_angle = yylval.floatval; }
-#line 2280 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 163:
-#line 424 "hyp_y.y" /* yacc.c:1646 */
- { h.pad_type = PAD_TYPE_THERMAL_RELIEF; h.pad_type_set = pcb_true; }
-#line 2286 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 164:
-#line 430 "hyp_y.y" /* yacc.c:1646 */
- { h.net_name = yylval.strval; if (exec_net(&h)) YYERROR; }
-#line 2292 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 166:
-#line 433 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_net_plane_separation(&h)) YYERROR; }
-#line 2298 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 170:
-#line 438 "hyp_y.y" /* yacc.c:1646 */
- { hyyerror("warning: empty net"); }
-#line 2304 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 186:
-#line 461 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2310 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 187:
-#line 461 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_seg(&h)) YYERROR; }
-#line 2316 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 188:
-#line 464 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2322 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 189:
-#line 464 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_arc(&h)) YYERROR; }
-#line 2328 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 194:
-#line 477 "hyp_y.y" /* yacc.c:1646 */
- { h.width = yylval.floatval; h.width_set = pcb_true; }
-#line 2334 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 195:
-#line 480 "hyp_y.y" /* yacc.c:1646 */
- { h.left_plane_separation = yylval.floatval; h.left_plane_separation_set = pcb_true; }
-#line 2340 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 196:
-#line 483 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2346 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 197:
-#line 483 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_via(&h)) YYERROR; }
-#line 2352 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 201:
-#line 494 "hyp_y.y" /* yacc.c:1646 */
- { h.drill_size = yylval.floatval; h.drill_size_set = pcb_true; }
-#line 2358 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 204:
-#line 497 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = pcb_true; }
-#line 2364 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 205:
-#line 498 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = pcb_true; }
-#line 2370 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 206:
-#line 499 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = pcb_true; }
-#line 2376 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 207:
-#line 500 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = pcb_true; }
-#line 2382 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 208:
-#line 501 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad1_shape = yylval.strval; h.via_pad1_shape_set = pcb_true; }
-#line 2388 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 209:
-#line 502 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad1_sx = yylval.floatval; h.via_pad1_sx_set = pcb_true; }
-#line 2394 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 210:
-#line 503 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad1_sy = yylval.floatval; h.via_pad1_sy_set = pcb_true; }
-#line 2400 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 211:
-#line 504 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad1_angle = yylval.floatval; h.via_pad1_angle_set = pcb_true; }
-#line 2406 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 212:
-#line 505 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad2_shape = yylval.strval; h.via_pad2_shape_set = pcb_true; }
-#line 2412 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 213:
-#line 506 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad2_sx = yylval.floatval; h.via_pad2_sx_set = pcb_true; }
-#line 2418 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 214:
-#line 507 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad2_sy = yylval.floatval; h.via_pad2_sy_set = pcb_true; }
-#line 2424 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 215:
-#line 508 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad2_angle = yylval.floatval; h.via_pad2_angle_set = pcb_true; }
-#line 2430 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 216:
-#line 512 "hyp_y.y" /* yacc.c:1646 */
- { h.padstack_name = yylval.strval; h.padstack_name_set = pcb_true; }
-#line 2436 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 217:
-#line 515 "hyp_y.y" /* yacc.c:1646 */
- { h.layer1_name = yylval.strval; h.layer1_name_set = pcb_true; }
-#line 2442 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 218:
-#line 518 "hyp_y.y" /* yacc.c:1646 */
- { h.layer2_name = yylval.strval; h.layer2_name_set = pcb_true; }
-#line 2448 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 219:
-#line 521 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2454 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 220:
-#line 521 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_pin(&h)) YYERROR; }
-#line 2460 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 225:
-#line 534 "hyp_y.y" /* yacc.c:1646 */
- { h.pin_reference = yylval.strval; h.pin_reference_set = pcb_true; }
-#line 2466 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 226:
-#line 537 "hyp_y.y" /* yacc.c:1646 */
- { h.pin_function = PIN_SIM_OUT; h.pin_function_set = pcb_true; }
-#line 2472 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 227:
-#line 538 "hyp_y.y" /* yacc.c:1646 */
- { h.pin_function = PIN_SIM_IN; h.pin_function_set = pcb_true; }
-#line 2478 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 228:
-#line 539 "hyp_y.y" /* yacc.c:1646 */
- { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = pcb_true; }
-#line 2484 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 229:
-#line 540 "hyp_y.y" /* yacc.c:1646 */
- { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = pcb_true; hyyerror("warning: SIM_BOTH assumed"); }
-#line 2490 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 230:
-#line 544 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2496 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 231:
-#line 544 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_pad(&h)) YYERROR; }
-#line 2502 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 235:
-#line 553 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = pcb_true; }
-#line 2508 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 236:
-#line 554 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = pcb_true; }
-#line 2514 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 237:
-#line 555 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = pcb_true; }
-#line 2520 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 238:
-#line 556 "hyp_y.y" /* yacc.c:1646 */
- { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = pcb_true; }
-#line 2526 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 239:
-#line 560 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2532 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 240:
-#line 560 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_useg(&h)) YYERROR; }
-#line 2538 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 243:
-#line 568 "hyp_y.y" /* yacc.c:1646 */
- { h.zlayer_name = yylval.strval; h.zlayer_name_set = pcb_true; }
-#line 2544 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 244:
-#line 569 "hyp_y.y" /* yacc.c:1646 */
- { h.width = yylval.floatval; }
-#line 2550 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 245:
-#line 570 "hyp_y.y" /* yacc.c:1646 */
- { h.length = yylval.floatval; }
-#line 2556 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 247:
-#line 575 "hyp_y.y" /* yacc.c:1646 */
- { h.impedance = yylval.floatval; h.impedance_set = pcb_true; }
-#line 2562 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 248:
-#line 576 "hyp_y.y" /* yacc.c:1646 */
- { h.delay = yylval.floatval; }
-#line 2568 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 250:
-#line 580 "hyp_y.y" /* yacc.c:1646 */
- { h.resistance = yylval.floatval; h.resistance_set = pcb_true;}
-#line 2574 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 253:
-#line 586 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2580 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 254:
-#line 586 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_polygon_begin(&h)) YYERROR; }
-#line 2586 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 255:
-#line 587 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_polygon_end(&h)) YYERROR; }
-#line 2592 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 262:
-#line 602 "hyp_y.y" /* yacc.c:1646 */
- { h.id = yylval.intval; h.id_set = pcb_true; }
-#line 2598 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 263:
-#line 606 "hyp_y.y" /* yacc.c:1646 */
- { h.polygon_type = POLYGON_TYPE_POUR; h.polygon_type_set = pcb_true; }
-#line 2604 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 264:
-#line 607 "hyp_y.y" /* yacc.c:1646 */
- { h.polygon_type = POLYGON_TYPE_PLANE; h.polygon_type_set = pcb_true; }
-#line 2610 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 265:
-#line 608 "hyp_y.y" /* yacc.c:1646 */
- { h.polygon_type = POLYGON_TYPE_COPPER; h.polygon_type_set = pcb_true; }
-#line 2616 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 266:
-#line 612 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2622 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 267:
-#line 612 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_polyvoid_begin(&h)) YYERROR; }
-#line 2628 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 268:
-#line 613 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_polyvoid_end(&h)) YYERROR; }
-#line 2634 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 269:
-#line 616 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2640 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 270:
-#line 616 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_polyline_begin(&h)) YYERROR; }
-#line 2646 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 271:
-#line 617 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_polyline_end(&h)) YYERROR; }
-#line 2652 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 277:
-#line 631 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2658 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 278:
-#line 631 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_line(&h)) YYERROR; }
-#line 2664 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 279:
-#line 634 "hyp_y.y" /* yacc.c:1646 */
- { new_record(); }
-#line 2670 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 280:
-#line 634 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_curve(&h)) YYERROR; }
-#line 2676 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 281:
-#line 637 "hyp_y.y" /* yacc.c:1646 */
- { h.name = yylval.strval; }
-#line 2682 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 282:
-#line 637 "hyp_y.y" /* yacc.c:1646 */
- { h.value = yylval.strval; }
-#line 2688 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 283:
-#line 637 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_net_attribute(&h)) YYERROR; }
-#line 2694 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 284:
-#line 642 "hyp_y.y" /* yacc.c:1646 */
- { h.net_class_name = yylval.strval; if (exec_net_class(&h)) YYERROR; }
-#line 2700 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 293:
-#line 661 "hyp_y.y" /* yacc.c:1646 */
- { h.net_name = yylval.strval; }
-#line 2706 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 294:
-#line 661 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_net_class_element(&h)) YYERROR; }
-#line 2712 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 295:
-#line 664 "hyp_y.y" /* yacc.c:1646 */
- { h.name = yylval.strval; }
-#line 2718 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 296:
-#line 664 "hyp_y.y" /* yacc.c:1646 */
- { h.value = yylval.strval; }
-#line 2724 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 297:
-#line 664 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_net_class_attribute(&h)) YYERROR; }
-#line 2730 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 298:
-#line 669 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_end(&h)) YYERROR; }
-#line 2736 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 299:
-#line 674 "hyp_y.y" /* yacc.c:1646 */
- { h.key = yylval.strval; }
-#line 2742 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 300:
-#line 674 "hyp_y.y" /* yacc.c:1646 */
- { if (exec_key(&h)) YYERROR; }
-#line 2748 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 301:
-#line 679 "hyp_y.y" /* yacc.c:1646 */
- { h.x = yylval.floatval; }
-#line 2754 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 302:
-#line 679 "hyp_y.y" /* yacc.c:1646 */
- { h.y = yylval.floatval; }
-#line 2760 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 303:
-#line 682 "hyp_y.y" /* yacc.c:1646 */
- { h.x1 = yylval.floatval; }
-#line 2766 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 304:
-#line 682 "hyp_y.y" /* yacc.c:1646 */
- { h.y1 = yylval.floatval; }
-#line 2772 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 305:
-#line 685 "hyp_y.y" /* yacc.c:1646 */
- { h.x2 = yylval.floatval; }
-#line 2778 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 306:
-#line 685 "hyp_y.y" /* yacc.c:1646 */
- { h.y2 = yylval.floatval; }
-#line 2784 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 308:
-#line 691 "hyp_y.y" /* yacc.c:1646 */
- { h.xc = yylval.floatval; }
-#line 2790 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 309:
-#line 691 "hyp_y.y" /* yacc.c:1646 */
- { h.yc = yylval.floatval; }
-#line 2796 "hyp_y.c" /* yacc.c:1646 */
- break;
-
- case 310:
-#line 691 "hyp_y.y" /* yacc.c:1646 */
- { h.r = yylval.floatval; }
-#line 2802 "hyp_y.c" /* yacc.c:1646 */
- break;
-
-
-#line 2806 "hyp_y.c" /* yacc.c:1646 */
- default: break;
- }
- /* User semantic actions sometimes alter yychar, and that requires
- that yytoken be updated with the new translation. We take the
- approach of translating immediately before every use of yytoken.
- One alternative is translating here after every semantic action,
- but that translation would be missed if the semantic action invokes
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
- incorrect destructor might then be invoked immediately. In the
- case of YYERROR or YYBACKUP, subsequent parser actions might lead
- to an incorrect destructor call or verbose syntax error message
- before the lookahead is translated. */
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
-
- *++yyvsp = yyval;
-
- /* Now 'shift' the result of the reduction. Determine what state
- that goes to, based on the state we popped back to and the rule
- number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTOKENS];
-
- goto yynewstate;
-
-
-/*--------------------------------------.
-| yyerrlab -- here on detecting error. |
-`--------------------------------------*/
-yyerrlab:
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
- /* If not already recovering from an error, report this error. */
- if (!yyerrstatus)
- {
- ++yynerrs;
-#if ! YYERROR_VERBOSE
- yyerror (YY_("syntax error"));
-#else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
- yyssp, yytoken)
- {
- char const *yymsgp = YY_("syntax error");
- int yysyntax_error_status;
- yysyntax_error_status = YYSYNTAX_ERROR;
- if (yysyntax_error_status == 0)
- yymsgp = yymsg;
- else if (yysyntax_error_status == 1)
- {
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
- if (!yymsg)
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = 2;
- }
- else
- {
- yysyntax_error_status = YYSYNTAX_ERROR;
- yymsgp = yymsg;
- }
- }
- yyerror (yymsgp);
- if (yysyntax_error_status == 2)
- goto yyexhaustedlab;
- }
-# undef YYSYNTAX_ERROR
-#endif
- }
-
-
-
- if (yyerrstatus == 3)
- {
- /* If just tried and failed to reuse lookahead token after an
- error, discard it. */
-
- if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
- else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
- }
-
- /* Else will try to reuse lookahead token after shifting the error
- token. */
- goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
-yyerrorlab:
-
- /* Pacify compilers like GCC when the user code never invokes
- YYERROR and the label yyerrorlab therefore never appears in user
- code. */
- if (/*CONSTCOND*/ 0)
- goto yyerrorlab;
-
- /* Do not reclaim the symbols of the rule whose action triggered
- this YYERROR. */
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
- yystate = *yyssp;
- goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR. |
-`-------------------------------------------------------------*/
-yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
-
- for (;;)
- {
- yyn = yypact[yystate];
- if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
-
- /* Pop the current state because it cannot handle the error token. */
- if (yyssp == yyss)
- YYABORT;
-
-
- yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
- YYPOPSTACK (1);
- yystate = *yyssp;
- YY_STACK_PRINT (yyss, yyssp);
- }
-
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- *++yyvsp = yylval;
- YY_IGNORE_MAYBE_UNINITIALIZED_END
-
-
- /* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
- yystate = yyn;
- goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here. |
-`-------------------------------------*/
-yyacceptlab:
- yyresult = 0;
- goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here. |
-`-----------------------------------*/
-yyabortlab:
- yyresult = 1;
- goto yyreturn;
-
-#if !defined yyoverflow || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here. |
-`-------------------------------------------------*/
-yyexhaustedlab:
- yyerror (YY_("memory exhausted"));
- yyresult = 2;
- /* Fall through. */
-#endif
-
-yyreturn:
- if (yychar != YYEMPTY)
- {
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = YYTRANSLATE (yychar);
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
- }
- /* Do not reclaim the symbols of the rule whose action triggered
- this YYABORT or YYACCEPT. */
- YYPOPSTACK (yylen);
- YY_STACK_PRINT (yyss, yyssp);
- while (yyssp != yyss)
- {
- yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
- YYPOPSTACK (1);
- }
-#ifndef yyoverflow
- if (yyss != yyssa)
- YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
-#endif
- return yyresult;
-}
-#line 693 "hyp_y.y" /* yacc.c:1906 */
-
-
-/*
- * Supporting C routines
- */
-
-void hyyerror(const char *msg)
-{
- /* log pcb-rnd message */
- hyp_error(msg);
-}
-
-void hyyprint(FILE *file, int type, YYSTYPE value)
-{
- if (type == H_STRING)
- fprintf (file, "%s", value.strval);
- else if (type == H_FLOAT)
- fprintf (file, "%g", value.floatval);
- else if (type == H_BOOL)
- fprintf (file, "%i", value.boolval);
- return;
-}
-
-/*
- * reset parse_param struct at beginning of record
- */
-
-void new_record()
-{
- h.vers = 0;
- h.detailed = pcb_false;
- h.unit_system_english = pcb_false;
- h.metal_thickness_weight = pcb_false;
- h.default_plane_separation = 0;
- h.use_die_for_metal = pcb_false;
- h.bulk_resistivity = 0;
- h.conformal = pcb_false;
- h.epsilon_r = 0;
- h.layer_name = NULL;
- h.loss_tangent = 0;
- h.material_name = NULL;
- h.plane_separation = 0;
- h.plating_thickness = 0;
- h.prepreg = pcb_false;
- h.temperature_coefficient = 0;
- h.thickness = 0;
- h.bulk_resistivity_set = pcb_false;
- h.conformal_set = pcb_false;
- h.epsilon_r_set = pcb_false;
- h.layer_name_set = pcb_false;
- h.loss_tangent_set = pcb_false;
- h.material_name_set = pcb_false;
- h.plane_separation_set = pcb_false;
- h.plating_thickness_set = pcb_false;
- h.prepreg_set = pcb_false;
- h.temperature_coefficient_set = pcb_false;
- h.thickness_set = pcb_false;
- h.device_type = NULL;
- h.ref = NULL;
- h.value_float = 0;
- h.value_string = NULL;
- h.package = NULL;
- h.name_set = pcb_false;
- h.value_float_set = pcb_false;
- h.value_string_set = pcb_false;
- h.package_set = pcb_false;
- h.voltage_specified = pcb_false;
- h.conversion = pcb_false;
- h.padstack_name = NULL;
- h.drill_size = 0;
- h.pad_shape = 0;
- h.pad_sx = 0;
- h.pad_sy = 0;
- h.pad_angle = 0;
- h.thermal_clear_shape = 0;
- h.thermal_clear_sx = 0;
- h.thermal_clear_sy = 0;
- h.thermal_clear_angle = 0;
- h.pad_type = PAD_TYPE_METAL;
- h.padstack_name_set = pcb_false;
- h.drill_size_set = pcb_false;
- h.pad_type_set = pcb_false;
- h.width = 0;
- h.left_plane_separation = 0;
- h.width_set = pcb_false;
- h.left_plane_separation_set = pcb_false;
- h.layer1_name = NULL;
- h.layer1_name_set = pcb_false;
- h.layer2_name = NULL;
- h.layer2_name_set = pcb_false;
- h.via_pad_shape = NULL;
- h.via_pad_shape_set = pcb_false;
- h.via_pad_sx = 0;
- h.via_pad_sx_set = pcb_false;
- h.via_pad_sy = 0;
- h.via_pad_sy_set = pcb_false;
- h.via_pad_angle = 0;
- h.via_pad_angle_set = pcb_false;
- h.via_pad1_shape = NULL;
- h.via_pad1_shape_set = pcb_false;
- h.via_pad1_sx = 0;
- h.via_pad1_sx_set = pcb_false;
- h.via_pad1_sy = 0;
- h.via_pad1_sy_set = pcb_false;
- h.via_pad1_angle = 0;
- h.via_pad1_angle_set = pcb_false;
- h.via_pad2_shape = NULL;
- h.via_pad2_shape_set = pcb_false;
- h.via_pad2_sx = 0;
- h.via_pad2_sx_set = pcb_false;
- h.via_pad2_sy = 0;
- h.via_pad2_sy_set = pcb_false;
- h.via_pad2_angle = 0;
- h.via_pad2_angle_set = pcb_false;
- h.pin_reference = NULL;
- h.pin_reference_set = pcb_false;
- h.pin_function = PIN_SIM_BOTH;
- h.pin_function_set = pcb_false;
- h.zlayer_name = NULL;
- h.zlayer_name_set = pcb_false;
- h.length = 0;
- h.impedance = 0;
- h.impedance_set = pcb_false;
- h.delay = 0;
- h.resistance = 0;
- h.resistance_set = pcb_false;
- h.id = -1;
- h.id_set = pcb_false;
- h.polygon_type = POLYGON_TYPE_PLANE;
- h.polygon_type_set = pcb_false;
- h.net_class_name = NULL;
- h.net_name = NULL;
- h.key = NULL;
- h.name = NULL;
- h.value = NULL;
- h.x = 0;
- h.y = 0;
- h.x1 = 0;
- h.y1 = 0;
- h.x2 = 0;
- h.y2 = 0;
- h.xc = 0;
- h.yc = 0;
- h.r = 0;
-
- return;
-}
-
-/* not truncated */
Index: src_plugins/import_hyp/import_hyp.c
===================================================================
--- src_plugins/import_hyp/import_hyp.c (revision 7963)
+++ src_plugins/import_hyp/import_hyp.c (nonexistent)
@@ -1,118 +0,0 @@
-/*
- * COPYRIGHT
- *
- * PCB, interactive printed circuit board design
- *
- * hyperlynx .hyp importer, plugin entry
- * Copyright (C) 2016 Tibor 'Igor2' Palinkas
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include "config.h"
-
-#include
-#include
-
-#include "action_helper.h"
-#include "compat_nls.h"
-#include "hid.h"
-#include "hid_draw_helpers.h"
-#include "hid_nogui.h"
-#include "hid_actions.h"
-#include "hid_init.h"
-#include "hid_attrib.h"
-#include "hid_helper.h"
-#include "plugins.h"
-#include "event.h"
-
-#warning TODO: rename config.h VERSION to PCB_VERSION
-#undef VERSION
-
-#include "parser.h"
-#include "board.h"
-
-static const char *hyp_cookie = "hyp importer";
-
-static const char load_hyp_syntax[] = "LoadhypFrom(filename[, \"debug\"]...)";
-
-static const char load_hyp_help[] = "Loads the specified Hyperlynx file.";
-
-int pcb_act_LoadhypFrom(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y)
-{
- const char *fname = NULL;
- int debug = 0;
- int i = 0;
- pcb_bool_t retval;
-
- fname = argc ? argv[0] : 0;
-
- if ((fname == NULL) || (*fname == '\0')) {
- fname = pcb_gui->fileselect(_("Load .hyp file..."),
- _("Picks a hyperlynx file to load.\n"), "default.hyp", ".hyp", "hyp", HID_FILESELECT_READ);
- }
-
- if (fname == NULL)
- PCB_AFAIL(load_hyp);
-
-
- /*
- * debug level.
- * one "debug" argument: hyperlynx logging.
- * two "debug" arguments: hyperlynx and bison logging.
- * three "debug" arguments: hyperlynx, bison and flex logging.
- */
-
- for (i = 0; i < argc; i++)
- debug += (strcmp(argv[i], "debug") == 0);
-
- if (debug > 0)
- pcb_message(PCB_MSG_INFO, _("Importing Hyperlynx file '%s', debug level %d\n"), fname, debug);
-
- pcb_event(PCB_EVENT_BUSY, NULL);
-
- retval = hyp_parse(PCB->Data, fname, debug);
-
- /* notify GUI */
- pcb_event(PCB_EVENT_LAYERS_CHANGED, NULL);
- pcb_event(PCB_EVENT_BOARD_CHANGED, NULL);
-
- if (retval)
- PCB_AFAIL(load_hyp);
-
- return 0;
-}
-
-pcb_hid_action_t hyp_action_list[] = {
- {"LoadhypFrom", 0, pcb_act_LoadhypFrom, load_hyp_help, load_hyp_syntax}
-};
-
-PCB_REGISTER_ACTIONS(hyp_action_list, hyp_cookie)
-
- static void hid_import_hyp_uninit()
-{
- pcb_hid_remove_actions_by_cookie(hyp_cookie);
-}
-
-#include "dolists.h"
-pcb_uninit_t hid_import_hyp_init()
-{
-#warning TODO: rather register an importer than an action
- PCB_REGISTER_ACTIONS(hyp_action_list, hyp_cookie)
- return hid_import_hyp_uninit;
-}
-
-/* not truncated */
Index: src_plugins/import_hyp/hyp_l.c
===================================================================
--- src_plugins/import_hyp/hyp_l.c (revision 7963)
+++ src_plugins/import_hyp/hyp_l.c (nonexistent)
@@ -1,4084 +0,0 @@
-#line 2 "hyp_l.c"
-
-#line 4 "hyp_l.c"
-
-#define YY_INT_ALIGNED short int
-
-/* A lexical scanner generated by flex */
-
-/* %not-for-header */
-
-/* %if-c-only */
-/* %if-not-reentrant */
-#define yy_create_buffer hyy_create_buffer
-#define yy_delete_buffer hyy_delete_buffer
-#define yy_flex_debug hyy_flex_debug
-#define yy_init_buffer hyy_init_buffer
-#define yy_flush_buffer hyy_flush_buffer
-#define yy_load_buffer_state hyy_load_buffer_state
-#define yy_switch_to_buffer hyy_switch_to_buffer
-#define yyin hyyin
-#define yyleng hyyleng
-#define yylex hyylex
-#define yylineno hyylineno
-#define yyout hyyout
-#define yyrestart hyyrestart
-#define yytext hyytext
-#define yywrap hyywrap
-#define yyalloc hyyalloc
-#define yyrealloc hyyrealloc
-#define yyfree hyyfree
-
-/* %endif */
-/* %endif */
-/* %ok-for-header */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 39
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-
-/* %if-c++-only */
-/* %endif */
-
-/* %if-c-only */
-
-/* %endif */
-
-/* %if-c-only */
-
-/* %endif */
-
-/* First, we deal with platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
-/* %if-c-only */
-#include
-#include
-#include
-#include
-/* %endif */
-
-/* %if-tables-serialization */
-/* %endif */
-/* end standard C headers. */
-
-/* %if-c-or-c++ */
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have . Non-C99 systems may or may not. */
-
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
-
-#include
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
-typedef unsigned short int flex_uint16_t;
-typedef unsigned int flex_uint32_t;
-
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX (4294967295U)
-#endif
-
-#endif /* ! C99 */
-
-#endif /* ! FLEXINT_H */
-
-/* %endif */
-
-/* %if-c++-only */
-/* %endif */
-
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-/* %not-for-header */
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-/* %ok-for-header */
-
-/* %not-for-header */
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-/* %ok-for-header */
-
-/* %if-reentrant */
-/* %endif */
-
-/* %if-not-reentrant */
-
-/* %endif */
-
-/* Enter a start condition. This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN (yy_start) = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state. The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START (((yy_start) - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE hyyrestart(hyyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
-#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
-#endif
-
-/* The state buf must be large enough to hold one state per character in the main buffer.
- */
-#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
-/* %if-not-reentrant */
-extern yy_size_t hyyleng;
-/* %endif */
-
-/* %if-c-only */
-/* %if-not-reentrant */
-extern FILE *hyyin, *hyyout;
-/* %endif */
-/* %endif */
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
- /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
- * access to the local variable yy_act. Since yyless() is a macro, it would break
- * existing scanners that call yyless() from OUTSIDE hyylex.
- * One obvious solution it to make yy_act a global. I tried that, and saw
- * a 5% performance hit in a non-hyylineno scanner, because yy_act is
- * normally declared as a register variable-- so it is not worth it.
- */
- #define YY_LESS_LINENO(n) \
- do { \
- int yyl;\
- for ( yyl = n; yyl < hyyleng; ++yyl )\
- if ( hyytext[yyl] == '\n' )\
- --hyylineno;\
- }while(0)
- #define YY_LINENO_REWIND_TO(dst) \
- do {\
- const char *p;\
- for ( p = yy_cp-1; p >= (dst); --p)\
- if ( *p == '\n' )\
- --hyylineno;\
- }while(0)
-
-/* Return all but the first "n" matched characters back to the input stream. */
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up hyytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- *yy_cp = (yy_hold_char); \
- YY_RESTORE_YY_MORE_OFFSET \
- (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up hyytext again */ \
- } \
- while ( 0 )
-
-#define unput(c) yyunput( c, (yytext_ptr) )
-
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
- {
-/* %if-c-only */
- FILE *yy_input_file;
-/* %endif */
-
-/* %if-c++-only */
-/* %endif */
-
- char *yy_ch_buf; /* input buffer */
- char *yy_buf_pos; /* current position in input buffer */
-
- /* Size of input buffer in bytes, not including room for EOB
- * characters.
- */
- yy_size_t yy_buf_size;
-
- /* Number of characters read into yy_ch_buf, not including EOB
- * characters.
- */
- yy_size_t yy_n_chars;
-
- /* Whether we "own" the buffer - i.e., we know we created it,
- * and can realloc() it to grow it, and should free() it to
- * delete it.
- */
- int yy_is_our_buffer;
-
- /* Whether this is an "interactive" input source; if so, and
- * if we're using stdio for input, then we want to use getc()
- * instead of fread(), to make sure we stop fetching input after
- * each newline.
- */
- int yy_is_interactive;
-
- /* Whether we're considered to be at the beginning of a line.
- * If so, '^' rules will be active on the next match, otherwise
- * not.
- */
- int yy_at_bol;
-
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
-
- /* Whether to try to fill the input buffer when we reach the
- * end of it.
- */
- int yy_fill_buffer;
-
- int yy_buffer_status;
-
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
- /* When an EOF's been seen but there's still some text to process
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we
- * shouldn't try reading from the input source any more. We might
- * still have a bunch of tokens to match, though, because of
- * possible backing-up.
- *
- * When we actually see the EOF, we change the status to "new"
- * (via hyyrestart()), so that the user can continue scanning by
- * just pointing hyyin at a new input file.
- */
-#define YY_BUFFER_EOF_PENDING 2
-
- };
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-
-/* %if-c-only Standard (non-C++) definition */
-/* %not-for-header */
-
-/* %if-not-reentrant */
-
-/* Stack of input buffers. */
-static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
-static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
-/* %endif */
-/* %ok-for-header */
-
-/* %endif */
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- *
- * Returns the top of the stack, or NULL.
- */
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
- ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
- : NULL)
-
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-
-/* %if-c-only Standard (non-C++) definition */
-
-/* %if-not-reentrant */
-/* %not-for-header */
-
-/* yy_hold_char holds the character lost when hyytext is formed. */
-static char yy_hold_char;
-static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
-yy_size_t hyyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 0; /* whether we need to initialize */
-static int yy_start = 0; /* start state number */
-
-/* Flag which is used to allow hyywrap()'s to do buffer switches
- * instead of setting up a fresh hyyin. A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-/* %ok-for-header */
-
-/* %endif */
-
-void hyyrestart (FILE *input_file );
-void hyy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE hyy_create_buffer (FILE *file,int size );
-void hyy_delete_buffer (YY_BUFFER_STATE b );
-void hyy_flush_buffer (YY_BUFFER_STATE b );
-void hyypush_buffer_state (YY_BUFFER_STATE new_buffer );
-void hyypop_buffer_state (void );
-
-static void hyyensure_buffer_stack (void );
-static void hyy_load_buffer_state (void );
-static void hyy_init_buffer (YY_BUFFER_STATE b,FILE *file );
-
-#define YY_FLUSH_BUFFER hyy_flush_buffer(YY_CURRENT_BUFFER )
-
-YY_BUFFER_STATE hyy_scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE hyy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE hyy_scan_bytes (yyconst char *bytes,yy_size_t len );
-
-/* %endif */
-
-void *hyyalloc (yy_size_t );
-void *hyyrealloc (void *,yy_size_t );
-void hyyfree (void * );
-
-#define yy_new_buffer hyy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
- { \
- if ( ! YY_CURRENT_BUFFER ){ \
- hyyensure_buffer_stack (); \
- YY_CURRENT_BUFFER_LVALUE = \
- hyy_create_buffer(hyyin,YY_BUF_SIZE ); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
- }
-
-#define yy_set_bol(at_bol) \
- { \
- if ( ! YY_CURRENT_BUFFER ){\
- hyyensure_buffer_stack (); \
- YY_CURRENT_BUFFER_LVALUE = \
- hyy_create_buffer(hyyin,YY_BUF_SIZE ); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
- }
-
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-
-/* %% [1.0] hyytext/hyyin/hyyout/yy_state_type/hyylineno etc. def's & init go here */
-/* Begin user sect3 */
-
-#define hyywrap() 1
-#define YY_SKIP_YYWRAP
-
-#define FLEX_DEBUG
-
-typedef unsigned char YY_CHAR;
-
-FILE *hyyin = (FILE *) 0, *hyyout = (FILE *) 0;
-
-typedef int yy_state_type;
-
-extern int hyylineno;
-
-int hyylineno = 1;
-
-extern char *hyytext;
-#define yytext_ptr hyytext
-
-/* %% [1.5] DFA */
-
-/* %if-c-only Standard (non-C++) definition */
-
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
-
-/* %endif */
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up hyytext.
- */
-#define YY_DO_BEFORE_ACTION \
- (yytext_ptr) = yy_bp; \
-/* %% [2.0] code to fiddle hyytext and hyyleng for yymore() goes here \ */\
- hyyleng = (size_t) (yy_cp - yy_bp); \
- (yy_hold_char) = *yy_cp; \
- *yy_cp = '\0'; \
-/* %% [3.0] code to copy yytext_ptr to hyytext[] goes here, if %array \ */\
- (yy_c_buf_p) = yy_cp;
-
-/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
-#define YY_NUM_RULES 137
-#define YY_END_OF_BUFFER 138
-/* This struct is not used in this scanner,
- but its presence is necessary. */
-struct yy_trans_info
- {
- flex_int32_t yy_verify;
- flex_int32_t yy_nxt;
- };
-static yyconst flex_int16_t yy_acclist[696] =
- { 0,
- 1, 1, 138, 134, 136, 137, 4, 136, 137, 5,
- 137, 5, 136, 137, 136, 137, 130, 136, 137, 131,
- 136, 137, 134, 136, 137, 132, 134, 136, 137, 134,
- 136, 137, 108, 134, 136, 137, 133, 136, 137, 20,
- 134, 136, 137, 134, 136, 137, 134, 136, 137, 134,
- 136, 137, 134, 136, 137, 134, 136, 137, 134, 136,
- 137, 134, 136, 137, 134, 136, 137, 30, 134, 136,
- 137, 31, 134, 136, 137, 134, 136, 137, 134, 136,
- 137, 134, 136, 137, 42, 134, 136, 137, 43, 134,
- 136, 137, 134, 136, 137, 134, 136, 137, 134, 136,
-
- 137, 134, 136, 137, 134, 136, 137, 134, 136, 137,
- 134, 136, 137, 134, 136, 137, 128, 136, 137, 129,
- 136, 137, 134, 136, 137, 127, 131, 136, 137, 134,
- 136, 137, 127, 129, 136, 137, 126, 134, 136, 137,
- 134, 136, 137, 134, 136, 137, 125, 134, 136, 137,
- 1, 134, 136, 137, 1, 4, 136, 137, 1, 5,
- 137, 1, 5, 136, 137, 1, 136, 137, 1, 130,
- 136, 137, 1, 131, 136, 137, 1, 132, 134, 136,
- 137, 1, 133, 136, 137, 1, 128, 136, 137, 1,
- 134, 136, 137, 134, 136, 137, 4, 136, 137, 2,
-
- 5, 137, 2, 5, 136, 137, 136, 137, 130, 136,
- 137, 131, 136, 137, 132, 134, 136, 137, 133, 136,
- 137, 128, 136, 137, 129, 136, 137, 134, 136, 137,
- 134, 4, 5, 135, 134, 108, 134, 108, 134, 108,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 53, 134, 134, 134, 57, 134, 134, 134, 60, 134,
- 134, 134, 134, 134, 62, 134, 134, 134, 134, 64,
- 134, 134, 134, 134, 69, 134, 70, 134, 134, 107,
- 134, 134, 72, 134, 134, 134, 134, 134, 134, 134,
-
- 134, 76, 134, 134, 134, 78, 134, 134, 134, 134,
- 134, 134, 87, 134, 134, 134, 90, 134, 134, 134,
- 134, 93, 134, 134, 134, 94, 134, 134, 134, 98,
- 134, 134, 102, 134, 134, 134, 134, 3, 134, 127,
- 126, 134, 134, 125, 134, 125, 134, 125, 134, 134,
- 1, 134, 1, 1, 4, 1, 5, 1, 1, 135,
- 1, 134, 1, 1, 3, 134, 2, 4, 2, 5,
- 2, 135, 134, 2, 3, 108, 134, 111, 134, 108,
- 134, 134, 121, 134, 114, 134, 116, 134, 115, 134,
- 119, 134, 112, 120, 134, 113, 134, 118, 134, 109,
-
- 134, 110, 134, 122, 134, 117, 134, 120, 134, 124,
- 134, 123, 134, 54, 55, 21, 134, 134, 56, 58,
- 134, 134, 134, 134, 134, 134, 134, 18, 134, 134,
- 61, 63, 19, 134, 65, 66, 134, 134, 134, 68,
- 134, 134, 16, 134, 134, 33, 134, 134, 36, 134,
- 134, 134, 134, 134, 134, 75, 134, 81, 134, 134,
- 84, 134, 134, 44, 134, 134, 134, 134, 134, 79,
- 80, 88, 134, 134, 91, 134, 134, 51, 134, 134,
- 95, 96, 97, 99, 100, 101, 106, 134, 103, 134,
- 105, 125, 134, 134, 125, 134, 134, 134, 59, 134,
-
- 134, 134, 134, 134, 134, 134, 134, 28, 134, 67,
- 134, 134, 134, 134, 134, 134, 73, 134, 134, 41,
- 134, 74, 77, 82, 83, 85, 86, 134, 134, 134,
- 134, 134, 134, 50, 134, 134, 92, 134, 134, 134,
- 11, 134, 134, 23, 134, 134, 134, 134, 134, 134,
- 134, 134, 71, 134, 134, 134, 134, 37, 134, 134,
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 9,
- 134, 134, 134, 134, 104, 134, 22, 134, 134, 134,
- 134, 134, 134, 27, 134, 29, 134, 134, 134, 134,
- 134, 134, 134, 134, 134, 45, 134, 134, 134, 48,
-
- 134, 134, 134, 134, 134, 134, 52, 134, 134, 134,
- 134, 13, 134, 134, 26, 134, 134, 32, 134, 134,
- 134, 134, 38, 134, 134, 134, 134, 134, 49, 134,
- 12, 134, 134, 134, 7, 134, 134, 134, 24, 134,
- 134, 134, 15, 134, 134, 134, 39, 134, 40, 134,
- 134, 47, 134, 14, 134, 134, 134, 8, 134, 134,
- 17, 134, 134, 10, 134, 134, 134, 6, 134, 25,
- 134, 134, 46, 134, 134, 134, 134, 134, 134, 134,
- 134, 34, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 35, 134, 134, 89
-
- } ;
-
-static yyconst flex_int16_t yy_accept[578] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 3, 3, 3, 4, 7, 10, 12, 15, 17, 20,
- 23, 26, 30, 33, 37, 40, 44, 47, 50, 53,
- 56, 59, 62, 65, 68, 72, 76, 79, 82, 85,
- 89, 93, 96, 99, 102, 105, 108, 111, 114, 117,
- 120, 123, 126, 130, 133, 137, 141, 144, 147, 151,
- 155, 159, 162, 166, 169, 173, 177, 182, 186, 190,
- 194, 197, 200, 203, 207, 209, 212, 215, 219, 222,
- 225, 228, 231, 232, 233, 234, 234, 235, 236, 238,
- 240, 240, 242, 243, 244, 245, 246, 247, 248, 249,
-
- 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
- 259, 260, 261, 262, 263, 264, 265, 265, 266, 267,
- 268, 269, 269, 270, 271, 272, 273, 274, 275, 275,
- 276, 277, 278, 278, 279, 280, 281, 282, 283, 284,
- 285, 285, 286, 287, 287, 288, 289, 290, 292, 293,
- 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
- 302, 303, 304, 304, 305, 306, 307, 308, 309, 310,
- 311, 312, 313, 313, 314, 315, 316, 317, 317, 318,
- 319, 320, 321, 322, 322, 323, 324, 324, 325, 326,
- 327, 328, 328, 329, 330, 331, 332, 333, 333, 334,
-
- 335, 336, 337, 338, 338, 339, 339, 340, 341, 343,
- 344, 346, 348, 350, 351, 353, 354, 356, 358, 359,
- 361, 363, 364, 366, 367, 367, 368, 369, 371, 371,
- 372, 373, 374, 374, 376, 376, 376, 376, 376, 376,
- 376, 376, 376, 376, 376, 376, 376, 376, 376, 376,
- 376, 378, 379, 380, 382, 383, 384, 385, 386, 387,
- 388, 389, 390, 391, 392, 393, 395, 396, 397, 398,
- 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
- 409, 410, 411, 412, 413, 414, 414, 415, 415, 416,
- 418, 419, 419, 420, 420, 421, 422, 423, 424, 425,
-
- 426, 427, 428, 430, 431, 431, 432, 432, 433, 435,
- 435, 436, 436, 437, 438, 439, 440, 440, 441, 442,
- 443, 445, 446, 448, 449, 451, 452, 453, 454, 455,
- 456, 456, 457, 458, 458, 459, 460, 461, 461, 462,
- 463, 464, 466, 467, 468, 469, 470, 470, 471, 471,
- 472, 472, 473, 474, 475, 475, 476, 477, 478, 480,
- 481, 481, 482, 482, 483, 483, 484, 484, 485, 485,
- 486, 486, 487, 489, 489, 490, 491, 491, 492, 494,
- 495, 497, 497, 497, 497, 497, 497, 497, 497, 497,
- 497, 497, 497, 497, 497, 497, 497, 497, 498, 499,
-
- 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
- 510, 510, 511, 512, 513, 514, 515, 516, 517, 517,
- 518, 519, 520, 522, 522, 523, 523, 524, 524, 525,
- 525, 526, 526, 527, 527, 528, 529, 530, 531, 532,
- 533, 534, 536, 537, 537, 538, 539, 540, 541, 543,
- 544, 546, 547, 548, 549, 550, 551, 552, 553, 553,
- 554, 555, 556, 557, 558, 560, 561, 562, 563, 564,
- 565, 566, 567, 568, 569, 570, 572, 573, 574, 575,
- 575, 576, 577, 579, 580, 581, 582, 583, 584, 586,
- 588, 589, 590, 591, 592, 593, 594, 595, 596, 598,
-
- 599, 600, 602, 603, 604, 605, 606, 607, 609, 610,
- 611, 612, 614, 615, 617, 618, 620, 621, 622, 623,
- 625, 626, 627, 628, 629, 631, 633, 634, 635, 637,
- 638, 639, 641, 642, 643, 645, 646, 647, 649, 651,
- 652, 654, 656, 657, 658, 660, 661, 663, 664, 666,
- 667, 668, 670, 672, 673, 675, 676, 677, 678, 679,
- 680, 681, 682, 684, 685, 686, 687, 688, 689, 690,
- 691, 692, 694, 695, 695, 696, 696
- } ;
-
-static yyconst flex_int32_t yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 2, 2, 4, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 1, 5, 1, 1, 1, 1, 1, 6,
- 7, 8, 9, 10, 9, 11, 1, 12, 13, 14,
- 12, 12, 12, 12, 12, 12, 12, 1, 1, 1,
- 15, 1, 16, 1, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- 26, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 1, 1, 1, 1, 42, 1, 43, 44, 44, 44,
-
- 45, 46, 44, 44, 44, 44, 47, 44, 48, 49,
- 50, 51, 44, 44, 52, 44, 53, 44, 44, 44,
- 54, 55, 56, 1, 57, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
-
-static yyconst flex_int32_t yy_meta[58] =
- { 0,
- 1, 2, 3, 4, 4, 4, 4, 1, 1, 1,
- 1, 1, 1, 1, 4, 1, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 1, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 4, 6
- } ;
-
-static yyconst flex_int16_t yy_base[642] =
- { 0,
- 0, 1102, 57, 1101, 113, 169, 121, 127, 225, 281,
- 337, 393, 1107, 0, 1097, 118, 139, 1093, 2955, 2955,
- 133, 0, 136, 450, 2955, 152, 120, 176, 178, 122,
- 122, 1077, 1075, 231, 185, 187, 1063, 504, 194, 537,
- 186, 126, 222, 195, 240, 255, 234, 1041, 1045, 2955,
- 2955, 576, 2955, 633, 2955, 145, 150, 207, 281, 301,
- 1087, 210, 219, 255, 0, 0, 315, 0, 0, 687,
- 743, 275, 247, 261, 294, 297, 306, 799, 310, 320,
- 324, 855, 0, 1086, 328, 1082, 1081, 321, 0, 337,
- 911, 342, 966, 1008, 1050, 1092, 1134, 1176, 1218, 1260,
-
- 1302, 1344, 1386, 1428, 349, 1470, 1512, 1554, 1596, 196,
- 246, 265, 2955, 1066, 1067, 344, 358, 2955, 362, 313,
- 1050, 363, 2955, 1047, 236, 1060, 346, 365, 366, 2955,
- 368, 1040, 370, 372, 373, 2955, 1049, 1048, 1043, 374,
- 377, 2955, 1041, 389, 2955, 1046, 1039, 0, 1038, 400,
- 2955, 1052, 1038, 1040, 1046, 1051, 158, 1051, 403, 404,
- 2955, 1043, 405, 407, 414, 2955, 1034, 361, 1039, 1023,
- 408, 409, 410, 2955, 411, 1029, 1032, 412, 2955, 415,
- 1021, 1015, 1030, 419, 2955, 1021, 426, 429, 430, 2955,
- 433, 440, 441, 505, 2955, 507, 1011, 508, 2955, 509,
-
- 511, 992, 1637, 433, 435, 512, 0, 2955, 503, 528,
- 542, 547, 553, 534, 701, 0, 1041, 530, 566, 1037,
- 1693, 581, 541, 1749, 585, 590, 593, 596, 598, 601,
- 604, 1805, 607, 609, 1039, 1038, 1037, 1036, 1035, 1034,
- 1033, 1032, 1031, 1030, 1029, 1028, 1027, 1026, 1025, 1024,
- 1862, 1023, 602, 697, 1917, 1021, 1959, 1013, 2001, 1012,
- 2043, 1011, 2085, 1010, 2127, 1009, 2169, 1005, 2211, 1004,
- 2253, 1003, 2295, 1002, 2337, 1001, 2379, 1000, 2421, 999,
- 2463, 998, 2505, 997, 2547, 534, 2955, 555, 2955, 0,
- 965, 615, 2955, 616, 2955, 622, 965, 959, 978, 977,
-
- 968, 964, 0, 963, 624, 2955, 625, 2955, 0, 697,
- 2955, 698, 2955, 967, 968, 699, 713, 2955, 955, 966,
- 944, 960, 950, 958, 0, 715, 951, 933, 939, 717,
- 718, 2955, 719, 720, 2955, 721, 722, 723, 2955, 724,
- 725, 0, 941, 283, 951, 937, 739, 2955, 749, 2955,
- 750, 2955, 928, 730, 753, 2955, 754, 927, 0, 933,
- 758, 2955, 759, 2955, 760, 2955, 761, 2955, 764, 2955,
- 765, 2955, 0, 768, 2955, 925, 769, 2955, 773, 607,
- 683, 951, 948, 947, 946, 943, 942, 940, 937, 935,
- 934, 933, 929, 928, 927, 926, 925, 2589, 906, 775,
-
- 2955, 904, 903, 881, 897, 902, 899, 894, 883, 0,
- 776, 2955, 892, 780, 897, 884, 879, 881, 794, 2955,
- 888, 770, 0, 795, 2955, 806, 2955, 809, 2955, 810,
- 2955, 811, 2955, 813, 2955, 891, 879, 798, 879, 877,
- 870, 0, 883, 815, 2955, 877, 877, 817, 858, 866,
- 0, 869, 869, 875, 876, 860, 869, 873, 818, 2955,
- 863, 860, 872, 867, 845, 855, 860, 853, 855, 857,
- 850, 850, 843, 842, 852, 0, 851, 844, 839, 820,
- 2955, 851, 0, 841, 850, 835, 833, 843, 0, 0,
- 849, 831, 845, 828, 820, 823, 822, 826, 0, 828,
-
- 814, 0, 813, 815, 825, 824, 813, 0, 817, 821,
- 819, 0, 805, 0, 803, 0, 809, 813, 771, 0,
- 768, 768, 756, 735, 0, 0, 697, 687, 0, 670,
- 615, 0, 604, 594, 0, 592, 590, 0, 0, 569,
- 0, 0, 564, 554, 0, 545, 0, 486, 0, 498,
- 481, 0, 0, 200, 0, 475, 432, 436, 398, 414,
- 363, 353, 0, 307, 290, 269, 240, 211, 173, 133,
- 103, 0, 825, 829, 2955, 2955, 2631, 2637, 2643, 2649,
- 2654, 2660, 2666, 2671, 2676, 2682, 2688, 2694, 2700, 2706,
- 2712, 2717, 2722, 2727, 2732, 2737, 2742, 2747, 2752, 2757,
-
- 2762, 2767, 2772, 2777, 2782, 2787, 2792, 2798, 2804, 2809,
- 2813, 2817, 2821, 2825, 2829, 2833, 2837, 2841, 2845, 2849,
- 2853, 2857, 2861, 2865, 2869, 2874, 2879, 2884, 2889, 2894,
- 2899, 2904, 2909, 2914, 2919, 2924, 2929, 2934, 2939, 2944,
- 2949
- } ;
-
-static yyconst flex_int16_t yy_def[642] =
- { 0,
- 576, 1, 576, 3, 577, 577, 6, 6, 578, 578,
- 579, 579, 576, 580, 576, 576, 576, 581, 576, 576,
- 580, 580, 580, 576, 576, 580, 580, 580, 580, 580,
- 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
- 580, 580, 580, 580, 580, 580, 580, 580, 580, 576,
- 576, 582, 576, 576, 576, 580, 580, 580, 580, 583,
- 584, 584, 584, 585, 584, 584, 583, 584, 584, 586,
- 587, 588, 576, 576, 589, 588, 588, 587, 588, 588,
- 588, 590, 580, 576, 576, 581, 576, 580, 24, 24,
- 576, 24, 591, 592, 593, 594, 595, 596, 597, 598,
-
- 599, 600, 601, 602, 580, 603, 604, 605, 606, 576,
- 580, 580, 576, 580, 580, 580, 576, 576, 580, 580,
- 580, 576, 576, 580, 580, 580, 580, 580, 576, 576,
- 580, 580, 576, 580, 580, 576, 580, 580, 580, 580,
- 576, 576, 580, 576, 576, 580, 580, 580, 580, 576,
- 576, 580, 580, 580, 580, 580, 580, 580, 580, 576,
- 576, 580, 576, 580, 580, 576, 580, 580, 580, 580,
- 580, 580, 576, 576, 580, 580, 580, 576, 576, 580,
- 580, 580, 580, 576, 576, 580, 576, 580, 580, 576,
- 580, 576, 580, 580, 576, 580, 580, 576, 576, 580,
-
- 580, 580, 582, 607, 576, 576, 54, 576, 580, 580,
- 580, 580, 580, 580, 583, 584, 584, 584, 585, 584,
- 586, 608, 584, 587, 588, 576, 588, 576, 589, 581,
- 588, 590, 609, 576, 610, 611, 612, 613, 614, 615,
- 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
- 576, 576, 580, 251, 626, 576, 627, 576, 628, 576,
- 629, 576, 630, 576, 631, 576, 632, 576, 633, 576,
- 634, 576, 635, 576, 636, 576, 637, 576, 638, 576,
- 639, 576, 640, 576, 641, 576, 576, 576, 576, 580,
- 580, 576, 576, 576, 576, 580, 580, 580, 580, 580,
-
- 580, 580, 580, 580, 576, 576, 576, 576, 580, 576,
- 576, 576, 576, 580, 580, 580, 576, 576, 580, 580,
- 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
- 576, 576, 580, 576, 576, 580, 580, 576, 576, 580,
- 580, 580, 580, 580, 580, 580, 576, 576, 576, 576,
- 576, 576, 580, 580, 576, 576, 580, 580, 580, 580,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 580, 576, 576, 580, 576, 576, 580, 580,
- 580, 610, 611, 612, 613, 614, 615, 616, 617, 618,
- 619, 620, 621, 622, 623, 624, 625, 626, 580, 576,
-
- 576, 580, 580, 580, 580, 580, 580, 580, 580, 580,
- 576, 576, 580, 580, 580, 580, 580, 580, 576, 576,
- 580, 580, 580, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 580, 580, 580, 580, 580,
- 580, 580, 580, 576, 576, 580, 580, 580, 580, 580,
- 580, 580, 580, 580, 580, 580, 580, 580, 576, 576,
- 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
- 580, 580, 580, 580, 580, 580, 580, 580, 580, 576,
- 576, 580, 580, 580, 580, 580, 580, 580, 580, 580,
- 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
-
- 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
- 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
- 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
- 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
- 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
- 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
- 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
- 580, 580, 580, 576, 576, 0, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
-
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576
- } ;
-
-static yyconst flex_int16_t yy_nxt[3013] =
- { 0,
- 14, 15, 16, 17, 18, 19, 20, 14, 21, 22,
- 23, 24, 24, 24, 25, 14, 26, 27, 28, 29,
- 30, 31, 14, 14, 32, 14, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 14, 14, 14, 14, 14, 14, 14, 48, 14,
- 14, 14, 14, 49, 14, 50, 51, 14, 15, 16,
- 17, 18, 19, 53, 14, 14, 22, 14, 14, 14,
- 14, 25, 14, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54, 14, 14,
-
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 50, 55, 15, 16, 17, 18, 19, 20,
- 85, 85, 22, 129, 56, 56, 56, 25, 14, 57,
- 573, 58, 59, 59, 59, 57, 130, 58, 59, 59,
- 59, 85, 85, 88, 89, 89, 89, 90, 90, 90,
- 115, 127, 116, 110, 128, 176, 209, 209, 209, 177,
- 210, 211, 211, 211, 111, 112, 113, 572, 50, 51,
- 15, 16, 17, 18, 19, 20, 52, 117, 22, 122,
- 56, 56, 56, 25, 114, 328, 141, 173, 144, 571,
- 118, 119, 123, 329, 124, 160, 184, 110, 125, 142,
-
- 174, 145, 126, 146, 175, 143, 120, 147, 161, 185,
- 113, 121, 218, 218, 162, 186, 557, 148, 212, 212,
- 212, 218, 218, 178, 50, 51, 61, 62, 63, 64,
- 65, 66, 133, 558, 67, 198, 179, 180, 181, 68,
- 570, 187, 182, 134, 135, 136, 183, 286, 199, 228,
- 228, 137, 188, 189, 190, 138, 192, 216, 191, 220,
- 287, 200, 139, 228, 228, 140, 288, 193, 194, 195,
- 300, 201, 301, 196, 569, 197, 227, 226, 226, 289,
- 69, 51, 61, 62, 63, 64, 65, 66, 70, 568,
- 67, 213, 211, 211, 211, 68, 226, 230, 231, 226,
-
- 226, 214, 216, 216, 216, 216, 216, 216, 226, 226,
- 567, 86, 226, 226, 437, 216, 216, 216, 216, 216,
- 216, 216, 226, 226, 438, 214, 226, 226, 296, 216,
- 85, 85, 90, 90, 90, 566, 69, 51, 72, 73,
- 74, 75, 76, 77, 297, 292, 78, 83, 90, 90,
- 90, 79, 83, 251, 251, 251, 216, 253, 293, 117,
- 254, 254, 254, 294, 122, 303, 305, 129, 304, 307,
- 216, 133, 118, 310, 312, 317, 295, 123, 141, 306,
- 130, 565, 308, 343, 136, 564, 311, 313, 318, 344,
- 144, 142, 80, 81, 72, 73, 74, 75, 76, 77,
-
- 82, 150, 78, 145, 331, 160, 163, 79, 334, 347,
- 349, 173, 351, 178, 151, 338, 355, 332, 161, 166,
- 184, 335, 348, 350, 174, 352, 179, 187, 339, 356,
- 361, 363, 563, 185, 365, 205, 205, 205, 205, 562,
- 190, 192, 367, 362, 364, 336, 337, 366, 80, 81,
- 83, 91, 340, 341, 195, 368, 561, 83, 83, 83,
- 92, 89, 89, 89, 560, 83, 83, 83, 83, 83,
- 93, 94, 95, 83, 83, 83, 96, 83, 97, 98,
- 83, 99, 83, 83, 100, 101, 83, 83, 83, 102,
- 103, 83, 104, 83, 105, 94, 96, 106, 98, 83,
-
- 107, 83, 101, 108, 109, 150, 369, 559, 371, 198,
- 374, 556, 377, 206, 209, 209, 209, 555, 151, 370,
- 152, 372, 199, 375, 153, 378, 208, 554, 154, 376,
- 155, 156, 218, 218, 157, 286, 158, 159, 163, 212,
- 212, 212, 380, 223, 223, 381, 381, 381, 287, 164,
- 165, 166, 213, 211, 211, 211, 288, 167, 212, 212,
- 212, 168, 214, 553, 379, 379, 379, 214, 216, 289,
- 220, 169, 170, 214, 552, 171, 172, 204, 205, 205,
- 204, 204, 204, 223, 223, 551, 214, 226, 226, 550,
- 204, 214, 226, 226, 227, 226, 226, 214, 228, 228,
-
- 226, 230, 231, 226, 230, 87, 226, 226, 229, 234,
- 234, 234, 234, 254, 254, 254, 292, 294, 381, 381,
- 381, 549, 86, 400, 548, 305, 307, 547, 546, 293,
- 295, 204, 204, 83, 206, 545, 401, 204, 306, 308,
- 83, 83, 83, 83, 83, 207, 207, 208, 83, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
- 207, 207, 207, 207, 207, 83, 83, 83, 83, 83,
- 83, 83, 83, 83, 83, 83, 83, 83, 222, 223,
- 223, 222, 222, 222, 381, 381, 381, 544, 310, 312,
-
- 411, 222, 216, 216, 216, 216, 216, 216, 254, 254,
- 254, 311, 313, 412, 317, 216, 419, 398, 424, 331,
- 426, 334, 428, 430, 338, 432, 434, 318, 543, 420,
- 542, 425, 332, 427, 335, 429, 431, 339, 433, 435,
- 347, 83, 222, 204, 225, 226, 226, 225, 225, 225,
- 349, 351, 442, 348, 355, 444, 216, 225, 541, 361,
- 363, 365, 367, 350, 352, 369, 371, 356, 445, 374,
- 377, 443, 362, 364, 366, 368, 400, 411, 370, 372,
- 540, 459, 375, 378, 379, 379, 379, 539, 538, 401,
- 412, 537, 466, 214, 460, 419, 424, 467, 225, 225,
-
- 225, 226, 226, 225, 225, 225, 468, 426, 420, 425,
- 428, 430, 432, 225, 434, 471, 444, 214, 480, 459,
- 427, 480, 472, 429, 431, 433, 574, 435, 473, 445,
- 574, 481, 460, 536, 481, 535, 534, 533, 532, 575,
- 531, 530, 529, 575, 528, 527, 526, 525, 524, 523,
- 522, 521, 520, 519, 225, 225, 233, 234, 234, 233,
- 233, 233, 518, 517, 516, 515, 514, 513, 512, 233,
- 511, 510, 509, 508, 507, 506, 505, 504, 503, 502,
- 501, 500, 499, 498, 497, 496, 495, 494, 493, 492,
- 491, 490, 489, 488, 487, 486, 485, 484, 483, 482,
-
- 479, 478, 477, 476, 475, 474, 470, 469, 465, 464,
- 233, 233, 91, 463, 462, 461, 458, 457, 456, 455,
- 454, 453, 452, 451, 450, 449, 284, 282, 280, 278,
- 276, 235, 236, 237, 274, 272, 270, 238, 268, 239,
- 240, 266, 241, 264, 262, 242, 243, 260, 258, 256,
- 244, 245, 252, 246, 448, 447, 236, 238, 247, 240,
- 446, 248, 441, 243, 249, 250, 83, 252, 440, 439,
- 436, 423, 422, 83, 253, 83, 83, 254, 254, 254,
- 421, 83, 418, 417, 416, 415, 414, 413, 410, 409,
- 408, 407, 406, 405, 404, 403, 402, 399, 284, 282,
-
- 280, 278, 276, 274, 272, 270, 268, 83, 83, 256,
- 266, 264, 262, 260, 258, 83, 83, 83, 83, 83,
- 83, 83, 256, 83, 252, 284, 282, 280, 278, 276,
- 274, 272, 270, 268, 266, 264, 262, 260, 258, 256,
- 252, 219, 217, 373, 373, 360, 359, 358, 357, 83,
- 83, 258, 354, 353, 346, 345, 342, 83, 83, 83,
- 83, 83, 83, 83, 333, 83, 330, 327, 326, 325,
- 324, 323, 322, 321, 320, 319, 316, 315, 314, 309,
- 302, 299, 298, 291, 290, 86, 87, 84, 217, 202,
- 148, 83, 83, 260, 149, 132, 131, 87, 84, 83,
-
- 83, 83, 83, 83, 83, 83, 576, 83, 52, 52,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 83, 83, 262, 576, 576, 576, 576,
- 576, 83, 83, 83, 83, 83, 83, 83, 576, 83,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 83, 83, 264, 576, 576,
- 576, 576, 576, 83, 83, 83, 83, 83, 83, 83,
- 576, 83, 576, 576, 576, 576, 576, 576, 576, 576,
-
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 83, 83, 266,
- 576, 576, 576, 576, 576, 83, 83, 83, 83, 83,
- 83, 83, 576, 83, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 83,
- 83, 268, 576, 576, 576, 576, 576, 83, 83, 83,
- 83, 83, 83, 83, 576, 83, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
-
- 576, 83, 83, 270, 576, 576, 576, 576, 576, 83,
- 83, 83, 83, 83, 83, 83, 576, 83, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 83, 83, 272, 576, 576, 576, 576,
- 576, 83, 83, 83, 83, 83, 83, 83, 576, 83,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 83, 83, 274, 576, 576,
- 576, 576, 576, 83, 83, 83, 83, 83, 83, 83,
-
- 576, 83, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 83, 83, 276,
- 576, 576, 576, 576, 576, 83, 83, 83, 83, 83,
- 83, 83, 576, 83, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 83,
- 83, 278, 576, 576, 576, 576, 576, 83, 83, 83,
- 83, 83, 83, 83, 576, 83, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
-
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 83, 83, 280, 576, 576, 576, 576, 576, 83,
- 83, 83, 83, 83, 83, 83, 576, 83, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 83, 83, 282, 576, 576, 576, 576,
- 576, 83, 83, 83, 83, 83, 83, 83, 576, 83,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 83, 83, 284, 576, 576,
-
- 576, 576, 576, 83, 83, 83, 83, 83, 83, 83,
- 576, 83, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 83, 204, 205,
- 205, 204, 204, 204, 576, 576, 576, 576, 576, 576,
- 576, 204, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 204, 204, 222, 223, 223, 222, 222, 222,
-
- 576, 576, 576, 576, 576, 576, 576, 222, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 222, 204,
- 225, 226, 226, 225, 225, 225, 576, 576, 576, 576,
- 576, 576, 576, 225, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
-
- 576, 576, 576, 576, 225, 225, 233, 234, 234, 233,
- 233, 233, 576, 576, 576, 576, 576, 576, 576, 233,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 233, 233, 83, 91, 576, 576, 576, 576, 576, 83,
- 83, 83, 83, 251, 251, 251, 576, 83, 83, 83,
- 83, 83, 93, 94, 95, 83, 83, 83, 96, 83,
- 97, 98, 83, 99, 83, 83, 100, 101, 83, 83,
-
- 83, 102, 103, 83, 104, 83, 105, 94, 96, 106,
- 98, 83, 107, 83, 101, 108, 109, 83, 252, 576,
- 576, 576, 576, 576, 83, 83, 83, 83, 83, 83,
- 83, 576, 83, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 83, 83,
- 256, 576, 576, 576, 576, 576, 83, 83, 83, 83,
- 83, 83, 83, 576, 83, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
-
- 83, 83, 258, 576, 576, 576, 576, 576, 83, 83,
- 83, 83, 83, 83, 83, 576, 83, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 83, 83, 260, 576, 576, 576, 576, 576,
- 83, 83, 83, 83, 83, 83, 83, 576, 83, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 83, 83, 262, 576, 576, 576,
- 576, 576, 83, 83, 83, 83, 83, 83, 83, 576,
-
- 83, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 83, 83, 264, 576,
- 576, 576, 576, 576, 83, 83, 83, 83, 83, 83,
- 83, 576, 83, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 83, 83,
- 266, 576, 576, 576, 576, 576, 83, 83, 83, 83,
- 83, 83, 83, 576, 83, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
-
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 83, 83, 268, 576, 576, 576, 576, 576, 83, 83,
- 83, 83, 83, 83, 83, 576, 83, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 83, 83, 270, 576, 576, 576, 576, 576,
- 83, 83, 83, 83, 83, 83, 83, 576, 83, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 83, 83, 272, 576, 576, 576,
-
- 576, 576, 83, 83, 83, 83, 83, 83, 83, 576,
- 83, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 83, 83, 274, 576,
- 576, 576, 576, 576, 83, 83, 83, 83, 83, 83,
- 83, 576, 83, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 83, 83,
- 276, 576, 576, 576, 576, 576, 83, 83, 83, 83,
- 83, 83, 83, 576, 83, 576, 576, 576, 576, 576,
-
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 83, 83, 278, 576, 576, 576, 576, 576, 83, 83,
- 83, 83, 83, 83, 83, 576, 83, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 83, 83, 280, 576, 576, 576, 576, 576,
- 83, 83, 83, 83, 83, 83, 83, 576, 83, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
-
- 576, 576, 576, 576, 83, 83, 282, 576, 576, 576,
- 576, 576, 83, 83, 83, 83, 83, 83, 83, 576,
- 83, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 83, 83, 284, 576,
- 576, 576, 576, 576, 83, 83, 83, 83, 83, 83,
- 83, 576, 83, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 83, 83,
- 252, 576, 576, 576, 576, 576, 83, 83, 83, 83,
-
- 83, 83, 83, 576, 83, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 83, 14, 14, 14, 14, 14, 14, 60, 60, 60,
- 60, 60, 60, 71, 71, 71, 71, 71, 71, 83,
- 576, 576, 576, 83, 86, 86, 576, 86, 86, 86,
- 203, 203, 203, 203, 203, 203, 215, 215, 215, 215,
- 215, 216, 216, 216, 216, 216, 219, 219, 219, 219,
- 219, 219, 221, 221, 221, 221, 221, 221, 224, 224,
- 224, 224, 224, 224, 225, 225, 225, 225, 225, 225,
-
- 229, 229, 229, 229, 229, 229, 232, 232, 232, 232,
- 232, 232, 255, 255, 576, 576, 255, 257, 257, 576,
- 576, 257, 259, 259, 576, 576, 259, 261, 261, 576,
- 576, 261, 263, 263, 576, 576, 263, 265, 265, 576,
- 576, 265, 267, 267, 576, 576, 267, 269, 269, 576,
- 576, 269, 271, 271, 576, 576, 271, 273, 273, 576,
- 576, 273, 275, 275, 576, 576, 275, 277, 277, 576,
- 576, 277, 279, 279, 576, 576, 279, 281, 281, 576,
- 576, 281, 283, 283, 576, 576, 283, 285, 285, 576,
- 576, 285, 204, 204, 204, 204, 204, 204, 222, 222,
-
- 222, 222, 222, 222, 233, 233, 233, 233, 233, 233,
- 382, 576, 576, 382, 383, 576, 576, 383, 384, 576,
- 576, 384, 385, 576, 576, 385, 386, 576, 576, 386,
- 387, 576, 576, 387, 388, 576, 576, 388, 389, 576,
- 576, 389, 390, 576, 576, 390, 391, 576, 576, 391,
- 392, 576, 576, 392, 393, 576, 576, 393, 394, 576,
- 576, 394, 395, 576, 576, 395, 396, 576, 576, 396,
- 397, 576, 576, 397, 255, 255, 576, 576, 255, 257,
- 257, 576, 576, 257, 259, 259, 576, 576, 259, 261,
- 261, 576, 576, 261, 263, 263, 576, 576, 263, 265,
-
- 265, 576, 576, 265, 267, 267, 576, 576, 267, 269,
- 269, 576, 576, 269, 271, 271, 576, 576, 271, 273,
- 273, 576, 576, 273, 275, 275, 576, 576, 275, 277,
- 277, 576, 576, 277, 279, 279, 576, 576, 279, 281,
- 281, 576, 576, 281, 283, 283, 576, 576, 283, 285,
- 285, 576, 576, 285, 13, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
-
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576
- } ;
-
-static yyconst flex_int16_t yy_chk[3013] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
-
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 5, 5, 5, 5, 5, 5,
- 16, 16, 5, 31, 5, 5, 5, 5, 7, 7,
- 571, 7, 7, 7, 7, 8, 31, 8, 8, 8,
- 8, 17, 17, 21, 21, 21, 21, 23, 23, 23,
- 27, 30, 27, 26, 30, 42, 56, 56, 56, 42,
- 57, 57, 57, 57, 26, 26, 26, 570, 5, 5,
- 6, 6, 6, 6, 6, 6, 6, 28, 6, 29,
- 6, 6, 6, 6, 26, 157, 35, 41, 36, 569,
- 28, 28, 29, 157, 29, 39, 44, 110, 29, 35,
-
- 41, 36, 29, 36, 41, 35, 28, 36, 39, 44,
- 110, 28, 62, 62, 39, 44, 554, 36, 58, 58,
- 58, 63, 63, 43, 6, 6, 9, 9, 9, 9,
- 9, 9, 34, 554, 9, 47, 43, 43, 43, 9,
- 568, 45, 43, 34, 34, 34, 43, 111, 47, 73,
- 73, 34, 45, 45, 45, 34, 46, 64, 45, 64,
- 111, 47, 34, 74, 74, 34, 112, 46, 46, 46,
- 125, 47, 125, 46, 567, 46, 72, 72, 72, 112,
- 9, 9, 10, 10, 10, 10, 10, 10, 10, 566,
- 10, 59, 59, 59, 59, 10, 75, 75, 75, 76,
-
- 76, 59, 60, 60, 60, 60, 60, 60, 77, 77,
- 565, 64, 79, 79, 344, 60, 67, 67, 67, 67,
- 67, 67, 80, 80, 344, 59, 81, 81, 120, 67,
- 85, 85, 88, 88, 88, 564, 10, 10, 11, 11,
- 11, 11, 11, 11, 120, 116, 11, 90, 90, 90,
- 90, 11, 92, 92, 92, 92, 60, 105, 116, 117,
- 105, 105, 105, 119, 122, 127, 128, 129, 127, 131,
- 67, 133, 117, 134, 135, 140, 119, 122, 141, 128,
- 129, 562, 131, 168, 133, 561, 134, 135, 140, 168,
- 144, 141, 11, 11, 12, 12, 12, 12, 12, 12,
-
- 12, 150, 12, 144, 159, 160, 163, 12, 164, 171,
- 172, 173, 175, 178, 150, 165, 180, 159, 160, 163,
- 184, 164, 171, 172, 173, 175, 178, 187, 165, 180,
- 188, 189, 560, 184, 191, 204, 204, 205, 205, 559,
- 187, 192, 193, 188, 189, 164, 164, 191, 12, 12,
- 24, 24, 165, 165, 192, 193, 558, 24, 24, 24,
- 24, 24, 24, 24, 557, 24, 24, 24, 24, 24,
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-
- 24, 24, 24, 24, 24, 38, 194, 556, 196, 198,
- 200, 551, 201, 206, 209, 209, 209, 550, 38, 194,
- 38, 196, 198, 200, 38, 201, 206, 548, 38, 200,
- 38, 38, 218, 218, 38, 286, 38, 38, 40, 210,
- 210, 210, 214, 223, 223, 214, 214, 214, 286, 40,
- 40, 40, 211, 211, 211, 211, 288, 40, 212, 212,
- 212, 40, 211, 546, 213, 213, 213, 212, 219, 288,
- 219, 40, 40, 213, 544, 40, 40, 52, 52, 52,
- 52, 52, 52, 222, 222, 543, 211, 225, 225, 540,
- 52, 212, 226, 226, 227, 227, 227, 213, 228, 228,
-
- 229, 229, 229, 230, 230, 230, 231, 231, 231, 233,
- 233, 234, 234, 253, 253, 253, 292, 294, 380, 380,
- 380, 537, 219, 296, 536, 305, 307, 534, 533, 292,
- 294, 52, 52, 54, 54, 531, 296, 222, 305, 307,
- 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 54, 70, 70,
- 70, 70, 70, 70, 381, 381, 381, 530, 310, 312,
-
- 316, 70, 215, 215, 215, 215, 215, 215, 254, 254,
- 254, 310, 312, 316, 317, 215, 326, 254, 330, 331,
- 333, 334, 336, 337, 338, 340, 341, 317, 528, 326,
- 527, 330, 331, 333, 334, 336, 337, 338, 340, 341,
- 347, 254, 70, 70, 71, 71, 71, 71, 71, 71,
- 349, 351, 354, 347, 355, 357, 215, 71, 524, 361,
- 363, 365, 367, 349, 351, 369, 371, 355, 357, 374,
- 377, 354, 361, 363, 365, 367, 400, 411, 369, 371,
- 523, 414, 374, 377, 379, 379, 379, 522, 521, 400,
- 411, 519, 422, 379, 414, 419, 424, 422, 71, 71,
-
- 78, 78, 78, 78, 78, 78, 422, 426, 419, 424,
- 428, 430, 432, 78, 434, 438, 444, 379, 448, 459,
- 426, 480, 438, 428, 430, 432, 573, 434, 438, 444,
- 574, 448, 459, 518, 480, 517, 515, 513, 511, 573,
- 510, 509, 507, 574, 506, 505, 504, 503, 501, 500,
- 498, 497, 496, 495, 78, 78, 82, 82, 82, 82,
- 82, 82, 494, 493, 492, 491, 488, 487, 486, 82,
- 485, 484, 482, 479, 478, 477, 475, 474, 473, 472,
- 471, 470, 469, 468, 467, 466, 465, 464, 463, 462,
- 461, 458, 457, 456, 455, 454, 453, 452, 450, 449,
-
- 447, 446, 443, 441, 440, 439, 437, 436, 421, 418,
- 82, 82, 91, 417, 416, 415, 413, 409, 408, 407,
- 406, 405, 404, 403, 402, 399, 397, 396, 395, 394,
- 393, 91, 91, 91, 392, 391, 390, 91, 389, 91,
- 91, 388, 91, 387, 386, 91, 91, 385, 384, 383,
- 91, 91, 382, 91, 376, 360, 91, 91, 91, 91,
- 358, 91, 353, 91, 91, 91, 93, 93, 346, 345,
- 343, 329, 328, 93, 93, 93, 93, 93, 93, 93,
- 327, 93, 324, 323, 322, 321, 320, 319, 315, 314,
- 304, 302, 301, 300, 299, 298, 297, 291, 284, 282,
-
- 280, 278, 276, 274, 272, 270, 268, 93, 94, 94,
- 266, 264, 262, 260, 258, 94, 94, 94, 94, 94,
- 94, 94, 256, 94, 252, 250, 249, 248, 247, 246,
- 245, 244, 243, 242, 241, 240, 239, 238, 237, 236,
- 235, 220, 217, 202, 197, 186, 183, 182, 181, 94,
- 95, 95, 177, 176, 170, 169, 167, 95, 95, 95,
- 95, 95, 95, 95, 162, 95, 158, 156, 155, 154,
- 153, 152, 149, 147, 146, 143, 139, 138, 137, 132,
- 126, 124, 121, 115, 114, 87, 86, 84, 61, 49,
- 48, 95, 96, 96, 37, 33, 32, 18, 15, 96,
-
- 96, 96, 96, 96, 96, 96, 13, 96, 4, 2,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 96, 97, 97, 0, 0, 0, 0,
- 0, 97, 97, 97, 97, 97, 97, 97, 0, 97,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 97, 98, 98, 0, 0,
- 0, 0, 0, 98, 98, 98, 98, 98, 98, 98,
- 0, 98, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 98, 99, 99,
- 0, 0, 0, 0, 0, 99, 99, 99, 99, 99,
- 99, 99, 0, 99, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 99,
- 100, 100, 0, 0, 0, 0, 0, 100, 100, 100,
- 100, 100, 100, 100, 0, 100, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 100, 101, 101, 0, 0, 0, 0, 0, 101,
- 101, 101, 101, 101, 101, 101, 0, 101, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 101, 102, 102, 0, 0, 0, 0,
- 0, 102, 102, 102, 102, 102, 102, 102, 0, 102,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 102, 103, 103, 0, 0,
- 0, 0, 0, 103, 103, 103, 103, 103, 103, 103,
-
- 0, 103, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 103, 104, 104,
- 0, 0, 0, 0, 0, 104, 104, 104, 104, 104,
- 104, 104, 0, 104, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 104,
- 106, 106, 0, 0, 0, 0, 0, 106, 106, 106,
- 106, 106, 106, 106, 0, 106, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 106, 107, 107, 0, 0, 0, 0, 0, 107,
- 107, 107, 107, 107, 107, 107, 0, 107, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 107, 108, 108, 0, 0, 0, 0,
- 0, 108, 108, 108, 108, 108, 108, 108, 0, 108,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 108, 109, 109, 0, 0,
-
- 0, 0, 0, 109, 109, 109, 109, 109, 109, 109,
- 0, 109, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 109, 203, 203,
- 203, 203, 203, 203, 0, 0, 0, 0, 0, 0,
- 0, 203, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 203, 203, 221, 221, 221, 221, 221, 221,
-
- 0, 0, 0, 0, 0, 0, 0, 221, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 221, 221,
- 224, 224, 224, 224, 224, 224, 0, 0, 0, 0,
- 0, 0, 0, 224, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 224, 224, 232, 232, 232, 232,
- 232, 232, 0, 0, 0, 0, 0, 0, 0, 232,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 232, 232, 251, 251, 0, 0, 0, 0, 0, 251,
- 251, 251, 251, 251, 251, 251, 0, 251, 251, 251,
- 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
- 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
-
- 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
- 251, 251, 251, 251, 251, 251, 251, 255, 255, 0,
- 0, 0, 0, 0, 255, 255, 255, 255, 255, 255,
- 255, 0, 255, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 255, 257,
- 257, 0, 0, 0, 0, 0, 257, 257, 257, 257,
- 257, 257, 257, 0, 257, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 257, 259, 259, 0, 0, 0, 0, 0, 259, 259,
- 259, 259, 259, 259, 259, 0, 259, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 259, 261, 261, 0, 0, 0, 0, 0,
- 261, 261, 261, 261, 261, 261, 261, 0, 261, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 261, 263, 263, 0, 0, 0,
- 0, 0, 263, 263, 263, 263, 263, 263, 263, 0,
-
- 263, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 263, 265, 265, 0,
- 0, 0, 0, 0, 265, 265, 265, 265, 265, 265,
- 265, 0, 265, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 265, 267,
- 267, 0, 0, 0, 0, 0, 267, 267, 267, 267,
- 267, 267, 267, 0, 267, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 267, 269, 269, 0, 0, 0, 0, 0, 269, 269,
- 269, 269, 269, 269, 269, 0, 269, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 269, 271, 271, 0, 0, 0, 0, 0,
- 271, 271, 271, 271, 271, 271, 271, 0, 271, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 271, 273, 273, 0, 0, 0,
-
- 0, 0, 273, 273, 273, 273, 273, 273, 273, 0,
- 273, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 273, 275, 275, 0,
- 0, 0, 0, 0, 275, 275, 275, 275, 275, 275,
- 275, 0, 275, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 275, 277,
- 277, 0, 0, 0, 0, 0, 277, 277, 277, 277,
- 277, 277, 277, 0, 277, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 277, 279, 279, 0, 0, 0, 0, 0, 279, 279,
- 279, 279, 279, 279, 279, 0, 279, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 279, 281, 281, 0, 0, 0, 0, 0,
- 281, 281, 281, 281, 281, 281, 281, 0, 281, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, 0, 0, 281, 283, 283, 0, 0, 0,
- 0, 0, 283, 283, 283, 283, 283, 283, 283, 0,
- 283, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 283, 285, 285, 0,
- 0, 0, 0, 0, 285, 285, 285, 285, 285, 285,
- 285, 0, 285, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 285, 398,
- 398, 0, 0, 0, 0, 0, 398, 398, 398, 398,
-
- 398, 398, 398, 0, 398, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 398, 577, 577, 577, 577, 577, 577, 578, 578, 578,
- 578, 578, 578, 579, 579, 579, 579, 579, 579, 580,
- 0, 0, 0, 580, 581, 581, 0, 581, 581, 581,
- 582, 582, 582, 582, 582, 582, 583, 583, 583, 583,
- 583, 584, 584, 584, 584, 584, 585, 585, 585, 585,
- 585, 585, 586, 586, 586, 586, 586, 586, 587, 587,
- 587, 587, 587, 587, 588, 588, 588, 588, 588, 588,
-
- 589, 589, 589, 589, 589, 589, 590, 590, 590, 590,
- 590, 590, 591, 591, 0, 0, 591, 592, 592, 0,
- 0, 592, 593, 593, 0, 0, 593, 594, 594, 0,
- 0, 594, 595, 595, 0, 0, 595, 596, 596, 0,
- 0, 596, 597, 597, 0, 0, 597, 598, 598, 0,
- 0, 598, 599, 599, 0, 0, 599, 600, 600, 0,
- 0, 600, 601, 601, 0, 0, 601, 602, 602, 0,
- 0, 602, 603, 603, 0, 0, 603, 604, 604, 0,
- 0, 604, 605, 605, 0, 0, 605, 606, 606, 0,
- 0, 606, 607, 607, 607, 607, 607, 607, 608, 608,
-
- 608, 608, 608, 608, 609, 609, 609, 609, 609, 609,
- 610, 0, 0, 610, 611, 0, 0, 611, 612, 0,
- 0, 612, 613, 0, 0, 613, 614, 0, 0, 614,
- 615, 0, 0, 615, 616, 0, 0, 616, 617, 0,
- 0, 617, 618, 0, 0, 618, 619, 0, 0, 619,
- 620, 0, 0, 620, 621, 0, 0, 621, 622, 0,
- 0, 622, 623, 0, 0, 623, 624, 0, 0, 624,
- 625, 0, 0, 625, 626, 626, 0, 0, 626, 627,
- 627, 0, 0, 627, 628, 628, 0, 0, 628, 629,
- 629, 0, 0, 629, 630, 630, 0, 0, 630, 631,
-
- 631, 0, 0, 631, 632, 632, 0, 0, 632, 633,
- 633, 0, 0, 633, 634, 634, 0, 0, 634, 635,
- 635, 0, 0, 635, 636, 636, 0, 0, 636, 637,
- 637, 0, 0, 637, 638, 638, 0, 0, 638, 639,
- 639, 0, 0, 639, 640, 640, 0, 0, 640, 641,
- 641, 0, 0, 641, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
-
- 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
- 576, 576
- } ;
-
-/* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[138] =
- { 0,
-1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
-
-extern int hyy_flex_debug;
-int hyy_flex_debug = 1;
-
-static yyconst flex_int16_t yy_rule_linenum[137] =
- { 0,
- 125, 130, 137, 139, 141, 151, 152, 153, 154, 155,
- 156, 157, 158, 159, 160, 161, 162, 163, 164, 168,
- 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
- 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
- 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
- 199, 200, 204, 205, 206, 207, 208, 209, 210, 211,
- 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
- 222, 224, 225, 226, 227, 228, 229, 230, 231, 232,
- 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
- 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
-
- 253, 254, 255, 256, 257, 261, 262, 267, 270, 271,
- 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
- 282, 283, 284, 285, 289, 294, 306, 311, 313, 315,
- 318, 320, 322, 325, 342, 347
- } ;
-
-static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
-static char *yy_full_match;
-static int yy_lp;
-#define REJECT \
-{ \
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ \
-yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
-++(yy_lp); \
-goto find_rule; \
-}
-
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *hyytext;
-#line 1 "hyp_l.l"
-/*
- * read hyperlynx files
- * Copyright 2012, 2016 Koen De Vleeschauwer.
- *
- * This file is part of pcb-rnd.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-/* avoid collision with other scanners */
-#line 28 "hyp_l.l"
-#include
-
-char *pcb_strdup(const char *s); /* from #include "compat_misc.h" */
-
-#include "hyp_y.h"
-
-/* copy a string between quotes */
-char *strunquote(const char *);
-
-/* remember hyperlynx file section we're in */
-int section = -1;
-
-/*
-* The scanner knows five states: INITIAL, STATE_STRING, STATE_POSINT, STATE_FLOAT and STATE_COMMENT
-*
-* In state INITIAL the scanner recognizes:
-* - punctuation (such as {}()=, )
-* - keywords (such as VERSION, BOARD, NET),
-* - strings (both between double quotes " and unquoted),
-* - and floating point numbers (with optional suffix, eg. 10 uF),
-*
-* In STATE_STRING the scanner recognizes punctuation and strings only.
-* This avoids unquoted strings being interpreted as numbers, or keywords.
-*
-* In STATE_POSINT the scanner recognizes a positive integer.
-*
-* In STATE_FLOAT the scanner recognizes a floating point number (without suffix).
-*
-* In STATE_COMMENT the scanner discards all text up to the next
-* right brace } , and then continues in state INITIAL.
-*
-*/
-
-/* whitespace: space, tab, vertical tab, form feed */
-/* accept windows and unix newlines */
-/*
-* lines with an asterisk in the first column are comments
-*/
-/* Left-hand side of an assignment: check whether next token is equals sign */
-/*
-* Positive integer
-*/
-/*
-* Floating point numbers
-*/
-/* ordinary floating point numbers */
-/* floating point numbers with suffix, e,g. pF, nH */
-/*
-* Strings
-*/
-/* an unquoted string */
-/* a string enclosed in double quotes " */
-#line 1642 "hyp_l.c"
-
-#define INITIAL 0
-#define STATE_STRING 1
-#define STATE_POSINT 2
-#define STATE_FLOAT 3
-#define STATE_COMMENT 4
-#define STATE_COMMENT_EOL 5
-
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-/* %if-c-only */
-#include
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
-
-/* %if-c-only Reentrant structure and macros (non-C++). */
-/* %if-reentrant */
-/* %if-c-only */
-
-static int yy_init_globals (void );
-
-/* %endif */
-/* %if-reentrant */
-/* %endif */
-/* %endif End reentrant structures and macros. */
-
-/* Accessor methods to globals.
- These are made visible to non-reentrant scanners for convenience. */
-
-int hyylex_destroy (void );
-
-int hyyget_debug (void );
-
-void hyyset_debug (int debug_flag );
-
-YY_EXTRA_TYPE hyyget_extra (void );
-
-void hyyset_extra (YY_EXTRA_TYPE user_defined );
-
-FILE *hyyget_in (void );
-
-void hyyset_in (FILE * in_str );
-
-FILE *hyyget_out (void );
-
-void hyyset_out (FILE * out_str );
-
-yy_size_t hyyget_leng (void );
-
-char *hyyget_text (void );
-
-int hyyget_lineno (void );
-
-void hyyset_lineno (int line_number );
-
-/* %if-bison-bridge */
-/* %endif */
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int hyywrap (void );
-#else
-extern int hyywrap (void );
-#endif
-#endif
-
-/* %not-for-header */
-
- static void yyunput (int c,char *buf_ptr );
-
-/* %ok-for-header */
-
-/* %endif */
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
-#endif
-
-#ifndef YY_NO_INPUT
-/* %if-c-only Standard (non-C++) definition */
-/* %not-for-header */
-
-#ifdef __cplusplus
-static int yyinput (void );
-#else
-static int input (void );
-#endif
-/* %ok-for-header */
-
-/* %endif */
-#endif
-
-/* %if-c-only */
-
-/* %endif */
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
-#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-#ifndef ECHO
-/* %if-c-only Standard (non-C++) definition */
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO do { if (fwrite( hyytext, hyyleng, 1, hyyout )) {} } while (0)
-/* %endif */
-/* %if-c++-only C++ definition */
-/* %endif */
-#endif
-
-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
- if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
- { \
- int c = '*'; \
- int n; \
- for ( n = 0; n < max_size && \
- (c = getc( hyyin )) != EOF && c != '\n'; ++n ) \
- buf[n] = (char) c; \
- if ( c == '\n' ) \
- buf[n++] = (char) c; \
- if ( c == EOF && ferror( hyyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- result = n; \
- } \
- else \
- { \
- errno=0; \
- while ( (result = fread(buf, 1, (yy_size_t) max_size, hyyin)) == 0 && ferror(hyyin)) \
- { \
- if( errno != EINTR) \
- { \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- break; \
- } \
- errno=0; \
- clearerr(hyyin); \
- } \
- }\
-\
-/* %if-c++-only C++ definition \ */\
-/* %endif */
-
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-/* %if-c-only */
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-#endif
-
-/* %if-tables-serialization structures and prototypes */
-/* %not-for-header */
-
-/* %ok-for-header */
-
-/* %not-for-header */
-
-/* %tables-yydmap generated elements */
-/* %endif */
-/* end tables serialization structures and prototypes */
-
-/* %ok-for-header */
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-/* %if-c-only Standard (non-C++) definition */
-
-extern int hyylex (void);
-
-#define YY_DECL int hyylex (void)
-/* %endif */
-/* %if-c++-only C++ definition */
-/* %endif */
-#endif /* !YY_DECL */
-
-/* Code executed at the beginning of each rule, after hyytext and hyyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-/* %% [6.0] YY_RULE_SETUP definition goes here */
-#define YY_RULE_SETUP \
- if ( hyyleng > 0 ) \
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
- (hyytext[hyyleng - 1] == '\n'); \
- YY_USER_ACTION
-
-/* %not-for-header */
-
-/** The main scanner function which does all the work.
- */
-YY_DECL
-{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
-
- if ( !(yy_init) )
- {
- (yy_init) = 1;
-
-#ifdef YY_USER_INIT
- YY_USER_INIT;
-#endif
-
- /* Create the reject buffer large enough to save one state per allowed character. */
- if ( ! (yy_state_buf) )
- (yy_state_buf) = (yy_state_type *)hyyalloc(YY_STATE_BUF_SIZE );
- if ( ! (yy_state_buf) )
- YY_FATAL_ERROR( "out of dynamic memory in hyylex()" );
-
- if ( ! (yy_start) )
- (yy_start) = 1; /* first start state */
-
- if ( ! hyyin )
-/* %if-c-only */
- hyyin = stdin;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-
- if ( ! hyyout )
-/* %if-c-only */
- hyyout = stdout;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-
- if ( ! YY_CURRENT_BUFFER ) {
- hyyensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- hyy_create_buffer(hyyin,YY_BUF_SIZE );
- }
-
- hyy_load_buffer_state( );
- }
-
- {
-/* %% [7.0] user's declarations go here */
-#line 121 "hyp_l.l"
-
-
- /* When in STATE_COMMENT skip all comment until next right brace */
-#line 1942 "hyp_l.c"
-
- while ( 1 ) /* loops until end-of-file is reached */
- {
-/* %% [8.0] yymore()-related code goes here */
- yy_cp = (yy_c_buf_p);
-
- /* Support of hyytext. */
- *yy_cp = (yy_hold_char);
-
- /* yy_bp points to the position in yy_ch_buf of the start of
- * the current run.
- */
- yy_bp = yy_cp;
-
-/* %% [9.0] code to set up and find next match goes here */
- yy_current_state = (yy_start);
- yy_current_state += YY_AT_BOL();
-
- (yy_state_ptr) = (yy_state_buf);
- *(yy_state_ptr)++ = yy_current_state;
-
-yy_match:
- do
- {
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 577 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- *(yy_state_ptr)++ = yy_current_state;
- ++yy_cp;
- }
- while ( yy_base[yy_current_state] != 2955 );
-
-yy_find_action:
-/* %% [10.0] code to find the action number goes here */
- yy_current_state = *--(yy_state_ptr);
- (yy_lp) = yy_accept[yy_current_state];
-find_rule: /* we branch to this label when backing up */
- for ( ; ; ) /* until we find what rule we matched */
- {
- if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
- {
- yy_act = yy_acclist[(yy_lp)];
- {
- (yy_full_match) = yy_cp;
- break;
- }
- }
- --yy_cp;
- yy_current_state = *--(yy_state_ptr);
- (yy_lp) = yy_accept[yy_current_state];
- }
-
- YY_DO_BEFORE_ACTION;
-
-/* %% [11.0] code for hyylineno update goes here */
-
- if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
- {
- yy_size_t yyl;
- for ( yyl = 0; yyl < hyyleng; ++yyl )
- if ( hyytext[yyl] == '\n' )
-
- hyylineno++;
-;
- }
-
-do_action: /* This label is used only to access EOF actions. */
-
-/* %% [12.0] debug code goes here */
- if ( hyy_flex_debug )
- {
- if ( yy_act == 0 )
- fprintf( stderr, "--scanner backing up\n" );
- else if ( yy_act < 137 )
- fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
- (long)yy_rule_linenum[yy_act], hyytext );
- else if ( yy_act == 137 )
- fprintf( stderr, "--accepting default rule (\"%s\")\n",
- hyytext );
- else if ( yy_act == 138 )
- fprintf( stderr, "--(end of buffer or a NUL)\n" );
- else
- fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
- }
-
- switch ( yy_act )
- { /* beginning of action switch */
-/* %% [13.0] actions go here */
-
-case 1:
-/* rule 1 can match eol */
-YY_RULE_SETUP
-#line 125 "hyp_l.l"
-{ BEGIN INITIAL; /* skip all comment until next right brace */ }
- YY_BREAK
-
-/* When in STATE_COMMENT_EOL skip all comment until end-of-line */
-
-case 2:
-/* rule 2 can match eol */
-YY_RULE_SETUP
-#line 130 "hyp_l.l"
-{ BEGIN INITIAL; /* skip all comment until next end-of-line */ }
- YY_BREAK
-
-/* skip comments and whitespace */
-
-case 3:
-/* rule 3 can match eol */
-YY_RULE_SETUP
-#line 137 "hyp_l.l"
-{ /* skip comments */ }
- YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 139 "hyp_l.l"
-{ /* skip whitespace */ }
- YY_BREAK
-case 5:
-/* rule 5 can match eol */
-YY_RULE_SETUP
-#line 141 "hyp_l.l"
-{ /* skip newlines */ }
- YY_BREAK
-
-/*
- * Hyperlynx keywords
- */
-/* Sections */
-case 6:
-YY_RULE_SETUP
-#line 151 "hyp_l.l"
-{section = H_BOARD_FILE; return H_BOARD_FILE;}
- YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 152 "hyp_l.l"
-{section = H_VERSION; return H_VERSION;}
- YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 153 "hyp_l.l"
-{section = H_DATA_MODE; return H_DATA_MODE;}
- YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 154 "hyp_l.l"
-{section = H_UNITS; return H_UNITS;}
- YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 155 "hyp_l.l"
-{section = H_PLANE_SEP; return H_PLANE_SEP;}
- YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 156 "hyp_l.l"
-{section = H_BOARD; BEGIN STATE_COMMENT_EOL; return H_BOARD;}
- YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 157 "hyp_l.l"
-{section = H_STACKUP; BEGIN STATE_COMMENT_EOL; return H_STACKUP;}
- YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 158 "hyp_l.l"
-{section = H_DEVICES; BEGIN STATE_COMMENT_EOL; return H_DEVICES;}
- YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 159 "hyp_l.l"
-{section = H_SUPPLIES; BEGIN STATE_COMMENT_EOL; return H_SUPPLIES;}
- YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 160 "hyp_l.l"
-{section = H_PADSTACK; BEGIN STATE_STRING; return H_PADSTACK;}
- YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 161 "hyp_l.l"
-{section = H_NET; BEGIN STATE_STRING; return H_NET;}
- YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 162 "hyp_l.l"
-{section = H_NET_CLASS; return H_NET_CLASS;}
- YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 163 "hyp_l.l"
-{section = H_END; return H_END;}
- YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 164 "hyp_l.l"
-{section = H_KEY; return H_KEY;}
- YY_BREAK
-/* Keywords */
-case 20:
-YY_RULE_SETUP
-#line 168 "hyp_l.l"
-{return H_A;}
- YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 169 "hyp_l.l"
-{return H_ARC;}
- YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 170 "hyp_l.l"
-{return H_COPPER;}
- YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 171 "hyp_l.l"
-{return H_CURVE;}
- YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 172 "hyp_l.l"
-{if (section == H_DATA_MODE) BEGIN STATE_COMMENT; return H_DETAILED;}
- YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 173 "hyp_l.l"
-{return H_DIELECTRIC;}
- YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 174 "hyp_l.l"
-{return H_ENGLISH;}
- YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 175 "hyp_l.l"
-{if (section == H_UNITS) BEGIN STATE_COMMENT; return H_LENGTH;}
- YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 176 "hyp_l.l"
-{return H_LINE;}
- YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 177 "hyp_l.l"
-{return H_METRIC;}
- YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 178 "hyp_l.l"
-{return H_M;}
- YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 179 "hyp_l.l"
-{return H_N;}
- YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 180 "hyp_l.l"
-{return H_OPTIONS;}
- YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 181 "hyp_l.l"
-{return H_PAD;}
- YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 182 "hyp_l.l"
-{return H_PERIMETER_ARC;}
- YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 183 "hyp_l.l"
-{return H_PERIMETER_SEGMENT;}
- YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 184 "hyp_l.l"
-{return H_PIN;}
- YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 185 "hyp_l.l"
-{return H_PLANE;}
- YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 186 "hyp_l.l"
-{return H_POLYGON;}
- YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 187 "hyp_l.l"
-{return H_POLYLINE;}
- YY_BREAK
-case 40:
-YY_RULE_SETUP
-#line 188 "hyp_l.l"
-{return H_POLYVOID;}
- YY_BREAK
-case 41:
-YY_RULE_SETUP
-#line 189 "hyp_l.l"
-{return H_POUR;}
- YY_BREAK
-case 42:
-YY_RULE_SETUP
-#line 190 "hyp_l.l"
-{return H_S;}
- YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 191 "hyp_l.l"
-{return H_T;}
- YY_BREAK
-case 44:
-YY_RULE_SETUP
-#line 192 "hyp_l.l"
-{return H_SEG;}
- YY_BREAK
-case 45:
-YY_RULE_SETUP
-#line 193 "hyp_l.l"
-{return H_SIGNAL;}
- YY_BREAK
-case 46:
-YY_RULE_SETUP
-#line 194 "hyp_l.l"
-{if (section == H_DATA_MODE) BEGIN STATE_COMMENT; return H_SIMPLIFIED; }
- YY_BREAK
-case 47:
-YY_RULE_SETUP
-#line 195 "hyp_l.l"
-{return H_SIM_BOTH;}
- YY_BREAK
-case 48:
-YY_RULE_SETUP
-#line 196 "hyp_l.l"
-{return H_SIM_IN;}
- YY_BREAK
-case 49:
-YY_RULE_SETUP
-#line 197 "hyp_l.l"
-{return H_SIM_OUT;}
- YY_BREAK
-case 50:
-YY_RULE_SETUP
-#line 198 "hyp_l.l"
-{return H_USEG;}
- YY_BREAK
-case 51:
-YY_RULE_SETUP
-#line 199 "hyp_l.l"
-{return H_VIA;}
- YY_BREAK
-case 52:
-YY_RULE_SETUP
-#line 200 "hyp_l.l"
-{if (section == H_UNITS) BEGIN STATE_COMMENT; return H_WEIGHT;}
- YY_BREAK
-/* Assignments */
-case 53:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 204 "hyp_l.l"
-{return H_A;}
- YY_BREAK
-case 54:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 205 "hyp_l.l"
-{return H_A1;}
- YY_BREAK
-case 55:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 206 "hyp_l.l"
-{return H_A2;}
- YY_BREAK
-case 56:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 207 "hyp_l.l"
-{return H_BR;}
- YY_BREAK
-case 57:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 208 "hyp_l.l"
-{return H_C;}
- YY_BREAK
-case 58:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 209 "hyp_l.l"
-{return H_C_QM;}
- YY_BREAK
-case 59:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 3;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 210 "hyp_l.l"
-{return H_CO_QM;}
- YY_BREAK
-case 60:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 211 "hyp_l.l"
-{return H_D;}
- YY_BREAK
-case 61:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 212 "hyp_l.l"
-{return H_ER;}
- YY_BREAK
-case 62:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 213 "hyp_l.l"
-{return H_F;}
- YY_BREAK
-case 63:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 214 "hyp_l.l"
-{BEGIN STATE_POSINT; return H_ID;}
- YY_BREAK
-case 64:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 215 "hyp_l.l"
-{BEGIN STATE_STRING; return H_L;}
- YY_BREAK
-case 65:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 216 "hyp_l.l"
-{BEGIN STATE_STRING; return H_L1;}
- YY_BREAK
-case 66:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 217 "hyp_l.l"
-{BEGIN STATE_STRING; return H_L2;}
- YY_BREAK
-case 67:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 3;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 218 "hyp_l.l"
-{return H_LPS;}
- YY_BREAK
-case 68:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 219 "hyp_l.l"
-{return H_LT;}
- YY_BREAK
-case 69:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 220 "hyp_l.l"
-{BEGIN STATE_STRING; return H_M;}
- YY_BREAK
-case 70:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 221 "hyp_l.l"
-{BEGIN STATE_STRING; return H_N;}
- YY_BREAK
-case 71:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 4;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 222 "hyp_l.l"
-{BEGIN STATE_STRING; return H_NAME;}
- YY_BREAK
-/* P is used as "plating thickness" in "stackup/signal" and as "padstack" in "net/via" */
-case 72:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 224 "hyp_l.l"
-{if (section == H_NET) BEGIN STATE_STRING; return H_P;}
- YY_BREAK
-case 73:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 3;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 225 "hyp_l.l"
-{BEGIN STATE_STRING; return H_PKG;}
- YY_BREAK
-case 74:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 3;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 226 "hyp_l.l"
-{return H_PR_QM;}
- YY_BREAK
-case 75:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 227 "hyp_l.l"
-{return H_PS;}
- YY_BREAK
-case 76:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 228 "hyp_l.l"
-{return H_R;}
- YY_BREAK
-case 77:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 3;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 229 "hyp_l.l"
-{BEGIN STATE_STRING; return H_REF;}
- YY_BREAK
-case 78:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 230 "hyp_l.l"
-{BEGIN STATE_STRING; return H_S;}
- YY_BREAK
-case 79:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 231 "hyp_l.l"
-{return H_SX;}
- YY_BREAK
-case 80:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 232 "hyp_l.l"
-{return H_SY;}
- YY_BREAK
-case 81:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 233 "hyp_l.l"
-{BEGIN STATE_STRING; return H_S1;}
- YY_BREAK
-case 82:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 3;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 234 "hyp_l.l"
-{return H_S1X;}
- YY_BREAK
-case 83:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 3;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 235 "hyp_l.l"
-{return H_S1Y;}
- YY_BREAK
-case 84:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 236 "hyp_l.l"
-{BEGIN STATE_STRING; return H_S2;}
- YY_BREAK
-case 85:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 3;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 237 "hyp_l.l"
-{return H_S2X;}
- YY_BREAK
-case 86:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 3;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 238 "hyp_l.l"
-{return H_S2Y;}
- YY_BREAK
-case 87:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 239 "hyp_l.l"
-{return H_T;}
- YY_BREAK
-case 88:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 240 "hyp_l.l"
-{return H_TC;}
- YY_BREAK
-case 89:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 17;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 241 "hyp_l.l"
-{return H_USE_DIE_FOR_METAL;}
- YY_BREAK
-case 90:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 242 "hyp_l.l"
-{BEGIN STATE_STRING; return H_V;}
- YY_BREAK
-case 91:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 243 "hyp_l.l"
-{return H_V_QM;}
- YY_BREAK
-case 92:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 3;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 244 "hyp_l.l"
-{return H_VAL;}
- YY_BREAK
-case 93:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 245 "hyp_l.l"
-{return H_W;}
- YY_BREAK
-case 94:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 246 "hyp_l.l"
-{return H_X;}
- YY_BREAK
-case 95:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 247 "hyp_l.l"
-{return H_X1;}
- YY_BREAK
-case 96:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 248 "hyp_l.l"
-{return H_X2;}
- YY_BREAK
-case 97:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 249 "hyp_l.l"
-{return H_XC;}
- YY_BREAK
-case 98:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 250 "hyp_l.l"
-{return H_Y;}
- YY_BREAK
-case 99:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 251 "hyp_l.l"
-{return H_Y1;}
- YY_BREAK
-case 100:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 252 "hyp_l.l"
-{return H_Y2;}
- YY_BREAK
-case 101:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 253 "hyp_l.l"
-{return H_YC;}
- YY_BREAK
-case 102:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 254 "hyp_l.l"
-{return H_Z;}
- YY_BREAK
-case 103:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 255 "hyp_l.l"
-{return H_ZL;}
- YY_BREAK
-case 104:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 4;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 256 "hyp_l.l"
-{return H_ZLEN;}
- YY_BREAK
-case 105:
-*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
-(yy_c_buf_p) = yy_cp = yy_bp + 2;
-YY_DO_BEFORE_ACTION; /* set up hyytext again */
-YY_RULE_SETUP
-#line 257 "hyp_l.l"
-{return H_ZW;}
- YY_BREAK
-/* Booleans */
-case 106:
-YY_RULE_SETUP
-#line 261 "hyp_l.l"
-{hyylval.boolval = 1; return H_BOOL; }
- YY_BREAK
-case 107:
-YY_RULE_SETUP
-#line 262 "hyp_l.l"
-{hyylval.boolval = 0; return H_BOOL; }
- YY_BREAK
-/* Floats */
-/* ordinary floating point numbers */
-case 108:
-YY_RULE_SETUP
-#line 267 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL); return H_FLOAT;}
- YY_BREAK
-/* floating point numbers with suffix, e,g. pF, nH */
-case 109:
-YY_RULE_SETUP
-#line 270 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e24; return H_FLOAT;}
- YY_BREAK
-case 110:
-YY_RULE_SETUP
-#line 271 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e21; return H_FLOAT;}
- YY_BREAK
-case 111:
-YY_RULE_SETUP
-#line 272 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e18; return H_FLOAT;}
- YY_BREAK
-case 112:
-YY_RULE_SETUP
-#line 273 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e15; return H_FLOAT;}
- YY_BREAK
-case 113:
-YY_RULE_SETUP
-#line 274 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e12; return H_FLOAT;}
- YY_BREAK
-case 114:
-YY_RULE_SETUP
-#line 275 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e9; return H_FLOAT;}
- YY_BREAK
-case 115:
-YY_RULE_SETUP
-#line 276 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e6; return H_FLOAT;}
- YY_BREAK
-case 116:
-YY_RULE_SETUP
-#line 277 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e3; return H_FLOAT;}
- YY_BREAK
-case 117:
-YY_RULE_SETUP
-#line 278 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e-3; return H_FLOAT;}
- YY_BREAK
-case 118:
-YY_RULE_SETUP
-#line 279 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e-6; return H_FLOAT;}
- YY_BREAK
-case 119:
-YY_RULE_SETUP
-#line 280 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e-9; return H_FLOAT;}
- YY_BREAK
-case 120:
-YY_RULE_SETUP
-#line 281 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e-12; return H_FLOAT;}
- YY_BREAK
-case 121:
-YY_RULE_SETUP
-#line 282 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e-15; return H_FLOAT;}
- YY_BREAK
-case 122:
-YY_RULE_SETUP
-#line 283 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e-18; return H_FLOAT;}
- YY_BREAK
-case 123:
-YY_RULE_SETUP
-#line 284 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e-21; return H_FLOAT;}
- YY_BREAK
-case 124:
-YY_RULE_SETUP
-#line 285 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL) * 1e-24; return H_FLOAT;}
- YY_BREAK
-/* floating point numbers in VERSION and PLANE_SEP have no suffix and are followed by optional comments */
-
-case 125:
-YY_RULE_SETUP
-#line 289 "hyp_l.l"
-{hyylval.floatval = strtod(hyytext, NULL); BEGIN STATE_COMMENT; return H_FLOAT;}
- YY_BREAK
-
-/* A positive integer is used only in polygon/polyline/polyvoid "ID = posint" */
-
-case 126:
-YY_RULE_SETUP
-#line 294 "hyp_l.l"
-{ BEGIN INITIAL; hyylval.intval = atoi(hyytext); return H_POSINT; }
- YY_BREAK
-
-/*
- * This is a workaround for syntactically incorrect .hyp files.
- * We accept the following constructs as representing an empty string:
- * NAME= L1=somelayer
- * NAME= )
- * NAME= }
- */
-
-case 127:
-YY_RULE_SETUP
-#line 306 "hyp_l.l"
-{ yyless(0); BEGIN INITIAL; hyylval.strval = pcb_strdup(""); return H_STRING; } /* emit empty string and reprocess */
- YY_BREAK
-
-
-case 128:
-YY_RULE_SETUP
-#line 311 "hyp_l.l"
-{return '{';}
- YY_BREAK
-case 129:
-YY_RULE_SETUP
-#line 313 "hyp_l.l"
-{BEGIN STATE_COMMENT_EOL; return '}';}
- YY_BREAK
-case 130:
-YY_RULE_SETUP
-#line 315 "hyp_l.l"
-{if (section == H_PADSTACK) BEGIN STATE_STRING; return '(';}
- YY_BREAK
-/* allow for comment after the closing bracket ) */
-case 131:
-YY_RULE_SETUP
-#line 318 "hyp_l.l"
-{BEGIN STATE_COMMENT_EOL; return ')';}
- YY_BREAK
-case 132:
-YY_RULE_SETUP
-#line 320 "hyp_l.l"
-{return ',';}
- YY_BREAK
-case 133:
-YY_RULE_SETUP
-#line 322 "hyp_l.l"
-{if ((section == H_VERSION) || (section == H_PLANE_SEP)) BEGIN STATE_FLOAT; return '=';}
- YY_BREAK
-/* string */
-case 134:
-YY_RULE_SETUP
-#line 325 "hyp_l.l"
-{
- /*
- * Commas are not allowed in strings in the padstack section
- * unless the string is enclosed in double quotes (").
- */
-
- if ((section == H_PADSTACK) && strchr(hyytext, ','))
- REJECT
- else
- {
- BEGIN INITIAL;
- hyylval.strval = pcb_strdup(hyytext);
- return H_STRING;
- }
- }
- YY_BREAK
-/* string in double quotes */
-case 135:
-YY_RULE_SETUP
-#line 342 "hyp_l.l"
-{BEGIN INITIAL; hyylval.strval = strunquote(hyytext); return H_STRING;}
- YY_BREAK
-case YY_STATE_EOF(INITIAL):
-case YY_STATE_EOF(STATE_STRING):
-case YY_STATE_EOF(STATE_POSINT):
-case YY_STATE_EOF(STATE_FLOAT):
-case YY_STATE_EOF(STATE_COMMENT):
-case YY_STATE_EOF(STATE_COMMENT_EOL):
-#line 344 "hyp_l.l"
-{yyterminate();}
- YY_BREAK
-/* have bison catch all unrecognized characters with parse errors */
-case 136:
-YY_RULE_SETUP
-#line 347 "hyp_l.l"
-{return hyytext[0];}
- YY_BREAK
-
-case 137:
-YY_RULE_SETUP
-#line 351 "hyp_l.l"
-YY_FATAL_ERROR( "flex scanner jammed" );
- YY_BREAK
-#line 2947 "hyp_l.c"
-
- case YY_END_OF_BUFFER:
- {
- /* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
-
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = (yy_hold_char);
- YY_RESTORE_YY_MORE_OFFSET
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
- {
- /* We're scanning a new file or input source. It's
- * possible that this happened because the user
- * just pointed hyyin at a new source and called
- * hyylex(). If so, then we have to assure
- * consistency between YY_CURRENT_BUFFER and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input source.
- */
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = hyyin;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
- }
-
- /* Note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
- { /* This was really a NUL. */
- yy_state_type yy_next_state;
-
- (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state( );
-
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
-
- yy_next_state = yy_try_NUL_trans( yy_current_state );
-
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++(yy_c_buf_p);
- yy_current_state = yy_next_state;
- goto yy_match;
- }
-
- else
- {
-/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
- yy_cp = (yy_c_buf_p);
- goto yy_find_action;
- }
- }
-
- else switch ( yy_get_next_buffer( ) )
- {
- case EOB_ACT_END_OF_FILE:
- {
- (yy_did_buffer_switch_on_eof) = 0;
-
- if ( hyywrap( ) )
- {
- /* Note: because we've taken care in
- * yy_get_next_buffer() to have set up
- * hyytext, we can now set up
- * yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * YY_NULL, it'll still work - another
- * YY_NULL will get returned.
- */
- (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
-
- yy_act = YY_STATE_EOF(YY_START);
- goto do_action;
- }
-
- else
- {
- if ( ! (yy_did_buffer_switch_on_eof) )
- YY_NEW_FILE;
- }
- break;
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) =
- (yytext_ptr) + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state( );
-
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- goto yy_match;
-
- case EOB_ACT_LAST_MATCH:
- (yy_c_buf_p) =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
-
- yy_current_state = yy_get_previous_state( );
-
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
-
- default:
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
- } /* end of scanning one token */
- } /* end of user's declarations */
-} /* end of hyylex */
-/* %ok-for-header */
-
-/* %if-c++-only */
-/* %not-for-header */
-
-/* %ok-for-header */
-
-/* %endif */
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- * EOB_ACT_LAST_MATCH -
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- * EOB_ACT_END_OF_FILE - end of file
- */
-/* %if-c-only */
-static int yy_get_next_buffer (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
- register int number_to_move, i;
- int ret_val;
-
- if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
- if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
- {
- /* We matched a single character, the EOB, so
- * treat this as a final EOF.
- */
- return EOB_ACT_END_OF_FILE;
- }
-
- else
- {
- /* We matched some text prior to the EOB, first
- * process it.
- */
- return EOB_ACT_LAST_MATCH;
- }
- }
-
- /* Try to read more data. */
-
- /* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
-
- for ( i = 0; i < number_to_move; ++i )
- *(dest++) = *(source++);
-
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
- /* don't do the read, it's not guaranteed to return an EOF,
- * just force an EOF
- */
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
-
- else
- {
- int num_to_read =
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
-
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
-
- YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-
- }
-
- if ( num_to_read > YY_READ_BUF_SIZE )
- num_to_read = YY_READ_BUF_SIZE;
-
- /* Read in more data. */
- YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), num_to_read );
-
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
-
- if ( (yy_n_chars) == 0 )
- {
- if ( number_to_move == YY_MORE_ADJ )
- {
- ret_val = EOB_ACT_END_OF_FILE;
- hyyrestart(hyyin );
- }
-
- else
- {
- ret_val = EOB_ACT_LAST_MATCH;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
- YY_BUFFER_EOF_PENDING;
- }
- }
-
- else
- ret_val = EOB_ACT_CONTINUE_SCAN;
-
- if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
- /* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) hyyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
- if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
- }
-
- (yy_n_chars) += number_to_move;
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
-
- (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
-
- return ret_val;
-}
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-/* %if-c-only */
-/* %not-for-header */
-
- static yy_state_type yy_get_previous_state (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-{
- register yy_state_type yy_current_state;
- register char *yy_cp;
-
-/* %% [15.0] code to get the start state into yy_current_state goes here */
- yy_current_state = (yy_start);
- yy_current_state += YY_AT_BOL();
-
- (yy_state_ptr) = (yy_state_buf);
- *(yy_state_ptr)++ = yy_current_state;
-
- for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
- {
-/* %% [16.0] code to find the next state goes here */
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 577 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- *(yy_state_ptr)++ = yy_current_state;
- }
-
- return yy_current_state;
-}
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- * next_state = yy_try_NUL_trans( current_state );
- */
-/* %if-c-only */
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-{
- register int yy_is_jam;
- /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
-
- register YY_CHAR yy_c = 1;
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 577 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 576);
- if ( ! yy_is_jam )
- *(yy_state_ptr)++ = yy_current_state;
-
- return yy_is_jam ? 0 : yy_current_state;
-}
-
-/* %if-c-only */
-
- static void yyunput (int c, register char * yy_bp )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-{
- register char *yy_cp;
-
- yy_cp = (yy_c_buf_p);
-
- /* undo effects of setting up hyytext */
- *yy_cp = (yy_hold_char);
-
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- /* +2 for EOB chars. */
- register yy_size_t number_to_move = (yy_n_chars) + 2;
- register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- register char *source =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
-
- while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
- *--dest = *--source;
-
- yy_cp += (int) (dest - source);
- yy_bp += (int) (dest - source);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
-
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
-
- *--yy_cp = (char) c;
-
-/* %% [18.0] update hyylineno here */
-
- if ( c == '\n' ){
- --hyylineno;
- }
-
- (yytext_ptr) = yy_bp;
- (yy_hold_char) = *yy_cp;
- (yy_c_buf_p) = yy_cp;
-}
-/* %if-c-only */
-
-/* %endif */
-
-/* %if-c-only */
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
- static int yyinput (void)
-#else
- static int input (void)
-#endif
-
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-{
- int c;
-
- *(yy_c_buf_p) = (yy_hold_char);
-
- if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
- {
- /* yy_c_buf_p now points to the character we want to return.
- * If this occurs *before* the EOB characters, then it's a
- * valid NUL; if not, then we've hit the end of the buffer.
- */
- if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
- /* This was really a NUL. */
- *(yy_c_buf_p) = '\0';
-
- else
- { /* need more input */
- yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
- ++(yy_c_buf_p);
-
- switch ( yy_get_next_buffer( ) )
- {
- case EOB_ACT_LAST_MATCH:
- /* This happens because yy_g_n_b()
- * sees that we've accumulated a
- * token and flags that we need to
- * try matching the token before
- * proceeding. But for input(),
- * there's no matching to consider.
- * So convert the EOB_ACT_LAST_MATCH
- * to EOB_ACT_END_OF_FILE.
- */
-
- /* Reset buffer status. */
- hyyrestart(hyyin );
-
- /*FALLTHROUGH*/
-
- case EOB_ACT_END_OF_FILE:
- {
- if ( hyywrap( ) )
- return EOF;
-
- if ( ! (yy_did_buffer_switch_on_eof) )
- YY_NEW_FILE;
-#ifdef __cplusplus
- return yyinput();
-#else
- return input();
-#endif
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) = (yytext_ptr) + offset;
- break;
- }
- }
- }
-
- c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve hyytext */
- (yy_hold_char) = *++(yy_c_buf_p);
-
-/* %% [19.0] update BOL and hyylineno */
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
- if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
-
- hyylineno++;
-;
-
- return c;
-}
-/* %if-c-only */
-#endif /* ifndef YY_NO_INPUT */
-/* %endif */
-
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- *
- * @note This function does not reset the start condition to @c INITIAL .
- */
-/* %if-c-only */
- void hyyrestart (FILE * input_file )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-{
-
- if ( ! YY_CURRENT_BUFFER ){
- hyyensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- hyy_create_buffer(hyyin,YY_BUF_SIZE );
- }
-
- hyy_init_buffer(YY_CURRENT_BUFFER,input_file );
- hyy_load_buffer_state( );
-}
-
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- *
- */
-/* %if-c-only */
- void hyy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-{
-
- /* TODO. We should be able to replace this entire function body
- * with
- * hyypop_buffer_state();
- * hyypush_buffer_state(new_buffer);
- */
- hyyensure_buffer_stack ();
- if ( YY_CURRENT_BUFFER == new_buffer )
- return;
-
- if ( YY_CURRENT_BUFFER )
- {
- /* Flush out information for old buffer. */
- *(yy_c_buf_p) = (yy_hold_char);
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
-
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
- hyy_load_buffer_state( );
-
- /* We don't actually know whether we did this switch during
- * EOF (hyywrap()) processing, but the only time this flag
- * is looked at is after hyywrap() is called, so it's safe
- * to go ahead and always set it.
- */
- (yy_did_buffer_switch_on_eof) = 1;
-}
-
-/* %if-c-only */
-static void hyy_load_buffer_state (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-{
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- hyyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
- (yy_hold_char) = *(yy_c_buf_p);
-}
-
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- *
- * @return the allocated buffer state.
- */
-/* %if-c-only */
- YY_BUFFER_STATE hyy_create_buffer (FILE * file, int size )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-{
- YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) hyyalloc(sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in hyy_create_buffer()" );
-
- b->yy_buf_size = size;
-
- /* yy_ch_buf has to be 2 characters longer than the size given because
- * we need to put in 2 end-of-buffer characters.
- */
- b->yy_ch_buf = (char *) hyyalloc(b->yy_buf_size + 2 );
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in hyy_create_buffer()" );
-
- b->yy_is_our_buffer = 1;
-
- hyy_init_buffer(b,file );
-
- return b;
-}
-
-/** Destroy the buffer.
- * @param b a buffer created with hyy_create_buffer()
- *
- */
-/* %if-c-only */
- void hyy_delete_buffer (YY_BUFFER_STATE b )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-{
-
- if ( ! b )
- return;
-
- if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
- YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
-
- if ( b->yy_is_our_buffer )
- hyyfree((void *) b->yy_ch_buf );
-
- hyyfree((void *) b );
-}
-
-/* Initializes or reinitializes a buffer.
- * This function is sometimes called more than once on the same buffer,
- * such as during a hyyrestart() or at EOF.
- */
-/* %if-c-only */
- static void hyy_init_buffer (YY_BUFFER_STATE b, FILE * file )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-
-{
- int oerrno = errno;
-
- hyy_flush_buffer(b );
-
- b->yy_input_file = file;
- b->yy_fill_buffer = 1;
-
- /* If b is the current buffer, then hyy_init_buffer was _probably_
- * called from hyyrestart() or through yy_get_next_buffer.
- * In that case, we don't want to reset the lineno or column.
- */
- if (b != YY_CURRENT_BUFFER){
- b->yy_bs_lineno = 1;
- b->yy_bs_column = 0;
- }
-
-/* %if-c-only */
-
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
-/* %endif */
-/* %if-c++-only */
-/* %endif */
- errno = oerrno;
-}
-
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- *
- */
-/* %if-c-only */
- void hyy_flush_buffer (YY_BUFFER_STATE b )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-{
- if ( ! b )
- return;
-
- b->yy_n_chars = 0;
-
- /* We always need two end-of-buffer characters. The first causes
- * a transition to the end-of-buffer state. The second causes
- * a jam in that state.
- */
- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
- b->yy_buf_pos = &b->yy_ch_buf[0];
-
- b->yy_at_bol = 1;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- if ( b == YY_CURRENT_BUFFER )
- hyy_load_buffer_state( );
-}
-
-/* %if-c-or-c++ */
-/** Pushes the new state onto the stack. The new state becomes
- * the current state. This function will allocate the stack
- * if necessary.
- * @param new_buffer The new state.
- *
- */
-/* %if-c-only */
-void hyypush_buffer_state (YY_BUFFER_STATE new_buffer )
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-{
- if (new_buffer == NULL)
- return;
-
- hyyensure_buffer_stack();
-
- /* This block is copied from hyy_switch_to_buffer. */
- if ( YY_CURRENT_BUFFER )
- {
- /* Flush out information for old buffer. */
- *(yy_c_buf_p) = (yy_hold_char);
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
-
- /* Only push if top exists. Otherwise, replace top. */
- if (YY_CURRENT_BUFFER)
- (yy_buffer_stack_top)++;
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
- /* copied from hyy_switch_to_buffer. */
- hyy_load_buffer_state( );
- (yy_did_buffer_switch_on_eof) = 1;
-}
-/* %endif */
-
-/* %if-c-or-c++ */
-/** Removes and deletes the top of the stack, if present.
- * The next element becomes the new top.
- *
- */
-/* %if-c-only */
-void hyypop_buffer_state (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-{
- if (!YY_CURRENT_BUFFER)
- return;
-
- hyy_delete_buffer(YY_CURRENT_BUFFER );
- YY_CURRENT_BUFFER_LVALUE = NULL;
- if ((yy_buffer_stack_top) > 0)
- --(yy_buffer_stack_top);
-
- if (YY_CURRENT_BUFFER) {
- hyy_load_buffer_state( );
- (yy_did_buffer_switch_on_eof) = 1;
- }
-}
-/* %endif */
-
-/* %if-c-or-c++ */
-/* Allocates the stack if it does not exist.
- * Guarantees space for at least one push.
- */
-/* %if-c-only */
-static void hyyensure_buffer_stack (void)
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-{
- yy_size_t num_to_alloc;
-
- if (!(yy_buffer_stack)) {
-
- /* First allocation is just for 2 elements, since we don't know if this
- * scanner will even need a stack. We use 2 instead of 1 to avoid an
- * immediate realloc on the next call.
- */
- num_to_alloc = 1;
- (yy_buffer_stack) = (struct yy_buffer_state**)hyyalloc
- (num_to_alloc * sizeof(struct yy_buffer_state*)
- );
- if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in hyyensure_buffer_stack()" );
-
- memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
- (yy_buffer_stack_max) = num_to_alloc;
- (yy_buffer_stack_top) = 0;
- return;
- }
-
- if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
-
- /* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
-
- num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)hyyrealloc
- ((yy_buffer_stack),
- num_to_alloc * sizeof(struct yy_buffer_state*)
- );
- if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in hyyensure_buffer_stack()" );
-
- /* zero only the new slots.*/
- memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
- (yy_buffer_stack_max) = num_to_alloc;
- }
-}
-/* %endif */
-
-/* %if-c-only */
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- *
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE hyy_scan_buffer (char * base, yy_size_t size )
-{
- YY_BUFFER_STATE b;
-
- if ( size < 2 ||
- base[size-2] != YY_END_OF_BUFFER_CHAR ||
- base[size-1] != YY_END_OF_BUFFER_CHAR )
- /* They forgot to leave room for the EOB's. */
- return 0;
-
- b = (YY_BUFFER_STATE) hyyalloc(sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in hyy_scan_buffer()" );
-
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
- b->yy_buf_pos = b->yy_ch_buf = base;
- b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
- b->yy_n_chars = b->yy_buf_size;
- b->yy_is_interactive = 0;
- b->yy_at_bol = 1;
- b->yy_fill_buffer = 0;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- hyy_switch_to_buffer(b );
-
- return b;
-}
-/* %endif */
-
-/* %if-c-only */
-/** Setup the input buffer state to scan a string. The next call to hyylex() will
- * scan from a @e copy of @a str.
- * @param yystr a NUL-terminated string to scan
- *
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- * hyy_scan_bytes() instead.
- */
-YY_BUFFER_STATE hyy_scan_string (yyconst char * yystr )
-{
-
- return hyy_scan_bytes(yystr,strlen(yystr) );
-}
-/* %endif */
-
-/* %if-c-only */
-/** Setup the input buffer state to scan the given bytes. The next call to hyylex() will
- * scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
- *
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE hyy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
-{
- YY_BUFFER_STATE b;
- char *buf;
- yy_size_t n;
- yy_size_t i;
-
- /* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
- buf = (char *) hyyalloc(n );
- if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in hyy_scan_bytes()" );
-
- for ( i = 0; i < _yybytes_len; ++i )
- buf[i] = yybytes[i];
-
- buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
-
- b = hyy_scan_buffer(buf,n );
- if ( ! b )
- YY_FATAL_ERROR( "bad buffer in hyy_scan_bytes()" );
-
- /* It's okay to grow etc. this buffer, and we should throw it
- * away when we're done.
- */
- b->yy_is_our_buffer = 1;
-
- return b;
-}
-/* %endif */
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-/* %if-c-only */
-static void yy_fatal_error (yyconst char* msg )
-{
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
-}
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up hyytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- hyytext[hyyleng] = (yy_hold_char); \
- (yy_c_buf_p) = hyytext + yyless_macro_arg; \
- (yy_hold_char) = *(yy_c_buf_p); \
- *(yy_c_buf_p) = '\0'; \
- hyyleng = yyless_macro_arg; \
- } \
- while ( 0 )
-
-/* Accessor methods (get/set functions) to struct members. */
-
-/* %if-c-only */
-/* %if-reentrant */
-/* %endif */
-
-/** Get the current line number.
- *
- */
-int hyyget_lineno (void)
-{
-
- return hyylineno;
-}
-
-/** Get the input stream.
- *
- */
-FILE *hyyget_in (void)
-{
- return hyyin;
-}
-
-/** Get the output stream.
- *
- */
-FILE *hyyget_out (void)
-{
- return hyyout;
-}
-
-/** Get the length of the current token.
- *
- */
-yy_size_t hyyget_leng (void)
-{
- return hyyleng;
-}
-
-/** Get the current token.
- *
- */
-
-char *hyyget_text (void)
-{
- return hyytext;
-}
-
-/* %if-reentrant */
-/* %endif */
-
-/** Set the current line number.
- * @param line_number
- *
- */
-void hyyset_lineno (int line_number )
-{
-
- hyylineno = line_number;
-}
-
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- *
- * @see hyy_switch_to_buffer
- */
-void hyyset_in (FILE * in_str )
-{
- hyyin = in_str ;
-}
-
-void hyyset_out (FILE * out_str )
-{
- hyyout = out_str ;
-}
-
-int hyyget_debug (void)
-{
- return hyy_flex_debug;
-}
-
-void hyyset_debug (int bdebug )
-{
- hyy_flex_debug = bdebug ;
-}
-
-/* %endif */
-
-/* %if-reentrant */
-/* %if-bison-bridge */
-/* %endif */
-/* %endif if-c-only */
-
-/* %if-c-only */
-static int yy_init_globals (void)
-{
- /* Initialization is the same as for the non-reentrant scanner.
- * This function is called from hyylex_destroy(), so don't allocate here.
- */
-
- /* We do not touch hyylineno unless the option is enabled. */
- hyylineno = 1;
-
- (yy_buffer_stack) = 0;
- (yy_buffer_stack_top) = 0;
- (yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = (char *) 0;
- (yy_init) = 0;
- (yy_start) = 0;
-
- (yy_state_buf) = 0;
- (yy_state_ptr) = 0;
- (yy_full_match) = 0;
- (yy_lp) = 0;
-
-/* Defined in main.c */
-#ifdef YY_STDINIT
- hyyin = stdin;
- hyyout = stdout;
-#else
- hyyin = (FILE *) 0;
- hyyout = (FILE *) 0;
-#endif
-
- /* For future reference: Set errno on error, since we are called by
- * hyylex_init()
- */
- return 0;
-}
-/* %endif */
-
-/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
-/* hyylex_destroy is for both reentrant and non-reentrant scanners. */
-int hyylex_destroy (void)
-{
-
- /* Pop the buffer stack, destroying each element. */
- while(YY_CURRENT_BUFFER){
- hyy_delete_buffer(YY_CURRENT_BUFFER );
- YY_CURRENT_BUFFER_LVALUE = NULL;
- hyypop_buffer_state();
- }
-
- /* Destroy the stack itself. */
- hyyfree((yy_buffer_stack) );
- (yy_buffer_stack) = NULL;
-
- hyyfree ( (yy_state_buf) );
- (yy_state_buf) = NULL;
-
- /* Reset the globals. This is important in a non-reentrant scanner so the next time
- * hyylex() is called, initialization will occur. */
- yy_init_globals( );
-
-/* %if-reentrant */
-/* %endif */
- return 0;
-}
-/* %endif */
-
-/*
- * Internal utility routines.
- */
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
-{
- register int i;
- for ( i = 0; i < n; ++i )
- s1[i] = s2[i];
-}
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
-{
- register int n;
- for ( n = 0; s[n]; ++n )
- ;
-
- return n;
-}
-#endif
-
-void *hyyalloc (yy_size_t size )
-{
- return (void *) malloc( size );
-}
-
-void *hyyrealloc (void * ptr, yy_size_t size )
-{
- /* The cast to (char *) in the following accommodates both
- * implementations that use char* generic pointers, and those
- * that use void* generic pointers. It works with the latter
- * because both ANSI C and C++ allow castless assignment from
- * any pointer type to void*, and deal with argument conversions
- * as though doing an assignment.
- */
- return (void *) realloc( (char *) ptr, size );
-}
-
-void hyyfree (void * ptr )
-{
- free( (char *) ptr ); /* see hyyrealloc() for (char *) cast */
-}
-
-/* %if-tables-serialization definitions */
-/* %define-yytables The name for this specific scanner's tables. */
-#define YYTABLES_NAME "yytables"
-/* %endif */
-
-/* %ok-for-header */
-
-#line 350 "hyp_l.l"
-
-
-
- /*
- * copy a quoted string.
- * e.g. "data 0" -> data 0
- * a double quote inside the string can be escaped by writing two consecutive double quotes
- * e.g. "net ""hi""" -> net "hi"
- */
-
- char *strunquote(const char *src)
- {
- char* dst;
- size_t len = strlen(src) + 1;
- dst = (char *)malloc(len);
- if (dst != NULL)
- {
- char* p = (char *)src + 1; /* first char after initial quote */
- char* q = dst;
- do
- if (*p == '"') p++;
- while ((*q++ = *p++) != '\0');
- }
- return dst;
- }
-
- /* not truncated */
-
Index: src_plugins/import_hyp/README
===================================================================
--- src_plugins/import_hyp/README (revision 7963)
+++ src_plugins/import_hyp/README (nonexistent)
@@ -1,5 +0,0 @@
-Import plugin for hyperlynx geometry.
-
-#state: WIP
-#default: disable
-#implements: import
Index: src_plugins/import_hyp/parser.c
===================================================================
--- src_plugins/import_hyp/parser.c (revision 7963)
+++ src_plugins/import_hyp/parser.c (nonexistent)
@@ -1,2433 +0,0 @@
-/*
- * read hyperlynx files
- * Copyright 2016 Koen De Vleeschauwer.
- *
- * This file is part of pcb-rnd.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-/*
- * ~/.indent.pro:
- * --line-length128 -brs -br -nce --tab-size2 -ut -npsl -npcs -hnl
- * ~/.vimrc:
- * set tabstop=2
- */
-
-#include "parser.h"
-#include "hyp_l.h"
-#include "hyp_y.h"
-#include "error.h"
-#include "pcb-printf.h"
-#include "obj_all.h"
-#include "flag_str.h"
-#include "polygon.h"
-#include "board.h"
-#include "layer.h"
-#include "data.h"
-#include "search.h"
-#include "compat_misc.h"
-
-/*
- * the board is shared between all routines.
- */
-
-pcb_data_t *hyp_dest;
-
-/*
- * board outline is a linked list of arcs and line segments.
- */
-
-typedef struct outline_s {
- pcb_coord_t x1;
- pcb_coord_t y1;
- pcb_coord_t x2;
- pcb_coord_t y2;
- pcb_coord_t xc;
- pcb_coord_t yc;
- pcb_coord_t r;
- pcb_bool_t is_arc; /* arc or line */
- pcb_bool_t used; /* already included in outline */
- struct outline_s *next;
-} outline_t;
-
-outline_t *outline_head;
-outline_t *outline_tail;
-
-void hyp_set_origin(); /* set origin so all coordinates are positive */
-void hyp_perimeter(); /* add board outline to pcb */
-void hyp_create_polygons(); /* add all created polygons to pcb */
-void hyp_create_silkscreen(); /* add silkscreen outlines to all devices on board */
-void hyp_resize_board(); /* resize board to fit outline */
-unsigned int hyp_layer_flag(char *); /* set "solder side" flag if on bottom layer */
-
-/* layer creation */
-int layer_count;
-pcb_layer_id_t top_layer_id, bottom_layer_id;
-void hyp_reset_layers(); /* reset layer stack to minimun */
-pcb_layer_id_t hyp_create_layer(char *lname); /* create new copper layer at bottom of stack */
-
-int hyp_debug; /* logging on/off switch */
-
-/* Physical constants */
-double inches; /* inches to m */
-double copper_imperial_weight; /* metal thickness in ounces/ft2 */
-double copper_metric_weight; /* metal thickness in grams/cm2 */
-double copper_bulk_resistivity; /* metal resistivity in ohm meter */
-double copper_temperature_coefficient; /* temperature coefficient of bulk resistivity */
-double fr4_epsilon_r; /* dielectric constant of substrate */
-double fr4_loss_tangent; /* loss tangent of substrate */
-double conformal_epsilon_r; /* dielectric constant of conformal coating */
-
-/* Hyperlynx UNIT and OPTIONS */
-double unit; /* conversion factor: pcb length units to meters */
-double metal_thickness_unit; /* conversion factor: metal thickness to meters */
-
-pcb_bool use_die_for_metal; /* use dielectric constant and loss tangent of dielectric for metal layers */
-
-pcb_coord_t board_clearance; /* distance between PLANE polygon and copper of different nets; -1 if not set */
-
-/* stackup */
-pcb_bool layer_is_plane[PCB_MAX_LAYER]; /* whether layer is signal or plane layer */
-pcb_coord_t layer_clearance[PCB_MAX_LAYER]; /* separation between fill copper and signals on layer */
-
-/* net */
-char *net_name; /* name of current copper */
-pcb_coord_t net_clearance; /* distance between PLANE polygon and net copper */
-
-/* devices */
-
-typedef struct device_s {
- char *ref;
- char *name; /* optional */
- char *value; /* optional */
- char *layer_name;
- struct device_s *next;
-} device_t;
-
-device_t *device_head;
-
-/* padstack */
-
-typedef struct padstack_s {
- char *name;
- pcb_coord_t thickness;
- pcb_coord_t clearance;
- pcb_coord_t mask;
- pcb_coord_t drill_hole;
- pcb_flag_t flags; /* round, rectangular or octagon */
- struct padstack_s *next;
-} padstack_t;
-
-padstack_t *padstack_head;
-padstack_t *current_padstack;
-
- /* pads */
-pcb_element_t *component_side_pads;
-pcb_element_t *solder_side_pads;
-
- /* polygons */
-
- /* linked list to store correspondence between hyperlynx polygon id's and pcb polygons. */
-typedef struct hyp_polygon_s {
- int hyp_poly_id; /* hyperlynx polygon/polyline id */
- pcb_polygon_t *polygon;
- pcb_layer_t *layer;
- pcb_bool_t is_polygon; /* whether polygon or polyline */
- struct hyp_polygon_s *next;
-} hyp_polygon_t;
-
-hyp_polygon_t *polygon_head = NULL;
-
-/* keep track of current polygon */
-
-pcb_polygon_t *current_polygon = NULL;
-
-/* current polyline layer, position, width and clearance */
-pcb_layer_t *current_polyline_layer = NULL;
-pcb_coord_t current_polyline_xpos = 0;
-pcb_coord_t current_polyline_ypos = 0;
-pcb_coord_t current_polyline_width = 0;
-pcb_coord_t current_polyline_clearance = 0;
-
-/* State machine for polygon parsing:
- * HYP_POLYIDLE idle
- * HYP_POLYGON parsing a polygon
- * HYP_POLYLINE parsing a polyline (sequence of lines and arcs)
- * HYP_POLYGON_HOLE parsing a hole in a polygon
- * HYP_POLYLINE_HOLE parsing a hole in a polyline
- */
-
-enum poly_state_e { HYP_POLYIDLE, HYP_POLYGON, HYP_POLYLINE, HYP_POLYGON_HOLE, HYP_POLYLINE_HOLE };
-enum poly_state_e poly_state = HYP_POLYIDLE;
-
-/* origin. Chosen so all coordinates are positive. */
-pcb_coord_t origin_x;
-pcb_coord_t origin_y;
-
-/*
- * Conversion from hyperlynx to pcb_coord_t
- */
-
-/* meter to pcb_coord_t */
-
-pcb_coord_t inline m2coord(double m)
-{
- return ((pcb_coord_t) PCB_MM_TO_COORD(1000.0 * m));
-}
-
-/* xy coordinates to pcb_coord_t, without offset */
-
-pcb_coord_t inline xy2coord(double f)
-{
- return (m2coord(unit * f));
-}
-
-
-/* x coordinates to pcb_coord_t, with offset */
-
-pcb_coord_t inline x2coord(double f)
-{
- return (m2coord(unit * f) - origin_x);
-}
-
-/* y coordinates to pcb_coord_t, with offset */
-
-pcb_coord_t inline y2coord(double f)
-{
- return (origin_y - m2coord(unit * f));
-}
-
-/* z coordinates to pcb_coord_t. No offset needed. */
-
-pcb_coord_t inline z2coord(double f)
-{
- return (m2coord(metal_thickness_unit * f));
-}
-
-/*
- * initialize physical constants
- */
-
-void hyp_init(void)
-{
- int n;
-
- unit = 1;
- metal_thickness_unit = 1;
- use_die_for_metal = pcb_false;
-
- inches = 0.0254; /* inches to m */
- copper_imperial_weight = 1.341; /* metal thickness in ounces/ft2. 1 oz/ft2 copper = 1.341 mil */
- copper_metric_weight = 0.1116; /* metal thickness in grams/cm2. 1 gr/cm2 copper = 0.1116 cm */
- copper_bulk_resistivity = 1.724e-8;
- copper_temperature_coefficient = 0.00393;
- fr4_epsilon_r = 4.3;
- fr4_loss_tangent = 0.020;
- conformal_epsilon_r = 3.3; /* dielectric constant of conformal layer */
- board_clearance = -1; /* distance between PLANE polygon and copper of different nets; -1 if not set */
-
- /* empty board outline */
- outline_head = NULL;
- outline_tail = NULL;
-
- /* clear layer info */
- for (n = 1; n < PCB_MAX_LAYER; n++) {
- layer_is_plane[n] = pcb_false; /* signal layer */
- layer_clearance[n] = -1; /* no separation between fill copper and signals on layer */
- }
- layer_count = 0;
- top_layer_id = -1;
- bottom_layer_id = -1;
-
- /* clear padstack */
- padstack_head = NULL;
- current_padstack = NULL;
-
- /* clear devices */
- device_head = NULL;
-
- /* clear pads */
- component_side_pads = NULL;
- solder_side_pads = NULL;
-
- /* clear polygon data */
- polygon_head = NULL;
- current_polygon = NULL;
- poly_state = HYP_POLYIDLE;
-
- /* clear polyline data */
- current_polyline_layer = NULL;
- current_polyline_xpos = 0;
- current_polyline_ypos = 0;
- current_polyline_width = 0;
- current_polyline_clearance = 0;
-
- /* set origin */
- origin_x = 0;
- origin_y = 0;
-
- return;
-}
-
-/*
- * called by pcb-rnd to load hyperlynx file
- */
-
-int hyp_parse(pcb_data_t * dest, const char *fname, int debug)
-{
- int retval;
-
- /* set debug levels */
- hyyset_debug(debug > 2); /* switch flex logging on */
- hyydebug = (debug > 1); /* switch bison logging on */
- hyp_debug = (debug > 0); /* switch hyperlynx logging on */
-
- hyp_init();
-
- hyp_reset_layers();
-
- /* set shared board */
- hyp_dest = dest;
-
- /* parse hyperlynx file */
- hyyin = fopen(fname, "r");
- if (hyyin == NULL)
- return (1);
- retval = hyyparse();
- fclose(hyyin);
-
- /* finish setting up polygons */
- hyp_create_polygons();
-
- /* create device outlines */
- hyp_create_silkscreen();
-
- /* add board outline last */
- hyp_perimeter();
-
- /* clear */
- hyp_dest = NULL;
-
- return (retval);
-}
-
-/* print error message */
-void hyp_error(const char *msg)
-{
- pcb_message(PCB_MSG_DEBUG, "line %d: %s at '%s'\n", hyylineno, msg, hyytext);
-}
-
-/*
- * find padstack by name
- */
-
-padstack_t *hyp_padstack_by_name(char *padstack_name)
-{
- padstack_t *i;
- for (i = padstack_head; i != NULL; i = i->next)
- if (strcmp(i->name, padstack_name) == 0)
- return i;
- return NULL;
-}
-
-/*
- * find hyperlynx device by name
- */
-
-device_t *hyp_device_by_name(char *device_name)
-{
- device_t *i;
- for (i = device_head; i != NULL; i = i->next)
- if (strcmp(i->ref, device_name) == 0)
- return i;
- return NULL;
-}
-
-/*
- * create pcb element by name
- * parameters: name, (x, y) coordinates of element text.
- */
-
-pcb_element_t *hyp_create_element_by_name(char *element_name, pcb_coord_t x, pcb_coord_t y)
-{
- pcb_element_t *elem;
- pcb_flag_t flags;
- pcb_uint8_t text_direction = 0;
- int text_scale = 100;
-
- flags = pcb_no_flags();
- /* does the device already exist? */
- elem = pcb_search_elem_by_name(hyp_dest, element_name);
- if (elem == NULL) {
- /* device needs to be created. Search in DEVICE records. */
- device_t *dev = hyp_device_by_name(element_name);
- if (dev != NULL) {
- /* device on component or solder side? */
- flags = pcb_flag_add(flags, hyp_layer_flag(dev->layer_name));
- /* create */
- if (hyp_debug)
- pcb_printf("creating device \"%s\".\n", dev->ref);
- elem =
- pcb_element_new(hyp_dest, NULL, pcb_font(PCB, 0, 1), flags, dev->name, dev->ref, dev->value, x, y, text_direction,
- text_scale, flags, pcb_false);
- }
- else {
- /* no device with this name exists, and no such device has been listed in a DEVICE record. Let's create the device anyhow so we can continue. Assume device is on component side. */
- pcb_printf("device \"%s\" not specified in DEVICE record. continuing.\n", element_name);
- elem =
- pcb_element_new(hyp_dest, NULL, pcb_font(PCB, 0, 1), flags, element_name, element_name, NULL, x, y,
- text_direction, text_scale, flags, pcb_false);
- }
- }
-
- return elem;
-}
-
-/*
- * add segment to board outline
- */
-
-void hyp_perimeter_segment_add(outline_t * s, pcb_bool_t forward)
-{
- pcb_layer_id_t outline_id;
- pcb_layer_t *outline_layer;
-
- /* get outline layer */
- outline_id = pcb_layer_by_name("outline");
- if (outline_id < 0) {
- pcb_printf("no outline layer.\n");
- return;
- }
- outline_layer = pcb_get_layer(outline_id);
- if (outline_layer == NULL) {
- pcb_printf("get outline layer failed.\n");
- return;
- }
-
- /* mark segment as used, so we don't use it twice */
- s->used = pcb_true;
-
- /* debugging */
- if (hyp_debug) {
- if (forward)
- pcb_printf("outline: fwd %s from (%ml, %ml) to (%ml, %ml)\n", s->is_arc ? "arc" : "line", s->x1, s->y1, s->x2, s->y2);
- else
- pcb_printf("outline: bwd %s from (%ml, %ml) to (%ml, %ml)\n", s->is_arc ? "arc" : "line", s->x2, s->y2, s->x1, s->y1); /* add segment back to front */
- }
-
- if (s->is_arc) {
- /* counterclockwise arc from (x1, y1) to (x2, y2) */
- hyp_arc_new(outline_layer, s->x1, s->y1, s->x2, s->y2, s->xc, s->yc, s->r, s->r, pcb_false, 1, 0, pcb_no_flags());
- }
- else
- /* line from (x1, y1) to (x2, y2) */
- pcb_line_new(outline_layer, s->x1, s->y1, s->x2, s->y2, 1, 0, pcb_no_flags());
-
- return;
-}
-
-/*
- * Check whether point (end_x, end_y) is connected to point (begin_x, begin_y) via un-used segment s and other un-used segments.
- */
-
-pcb_bool_t hyp_segment_connected(pcb_coord_t begin_x, pcb_coord_t begin_y, pcb_coord_t end_x, pcb_coord_t end_y, outline_t * s)
-{
- outline_t *i;
- pcb_bool_t connected;
-
- connected = (begin_x == end_x) && (begin_y == end_y); /* trivial case */
-
- if (!connected) {
- /* recursive descent */
- s->used = pcb_true;
-
- for (i = outline_head; i != NULL; i = i->next) {
- if (i->used)
- continue;
- if ((i->x1 == begin_x) && (i->y1 == begin_y)) {
- connected = ((i->x2 == end_x) && (i->y2 == end_y)) || hyp_segment_connected(i->x2, i->y2, end_x, end_y, i);
- if (connected)
- break;
- }
- /* try back-to-front */
- if ((i->x2 == begin_x) && (i->y2 == begin_y)) {
- connected = ((i->x1 == end_x) && (i->y1 == end_y)) || hyp_segment_connected(i->x1, i->y1, end_x, end_y, i);
- if (connected)
- break;
- }
- }
-
- s->used = pcb_false;
- }
-
- return connected;
-}
-
-/*
- * Sets (origin_x, origin_y)
- * Choose origin so that all coordinates are posive.
- */
-
-void hyp_set_origin()
-{
- outline_t *i;
-
- /* safe initial value */
- if (outline_head != NULL) {
- origin_x = outline_head->x1;
- origin_y = outline_head->y1;
- }
- else {
- origin_x = 0;
- origin_y = 0;
- }
-
- /* choose upper left corner of outline */
- for (i = outline_head; i != NULL; i = i->next) {
- /* set origin so all coordinates are positive */
- if (i->x1 < origin_x)
- origin_x = i->x1;
- if (i->x2 < origin_x)
- origin_x = i->x2;
- if (i->y1 > origin_y)
- origin_y = i->y1;
- if (i->y2 > origin_y)
- origin_y = i->y2;
- if (i->is_arc) {
- if (i->xc - i->r < origin_x)
- origin_x = i->xc - i->r;
- if (i->yc + i->r > origin_y)
- origin_y = i->yc + i->r;
- }
- }
-}
-
-/*
- * resize board to fit pcb outline.
- */
-
-void hyp_resize_board()
-{
- pcb_coord_t x_max, x_min, y_max, y_min;
- pcb_coord_t width, height;
- pcb_coord_t slack = PCB_MM_TO_COORD(1);
- outline_t *i;
-
- if (PCB == NULL)
- return;
- if (outline_head == NULL)
- return;
-
- x_min = x_max = outline_head->x1;
- y_min = y_max = outline_head->y1;
-
- for (i = outline_head; i != NULL; i = i->next) {
-
- x_max = max(x_max, i->x1);
- x_max = max(x_max, i->x2);
- y_max = max(y_max, i->y1);
- y_max = max(y_max, i->y2);
-
- x_min = min(x_min, i->x1);
- x_min = min(x_min, i->x2);
- y_min = min(y_min, i->y1);
- y_min = min(y_min, i->y2);
-
- if (i->is_arc) {
- x_max = max(x_max, i->xc + i->r);
- y_max = max(y_max, i->yc + i->r);
-
- x_min = min(x_min, i->xc - i->r);
- y_min = min(y_min, i->yc - i->r);
- }
- }
-
- width = max(PCB->MaxWidth, x_max - x_min + slack);
- height = max(PCB->MaxHeight, y_max - y_min + slack);
-
- /* resize if board too small */
- if ((width > PCB->MaxWidth) || (height > PCB->MaxHeight))
- pcb_board_resize(width, height);
-
- return;
-
-}
-
-/*
- * Draw board perimeter.
- * The first segment is part of the first polygon.
- * The first polygon of the board perimeter is positive, the rest are holes.
- * Segments do not necessarily occur in order.
- */
-
-void hyp_perimeter()
-{
- pcb_bool_t warn_not_closed;
- pcb_bool_t segment_found;
- pcb_bool_t polygon_closed;
- pcb_coord_t begin_x, begin_y, last_x, last_y;
- outline_t *i;
- outline_t *j;
-
- warn_not_closed = pcb_false;
-
- /* iterate over perimeter segments and adjust origin */
- for (i = outline_head; i != NULL; i = i->next) {
- /* set origin so all coordinates are positive */
- i->x1 = i->x1 - origin_x;
- i->y1 = origin_y - i->y1;
- i->x2 = i->x2 - origin_x;
- i->y2 = origin_y - i->y2;
- if (i->is_arc) {
- i->xc = i->xc - origin_x;
- i->yc = origin_y - i->yc;
- }
- }
-
- /* iterate over perimeter polygons */
- while (pcb_true) {
-
- /* find first free segment */
- for (i = outline_head; i != NULL; i = i->next)
- if (i->used == pcb_false)
- break;
-
- /* exit if no segments found */
- if (i == NULL)
- break;
-
- /* first point of polygon (begin_x, begin_y) */
- begin_x = i->x1;
- begin_y = i->y1;
-
- /* last point of polygon (last_x, last_y) */
- last_x = i->x2;
- last_y = i->y2;
-
- /* add segment */
- hyp_perimeter_segment_add(i, pcb_true);
-
- /* add polygon segments until the polygon is closed */
- polygon_closed = pcb_false;
- while (!polygon_closed) {
-
-#undef XXX
-#ifdef XXX
- pcb_printf("perimeter: last_x = %ml last_y = %ml\n", last_x, last_y);
- for (i = outline_head; i != NULL; i = i->next)
- if (!i->used)
- pcb_printf("perimeter segments available: %s from (%ml, %ml) to (%ml, %ml)\n", i->is_arc ? "arc " : "line", i->x1,
- i->y1, i->x2, i->y2);
-#endif
-
- /* find segment to add to current polygon */
- segment_found = pcb_false;
-
- /* XXX prefer closed polygon over open polyline */
-
- for (i = outline_head; i != NULL; i = i->next) {
- if (i->used)
- continue;
-
- if ((last_x == i->x1) && (last_y == i->y1)) {
- if (!hyp_segment_connected(i->x2, i->y2, begin_x, begin_y, i))
- continue; /* XXX Checkme */
- /* first point of segment is last point of current edge: add segment to edge */
- segment_found = pcb_true;
- hyp_perimeter_segment_add(i, pcb_true);
- last_x = i->x2;
- last_y = i->y2;
- }
- else if ((last_x == i->x2) && (last_y == i->y2)) {
- if (!hyp_segment_connected(i->x1, i->y1, begin_x, begin_y, i))
- continue; /* XXX Checkme */
- /* last point of segment is last point of current edge: add segment to edge back to front */
- segment_found = pcb_true;
- /* add segment back to front */
- hyp_perimeter_segment_add(i, pcb_false);
- last_x = i->x1;
- last_y = i->y1;
- }
- if (segment_found)
- break;
- }
- polygon_closed = (begin_x == last_x) && (begin_y == last_y);
- if (!polygon_closed && !segment_found)
- break; /* can't find anything suitable */
- }
- if (polygon_closed) {
- if (hyp_debug)
- pcb_printf("outline: closed\n");
- }
- else {
- if (hyp_debug)
- pcb_printf("outline: open\n");
- warn_not_closed = pcb_true;
- }
- }
-
- /* free segment memory */
- for (i = outline_head; i != NULL; i = j) {
- j = i->next;
- free(i);
- }
- outline_head = outline_tail = NULL;
-
- if (warn_not_closed)
- pcb_message(PCB_MSG_DEBUG, "warning: board outline not closed\n");
-
- return;
-}
-
-/*
- * silkscreen a simple box around an element
- */
-
-/* XXX check if all this can be done without looking inside element. easiest solution would be to put this in obj_elem.c */
-void hyp_element_silkscreen_new(pcb_data_t * Data, pcb_element_t * Element, pcb_font_t * Font)
-{
- pcb_coord_t x1, x2, y1, y2;
-
- /* get bounding box of device */
- x1 = Element->BoundingBox.X1;
- x2 = Element->BoundingBox.X2;
- y1 = Element->BoundingBox.Y1;
- y2 = Element->BoundingBox.Y2;
-
- /* draw rectangle around device on silkscreen */
- pcb_element_line_new(Element, x1, y1, x1, y2, 1);
- pcb_element_line_new(Element, x1, y2, x2, y2, 1);
- pcb_element_line_new(Element, x2, y2, x2, y1, 1);
- pcb_element_line_new(Element, x2, y1, x1, y1, 1);
-
- /* put part no. bottom left */
- PCB_ELEM_TEXT_REFDES(Element).X = x1;
- PCB_ELEM_TEXT_REFDES(Element).Y = y2;
-
- /* put description top left */
- PCB_ELEM_TEXT_DESCRIPTION(Element).X = x1;
- PCB_ELEM_TEXT_DESCRIPTION(Element).Y = y1;
-
- /* put value bottom right */
- PCB_ELEM_TEXT_VALUE(Element).X = x2;
- PCB_ELEM_TEXT_VALUE(Element).Y = y2;
-
- /* update */
- pcb_element_bbox(Data, Element, Font);
-
- return;
-}
-
-/*
- * create device outlines and clean up device reference text.
- * call after all devices have been created.
- */
-
-void hyp_create_silkscreen()
-{
- device_t *i;
- pcb_element_t *elem;
-
- for (i = device_head; i != NULL; i = i->next) {
- elem = pcb_search_elem_by_name(hyp_dest, i->ref);
- if (elem != NULL)
- hyp_element_silkscreen_new(hyp_dest, elem, pcb_font(PCB, 0, 1));
- }
-
- return;
-}
-
-/*
- * reset pcb layer stack
- */
-
-void hyp_reset_layers()
-{
-
- pcb_layer_id_t id = -1;
- pcb_layergrp_id_t gid = -1;
- pcb_layer_group_t *grp = NULL;
-
- pcb_layergrp_inhibit_inc();
-
- pcb_layers_reset();
-
- pcb_layer_group_setup_default(&PCB->LayerGroups);
-
- /* set up dual layer board: top and bottom copper and silk */
-
- id = -1;
- if (pcb_layergrp_list(PCB, PCB_LYT_SILK | PCB_LYT_TOP, &gid, 1) == 1)
- id = pcb_layer_create(gid, pcb_strdup("top silk"));
- if (id < 0)
- pcb_printf("failed to create top silk\n");
-
- id = -1;
- if (pcb_layergrp_list(PCB, PCB_LYT_SILK | PCB_LYT_BOTTOM, &gid, 1) == 1)
- id = pcb_layer_create(gid, pcb_strdup("bottom silk"));
- if (id < 0)
- pcb_printf("failed to create bottom silk\n");
-
- top_layer_id = -1;
- if (pcb_layergrp_list(PCB, PCB_LYT_COPPER | PCB_LYT_TOP, &gid, 1) == 1)
- top_layer_id = pcb_layer_create(gid, NULL);
- if (top_layer_id < 0)
- pcb_printf("failed to create top copper\n");
-
- bottom_layer_id = -1;
- if (pcb_layergrp_list(PCB, PCB_LYT_COPPER | PCB_LYT_BOTTOM, &gid, 1) == 1)
- bottom_layer_id = pcb_layer_create(gid, NULL);
- if (bottom_layer_id < 0)
- pcb_printf("failed to create bottom copper\n");
-
- /* create outline layer */
-
- id = -1;
- grp = pcb_get_grp_new_intern(PCB, -1);
- if (grp != NULL) {
- id = pcb_layer_create(grp - PCB->LayerGroups.grp, "outline");
- pcb_layergrp_fix_turn_to_outline(grp);
- }
- if (id < 0)
- pcb_printf("failed to create outline\n");
-
- pcb_layergrp_inhibit_dec();
-
- return;
-}
-
-/*
- * Returns the pcb_layer_id of layer "lname".
- * If layer lname does not exist, a new copper layer with name "lname" is created.
- * If the layer name is NULL, a new copper layer with a new, unused layer name is created.
- */
-
-pcb_layer_id_t hyp_create_layer(char *lname)
-{
- pcb_layer_id_t layer_id;
- pcb_layergrp_id_t gid;
- pcb_layer_group_t *grp;
- char new_layer_name[PCB_MAX_LAYER];
- int n;
-
- layer_id = -1;
- if (lname != NULL) {
- /* we have a layer name. check whether layer already exists */
- layer_id = pcb_layer_by_name(lname);
- if (layer_id >= 0)
- return layer_id; /* found. return existing layer. */
- }
- else {
- /* no layer name given. find unused layer name in range 1..PCB_MAX_LAYER */
- for (n = 1; n < PCB_MAX_LAYER; n++) {
- pcb_sprintf(new_layer_name, "%i", n);
- if (pcb_layer_by_name(new_layer_name) < 0) {
- lname = new_layer_name;
- break;
- }
- }
- if (lname == NULL)
- return bottom_layer_id; /* no unused layer name available */
- }
-
- /* new layer */
-
- layer_count++;
- switch (layer_count) {
- case 1:
- /* rename top copper and return */
- pcb_layer_rename(top_layer_id, lname);
- return top_layer_id;
- break;
-
- case 2:
- /* rename bottom copper and return */
- pcb_layer_rename(bottom_layer_id, lname);
- return bottom_layer_id;
- break;
-
- default:
-
- /* create new bottom layer */
- pcb_layergrp_list(PCB, PCB_LYT_COPPER | PCB_LYT_BOTTOM, &gid, 1);
- layer_id = pcb_layer_create(gid, lname);
-
- /* check if new bottom layer valid */
- if (layer_id < 0) {
- /* layer creation failed. return old bottom layer. */
- if (hyp_debug)
- pcb_printf("running out of layers\n");
- return bottom_layer_id;
- }
-
- /* move old bottom layer to internal */
- grp = pcb_get_grp_new_intern(PCB, -1);
- pcb_layer_move_to_group(PCB, bottom_layer_id, grp - PCB->LayerGroups.grp);
-
- /* created layer becomes new bottom layer */
- bottom_layer_id = layer_id;
- return bottom_layer_id;
- }
-
- return bottom_layer_id;
-}
-
-/*
- * convert hyperlynx layer name to pcb layer
- */
-
-pcb_layer_t *hyp_get_layer(parse_param * h)
-{
- return pcb_get_layer(hyp_create_layer(h->layer_name));
-}
-
-/*
- * True if solder side
- */
-
-pcb_bool_t hyp_is_bottom_layer(char *layer_name)
-{
- return ((layer_name != NULL) && (pcb_layer_flags(pcb_layer_by_name(layer_name)) & PCB_LYT_BOTTOM));
-}
-
-/*
- * return PCB_FLAG_ONSOLDER if layer_name is name of bottom layer
- */
-
-unsigned int hyp_layer_flag(char *layer_name)
-{
- if ((layer_name != NULL) && (pcb_layer_flags(pcb_layer_by_name(layer_name)) & PCB_LYT_BOTTOM))
- return PCB_FLAG_ONSOLDER;
- else
- return PCB_FLAG_NO;
-}
-
-/*
- * create all polygons
- */
-
-void hyp_create_polygons()
-{
- hyp_polygon_t *i;
-
- /* loop over all created polygons and close them */
- for (i = polygon_head; i != NULL; i = i->next)
- if ((i->is_polygon) && (i->polygon != NULL) && (i->layer != NULL)) {
- pcb_add_polygon_on_layer(i->layer, i->polygon);
- pcb_poly_init_clip(hyp_dest, i->layer, i->polygon);
- }
- return;
-}
-
-/*
- * calculate hyperlynx-style clearance
- *
- * use plane_separation of, in order:
- * - this copper
- * - the net this copper belongs to
- * - the layer this copper is on
- * - the board
- * if neither copper, net, layer nor board have plane_separation set, do not set clearance.
- */
-
-pcb_coord_t hyp_clearance(parse_param * h)
-{
- pcb_coord_t clearance;
- pcb_layer_id_t layr_id;
-
- if (h->layer_name_set)
- layr_id = hyp_create_layer(h->layer_name);
- clearance = -1;
-
- if (h->plane_separation_set)
- clearance = xy2coord(h->plane_separation);
- else if (net_clearance >= 0)
- clearance = net_clearance;
- else if (h->layer_name_set && (layer_clearance[layr_id] >= 0))
- clearance = layer_clearance[layr_id];
- else if (board_clearance >= 0)
- clearance = board_clearance;
- else
- clearance = 0;
-
- return clearance;
-}
-
-/*
- * Draw arc from (x1, y1) to (x2, y2) with center (xc, yc) and radius r.
- * Direction of arc is clockwise or counter-clockwise, depending upon value of pcb_bool_t Clockwise.
- */
-
-pcb_arc_t *hyp_arc_new(pcb_layer_t * Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t XC,
- pcb_coord_t YC, pcb_coord_t Width, pcb_coord_t Height, pcb_bool_t Clockwise, pcb_coord_t Thickness,
- pcb_coord_t Clearance, pcb_flag_t Flags)
-{
- pcb_angle_t start_angle;
- pcb_angle_t end_angle;
- pcb_angle_t delta;
- pcb_arc_t *new_arc;
-
- if (Width < 1) {
- start_angle = 0.0;
- end_angle = 360.0;
- }
- else {
- /* note: y-axis points down */
- start_angle = 180 + 180 * atan2(YC - Y1, X1 - XC) / M_PI;
- end_angle = 180 + 180 * atan2(YC - Y2, X2 - XC) / M_PI;
- }
- start_angle = pcb_normalize_angle(start_angle);
- end_angle = pcb_normalize_angle(end_angle);
-
- if (Clockwise)
- while (start_angle < end_angle)
- start_angle += 360;
- else
- while (end_angle <= start_angle)
- end_angle += 360;
-
- delta = end_angle - start_angle;
-
-#undef XXX
-#ifdef XXX
- if (hyp_debug)
- pcb_printf("hyp_arc: start_angle: %f end_angle: %f delta: %f\n", start_angle, end_angle, delta);
-#endif
-
- new_arc = pcb_arc_new(Layer, XC, YC, Width, Height, start_angle, delta, Thickness, Clearance, Flags);
-
-#ifdef XXX
- /* XXX remove debugging code */
- if (hyp_debug) {
- pcb_coord_t x1, y1, x2, y2;
- pcb_arc_get_end(new_arc, 1, &x1, &y1);
- pcb_arc_get_end(new_arc, 0, &x2, &y2);
- pcb_printf("hyp_arc: start_point: (%ml, %ml) end_point: (%ml, %ml)\n", x1, y1, x2, y2);
- }
-#endif
-
- return new_arc;
-}
-
-/*
- * Draw an arc from (x1, y1) to (x2, y2) with center (xc, yc) and radius r using a polygonal approximation.
- * Arc may be clockwise or counterclockwise. Note pcb-rnd y-axis points downward.
- */
-
-void hyp_arc2poly(pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t xc, pcb_coord_t yc,
- pcb_coord_t r, pcb_bool_t clockwise)
-{
- pcb_coord_t arc_precision = PCB_MM_TO_COORD(0.254); /* mm */
- int min_circle_segments = 8; /* 8 seems minimal, 16 seems more than sufficient. */
- int segments;
- int poly_points = 0;
- int i;
-
- double alpha = atan2(y1 - yc, x1 - xc);
- double beta = atan2(y2 - yc, x2 - xc);
-
- if (clockwise) {
- /* draw arc clockwise from (x1,y1) to (x2,y2) */
- if (beta < alpha)
- beta = beta + 2 * M_PI;
- }
- else {
- /* draw arc counterclockwise from (x1,y1) to (x2,y2) */
- if (alpha < beta)
- alpha = alpha + 2 * M_PI;
- /* draw a circle if starting and end points are the same */
- if ((x1 == x2) && (y1 == y2))
- beta = alpha + 2 * M_PI;
- }
-
- /* Calculate number of segments needed for a full circle. */
- segments = min_circle_segments;
- if (arc_precision > 0) {
- /* Increase number of segments until difference between circular arc and polygonal approximation is less than max_arc_error */
- double arc_error;
- do {
- arc_error = r * (1 - cos(M_PI / segments));
- if (arc_error > arc_precision)
- segments += 4;
- }
- while (arc_error > arc_precision);
- }
- else if (arc_precision < 0)
- pcb_printf("error: negative arc precision\n");
-
- /* A full circle is drawn using 'segments' segments; a 90 degree arc using segments/4. */
- poly_points = pcb_round(segments * abs(beta - alpha) / (2 * M_PI));
-
- /* Sanity checks */
- if (poly_points < 1)
- poly_points = 1;
-
- /* first point */
- pcb_poly_point_new(current_polygon, x1, y1);
-
- /* intermediate points */
- for (i = 1; i < poly_points; i++) {
- double angle = alpha + (beta - alpha) * i / poly_points;
- pcb_coord_t x = xc + r * cos(angle);
- pcb_coord_t y = yc + r * sin(angle);
- pcb_poly_point_new(current_polygon, x, y);
- }
-
- /* last point */
- pcb_poly_point_new(current_polygon, x2, y2);
-
- return;
-}
-
-
-/* exec_* routines are called by parser to interpret hyperlynx file */
-
-/*
- * 'BOARD_FILE' record.
- */
-
-pcb_bool exec_board_file(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("board:\n");
-
- return 0;
-}
-
-/*
- * 'VERSION' record.
- * Specifies version number.
- */
-
-pcb_bool exec_version(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("version: vers = %f\n", h->vers);
-
- if (h->vers < 1.0)
- pcb_message(PCB_MSG_DEBUG, "warning: version 1.x deprecated\n");
-
- return 0;
-}
-
-/*
- * 'DATA_MODE' record.
- * If DATA_MODE is DETAILED, model can be used for power and signal simulation.
- * If DATA_MODE is SIMPLIFIED, model can be used for signal simulation only.
- */
-
-pcb_bool exec_data_mode(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("data_mode: detailed = %i\n", h->detailed);
-
- return 0;
-}
-
-/*
- * 'UNITS' record.
- * Specifies measurement system (english/metric) for the rest of the file.
- */
-
-pcb_bool exec_units(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("units: unit_system_english = %d metal_thickness_weight = %d\n", h->unit_system_english,
- h->metal_thickness_weight);
-
- /* convert everything to meter */
-
- if (h->unit_system_english) {
- unit = inches; /* lengths in inches. 1 in = 2.54 cm = 0.0254 m */
- if (h->metal_thickness_weight)
- metal_thickness_unit = copper_imperial_weight * unit; /* metal thickness in ounces/ft2. 1 oz/ft2 copper = 1.341 mil */
- else
- metal_thickness_unit = unit; /* metal thickness in inches */
- }
- else {
- unit = 0.01; /* lengths in centimeters. 1 cm = 0.01 m */
- if (h->metal_thickness_weight)
- metal_thickness_unit = copper_metric_weight * unit; /* metal thickness in grams/cm2. 1 gr/cm2 copper = 0.1116 cm */
- else
- metal_thickness_unit = unit; /* metal thickness in centimeters */
- }
-
- if (hyp_debug)
- pcb_printf("units: unit = %f metal_thickness_unit = %f\n", unit, metal_thickness_unit);
-
- return 0;
-}
-
-/*
- * 'PLANE_SEP' record.
- * Defines default trace to plane clearance.
- */
-
-pcb_bool exec_plane_sep(parse_param * h)
-{
- board_clearance = xy2coord(h->default_plane_separation);
-
- if (hyp_debug)
- pcb_printf("plane_sep: default_plane_separation = %ml\n", board_clearance);
-
- return 0;
-}
-
-/*
- * 'PERIMETER_SEGMENT' subrecord of 'BOARD' record.
- * Draws linear board outline segment from (x1, y1) to (x2, y2).
- */
-
-pcb_bool exec_perimeter_segment(parse_param * h)
-{
- outline_t *peri_seg;
-
- peri_seg = malloc(sizeof(outline_t));
-
- /* convert coordinates */
- peri_seg->x1 = xy2coord(h->x1);
- peri_seg->y1 = xy2coord(h->y1);
- peri_seg->x2 = xy2coord(h->x2);
- peri_seg->y2 = xy2coord(h->y2);
- peri_seg->xc = 0;
- peri_seg->yc = 0;
- peri_seg->r = 0;
- peri_seg->is_arc = pcb_false;
- peri_seg->used = pcb_false;
- peri_seg->next = NULL;
-
- if (hyp_debug)
- pcb_printf("perimeter_segment: x1 = %ml y1 = %ml x2 = %ml y2 = %ml\n", peri_seg->x1, peri_seg->y1, peri_seg->x2,
- peri_seg->y2);
-
- /* append at end of doubly linked list */
- if (outline_tail == NULL) {
- outline_head = peri_seg;
- outline_tail = peri_seg;
- }
- else {
- outline_tail->next = peri_seg;
- outline_tail = peri_seg;
- }
-
- /* set origin so all coordinates are positive */
- hyp_set_origin();
-
- /* resize board if too small to draw outline */
- hyp_resize_board();
-
- return 0;
-}
-
-/*
- * 'PERIMETER_ARC' subrecord of 'BOARD' record.
- * Draws arc segment of board outline.
- * Arc drawn counterclockwise from (x1, y1) to (x2, y2) with center (xc, yc) and radius r.
- */
-
-pcb_bool exec_perimeter_arc(parse_param * h)
-{
- outline_t *peri_arc;
-
- peri_arc = malloc(sizeof(outline_t));
-
- peri_arc->x1 = xy2coord(h->x1);
- peri_arc->y1 = xy2coord(h->y1);
- peri_arc->x2 = xy2coord(h->x2);
- peri_arc->y2 = xy2coord(h->y2);
- peri_arc->xc = xy2coord(h->xc);
- peri_arc->yc = xy2coord(h->yc);
- peri_arc->r = xy2coord(h->r);
- peri_arc->is_arc = pcb_true;
- peri_arc->used = pcb_false;
- peri_arc->next = NULL;
-
- if (hyp_debug)
- pcb_printf("perimeter_arc: x1 = %ml y1 = %ml x2 = %ml y2 = %ml xc = %ml yc = %ml r = %ml\n", peri_arc->x1, peri_arc->y1,
- peri_arc->x2, peri_arc->y2, peri_arc->xc, peri_arc->yc, peri_arc->r);
-
- /* append at end of doubly linked list */
- if (outline_tail == NULL) {
- outline_head = peri_arc;
- outline_tail = peri_arc;
- }
- else {
- outline_tail->next = peri_arc;
- outline_tail = peri_arc;
- }
-
- /* set origin so all coordinates are positive */
- hyp_set_origin();
-
- return 0;
-}
-
-/*
- * 'A' attribute subrecord of 'BOARD' record.
- * Defines board attributes as name/value pairs.
- */
-
-pcb_bool exec_board_attribute(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("board_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value);
-
- return 0;
-}
-
-/*
- * STACKUP section
- */
-
-/*
- * Debug output for layers
- */
-
-void hyp_debug_layer(parse_param * h)
-{
- if (hyp_debug) {
- if (h->thickness_set)
- pcb_printf(" thickness = %ml", z2coord(h->thickness));
- if (h->plating_thickness_set)
- pcb_printf(" plating_thickness = %ml", z2coord(h->plating_thickness));
- if (h->bulk_resistivity_set)
- pcb_printf(" bulk_resistivity = %f", h->bulk_resistivity);
- if (h->temperature_coefficient_set)
- pcb_printf(" temperature_coefficient = %f", h->temperature_coefficient);
- if (h->epsilon_r_set)
- pcb_printf(" epsilon_r = %f", h->epsilon_r);
- if (h->loss_tangent_set)
- pcb_printf(" loss_tangent = %f", h->loss_tangent);
- if (h->conformal_set)
- pcb_printf(" conformal = %i", h->conformal);
- if (h->prepreg_set)
- pcb_printf(" prepreg = %i", h->prepreg);
- if (h->layer_name_set)
- pcb_printf(" layer_name = \"%s\"", h->layer_name);
- if (h->material_name_set)
- pcb_printf(" material_name = \"%s\"", h->material_name);
- if (h->plane_separation_set)
- pcb_printf(" plane_separation = %ml", xy2coord(h->plane_separation));
- pcb_printf("\n");
- }
-
- return;
-}
-
-/*
- * 'OPTIONS' subrecord of 'STACKUP' record.
- * Defines dielectric constant and loss tangent of metal layers.
- */
-
-pcb_bool exec_options(parse_param * h)
-{
- /* Use dielectric for metal? */
- if (hyp_debug)
- pcb_printf("options: use_die_for_metal = %f\n", h->use_die_for_metal);
- if (h->use_die_for_metal)
- use_die_for_metal = pcb_true;
- return 0;
-}
-
-/*
- * SIGNAL subrecord of STACKUP record.
- * signal layer.
- */
-
-pcb_bool exec_signal(parse_param * h)
-{
- pcb_layer_id_t signal_layer_id;
- signal_layer_id = hyp_create_layer(h->layer_name);
-
- layer_is_plane[signal_layer_id] = pcb_false;
- if (h->plane_separation_set)
- layer_clearance[signal_layer_id] = xy2coord(h->plane_separation);
-
- if (hyp_debug)
- pcb_printf("signal layer: \"%s\"", pcb_layer_name(signal_layer_id));
- hyp_debug_layer(h);
-
- return 0;
-}
-
-/*
- * DIELECTRIC subrecord of STACKUP record.
- * dielectric layer
- */
-
-pcb_bool exec_dielectric(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("dielectric layer: ");
- hyp_debug_layer(h);
-
- return 0;
-}
-
-/*
- * PLANE subrecord of STACKUP record.
- * plane layer - a layer which is flooded with copper.
- */
-
-pcb_bool exec_plane(parse_param * h)
-{
- pcb_layer_id_t plane_layer_id;
- plane_layer_id = hyp_create_layer(h->layer_name);
-
- layer_is_plane[plane_layer_id] = pcb_true;
- if (h->plane_separation_set)
- layer_clearance[plane_layer_id] = xy2coord(h->plane_separation);
-
- /* XXX need to flood layer with copper */
-
- if (hyp_debug)
- pcb_printf("plane layer: \"%s\"", pcb_layer_name(plane_layer_id));
- hyp_debug_layer(h);
-
- return 0;
-}
-
-/*
- * DEVICE record.
- */
-
-pcb_bool exec_devices(parse_param * h)
-{
- device_t *new_device;
- char value[128];
-
- if (hyp_debug) {
- pcb_printf("device: device_type = \"%s\" ref = \"%s\"", h->device_type, h->ref);
- if (h->name_set)
- pcb_printf(" name = \"%s\"", h->name);
- if (h->value_float_set)
- pcb_printf(" value_float = %f", h->value_float);
- if (h->value_string_set)
- pcb_printf(" value_string = \"%s\"", h->value_string);
- if (h->layer_name_set)
- pcb_printf(" layer_name = \"%s\"", h->layer_name);
- if (h->package_set)
- pcb_printf(" package = \"%s\"", h->package);
- pcb_printf("\n");
- }
-
- /* add device to list */
- new_device = malloc(sizeof(device_t));
-
- new_device->ref = pcb_strdup(h->ref);
-
- new_device->name = NULL;
- if (h->name_set)
- new_device->name = pcb_strdup(h->name);
-
-
- new_device->value = NULL;
- if (h->value_string_set)
- new_device->value = pcb_strdup(h->value_string);
- else if (h->value_float_set) {
- /* convert double to string */
- pcb_snprintf(value, sizeof(value), "%f", h->value_float);
- new_device->value = pcb_strdup(value);
- }
-
- new_device->layer_name = NULL;
- if (h->layer_name_set)
- new_device->layer_name = pcb_strdup(h->layer_name);
-
- new_device->next = device_head;
- device_head = new_device;
-
- return 0;
-}
-
-/*
- * SUPPLY record.
- * marks nets as power supply.
- */
-
-pcb_bool exec_supplies(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("supplies: name = \"%s\" value_float = %f voltage_specified = %i conversion = %i\n", h->name, h->value_float,
- h->voltage_specified, h->conversion);
-
- return 0;
-}
-
-/*
- * PADSTACK record
- */
-
-pcb_bool exec_padstack_element(parse_param * h)
-{
- /*
- * Layer names with special meaning, used in padstack definition:
- * MDEF: defines copper pad on all metal layers
- * ADEF: defines anti-pad (clearance) on all power planes.
- */
-
- if (hyp_debug) {
- pcb_printf("padstack_element:");
- if (h->padstack_name_set)
- pcb_printf(" padstack_name = \"%s\"", h->padstack_name);
- if (h->drill_size_set)
- pcb_printf(" drill_size = %ml", xy2coord(h->drill_size));
- pcb_printf(" layer_name = \"%s\"", h->layer_name);
- pcb_printf(" pad_shape = %f", h->pad_shape);
- if (h->pad_shape == 0)
- pcb_printf(" oval");
- else if (h->pad_shape == 1)
- pcb_printf(" rectangular");
- else if (h->pad_shape == 2)
- pcb_printf(" oblong");
- else
- pcb_printf(" ?");
- pcb_printf(" pad_sx = %ml", xy2coord(h->pad_sx));
- pcb_printf(" pad_sy = %ml", xy2coord(h->pad_sy));
- pcb_printf(" pad_angle = %f", h->pad_angle);
- if (h->pad_type_set & (h->pad_type == PAD_TYPE_THERMAL_RELIEF)) {
- pcb_printf(" thermal_clear_shape = %f", h->thermal_clear_shape);
- if (h->thermal_clear_shape == 0)
- pcb_printf(" oval");
- else if (h->thermal_clear_shape == 1)
- pcb_printf(" rectangular");
- else if (h->thermal_clear_shape == 2)
- pcb_printf(" oblong");
- else
- pcb_printf(" ?");
- pcb_printf(" pad_sx = %ml", xy2coord(h->pad_sx));
- pcb_printf(" pad_sy = %ml", xy2coord(h->pad_sy));
- pcb_printf(" thermal_clear_sx = %ml", xy2coord(h->thermal_clear_sx));
- pcb_printf(" thermal_clear_sy = %ml", xy2coord(h->thermal_clear_sy));
- pcb_printf(" thermal_clear_angle = %f", h->thermal_clear_angle);
- }
- if (h->pad_type_set) {
- pcb_printf(" pad_type = ");
- switch (h->pad_type) {
- case PAD_TYPE_METAL:
- pcb_printf("metal");
- break;
- case PAD_TYPE_ANTIPAD:
- pcb_printf("antipad");
- break;
- case PAD_TYPE_THERMAL_RELIEF:
- pcb_printf("thermal_relief");
- break;
- default:
- pcb_printf("error");
- }
- }
- pcb_printf("\n");
- }
-
-
- /* XXX fixme. This reduces the padstack to a pcb_via_new call; a very basic approximation of what a padstack is. */
-
- if (h->padstack_name_set) {
- current_padstack = malloc(sizeof(padstack_t));
- if (current_padstack == NULL)
- return 1;
- current_padstack->name = pcb_strdup(h->padstack_name);
-
- if (h->pad_sx < h->pad_sy)
- current_padstack->thickness = xy2coord(h->pad_sx);
- else
- current_padstack->thickness = xy2coord(h->pad_sy);
-
- current_padstack->clearance = 0;
- current_padstack->mask = current_padstack->thickness;
- current_padstack->drill_hole = xy2coord(h->drill_size);
- if (h->pad_shape == 1)
- current_padstack->flags = pcb_flag_make(PCB_FLAG_SQUARE); /* rectangular */
- else if (h->pad_shape == 2)
- current_padstack->flags = pcb_flag_make(PCB_FLAG_OCTAGON); /* oblong */
- else
- current_padstack->flags = pcb_no_flags(); /* round */
- }
-
- if ((current_padstack != NULL) && h->pad_type_set & (h->pad_type == PAD_TYPE_THERMAL_RELIEF)) {
- current_padstack->clearance =
- (xy2coord(h->thermal_clear_sx) + xy2coord(h->thermal_clear_sy)) * 0.5 - current_padstack->thickness;
- if (current_padstack->clearance < 0)
- current_padstack->clearance = 0;
- }
-
- return 0;
-}
-
-
-pcb_bool exec_padstack_end(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("padstack_end\n");
-
- /* add current padstack to list of padstacks */
- if (current_padstack != NULL) {
- current_padstack->next = padstack_head;
- padstack_head = current_padstack;
- current_padstack = NULL;
- }
-
- return 0;
-}
-
-/*
- * NET record.
- */
-
-pcb_bool exec_net(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("net: net_name = \"%s\"\n", h->net_name);
-
- net_name = pcb_strdup(h->net_name);
- net_clearance = -1;
-
- return 0;
-}
-
-/*
- * PS subrecord of NET record. Plane separation.
- */
-
-pcb_bool exec_net_plane_separation(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("net_plane_separation: plane_separation = %ml\n", xy2coord(h->plane_separation));
-
- net_clearance = xy2coord(h->plane_separation);
-
- return 0;
-}
-
-/*
- * A subrecord of NET record. Attribute.
- */
-
-pcb_bool exec_net_attribute(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("net_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value);
-
- return 0;
-}
-
-/*
- * SEG subrecord of NET record. line segment.
- */
-
-pcb_bool exec_seg(parse_param * h)
-{
- if (hyp_debug) {
- pcb_printf("seg: x1 = %ml y1 = %ml x2 = %ml y2 = %ml ", x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2));
- pcb_printf(" width = %ml layer_name = \"%s\"", xy2coord(h->width), h->layer_name);
- if (h->plane_separation_set)
- pcb_printf(" plane_separation = %ml ", xy2coord(h->plane_separation));
- if (h->left_plane_separation_set)
- pcb_printf(" left_plane_separation = %ml ", xy2coord(h->left_plane_separation));
- pcb_printf("\n");
- }
-
- pcb_line_new(hyp_get_layer(h), x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2), xy2coord(h->width),
- hyp_clearance(h), pcb_no_flags());
-
- return 0;
-}
-
-/*
- * ARC subrecord of NET record. arc segment, drawn clockwise.
- */
-
-pcb_bool exec_arc(parse_param * h)
-{
-
- if (hyp_debug) {
- pcb_printf("arc: x1 = %ml y1 = %ml x2 = %ml y2 = %ml", x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2));
- pcb_printf(" xc = %ml yc = %ml r = %ml", x2coord(h->xc), y2coord(h->yc), xy2coord(h->r));
- pcb_printf(" width = %ml layer_name = \"%s\"", xy2coord(h->width), h->layer_name);
- if (h->plane_separation_set)
- pcb_printf(" plane_separation = %ml", xy2coord(h->plane_separation));
- if (h->left_plane_separation_set)
- pcb_printf(" left_plane_separation = %ml", xy2coord(h->left_plane_separation));
- pcb_printf("\n");
- }
-
- hyp_arc_new(hyp_get_layer(h), x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2), x2coord(h->xc),
- y2coord(h->yc), xy2coord(h->r), xy2coord(h->r), pcb_true, xy2coord(h->width), hyp_clearance(h), pcb_no_flags());
-
- return 0;
-}
-
-/*
- * VIA subrecord of NET record.
- * Draws via using padstack definition.
- */
-
-pcb_bool exec_via(parse_param * h)
-{
- padstack_t *padstack;
-
- /* detect old-style v1.0 via */
- if (!h->padstack_name_set)
- return exec_via_v1(h);
-
- if (hyp_debug) {
- pcb_printf("via: x = %ml y = %ml", x2coord(h->x), y2coord(h->y));
- if (h->padstack_name_set)
- pcb_printf(" padstack_name = \"%s\"", h->padstack_name);
- pcb_printf("\n");
- }
-
- padstack = hyp_padstack_by_name(h->padstack_name);
- if (padstack == NULL) {
- pcb_printf("via: padstack \"%s\" not found. skipping.\n", h->padstack_name);
- return 0;
- }
-
- /* XXX buried and blind vias not implemented yet */
-
- pcb_via_new(hyp_dest, x2coord(h->x), y2coord(h->y), padstack->thickness, padstack->clearance, padstack->mask,
- padstack->drill_hole, NULL, padstack->flags);
-
- return 0;
-}
-
-/*
- * VIA subrecord of NET record.
- * Draws deprecated v1.x via. Does not use padstack.
- */
-
-pcb_bool exec_via_v1(parse_param * h)
-{
- pcb_coord_t thickness;
- pcb_coord_t clearance;
- pcb_coord_t mask;
- pcb_coord_t drill_hole = 0;
- char *shape = NULL;
- pcb_flag_t flags;
-
- if (hyp_debug) {
- pcb_printf("old_via: x = %ml y = %ml", x2coord(h->x), y2coord(h->y));
- if (h->drill_size_set)
- pcb_printf(" drill_size = %ml", xy2coord(h->drill_size));
- if (h->layer1_name_set)
- pcb_printf(" layer1_name = \"%s\"", h->layer1_name);
- if (h->layer2_name_set)
- pcb_printf(" layer2_name = \"%s\"", h->layer2_name);
- if (h->via_pad_shape_set)
- pcb_printf(" via_pad_shape = \"%s\"", h->via_pad_shape);
- if (h->via_pad_sx_set)
- pcb_printf(" via_pad_sx = \"%ml\"", xy2coord(h->via_pad_sx));
- if (h->via_pad_sy_set)
- pcb_printf(" via_pad_sy = \"%ml\"", xy2coord(h->via_pad_sy));
- if (h->via_pad_angle_set)
- pcb_printf(" via_pad_angle = \"%f\"", h->via_pad_angle);
- if (h->via_pad1_shape_set)
- pcb_printf(" via_pad1_shape = \"%s\"", h->via_pad1_shape);
- if (h->via_pad1_sx_set)
- pcb_printf(" via_pad1_sx = \"%ml\"", xy2coord(h->via_pad1_sx));
- if (h->via_pad1_sy_set)
- pcb_printf(" via_pad1_sy = \"%ml\"", xy2coord(h->via_pad1_sy));
- if (h->via_pad1_angle_set)
- pcb_printf(" via_pad1_angle = \"%f\"", h->via_pad1_angle);
- if (h->via_pad2_shape_set)
- pcb_printf(" via_pad2_shape = \"%s\"", h->via_pad2_shape);
- if (h->via_pad2_sx_set)
- pcb_printf(" via_pad2_sx = \"%ml\"", xy2coord(h->via_pad2_sx));
- if (h->via_pad2_sy_set)
- pcb_printf(" via_pad1_sy = \"%ml\"", xy2coord(h->via_pad2_sy));
- if (h->via_pad2_angle_set)
- pcb_printf(" via_pad2_angle = \"%f\"", h->via_pad2_angle);
- pcb_printf("\n");
- }
-
- if (h->via_pad_sx_set && h->via_pad_sy_set)
- mask = thickness = (xy2coord(h->via_pad_sx) + xy2coord(h->via_pad_sy)) * 0.5;
- else if (h->via_pad1_sx_set && h->via_pad1_sy_set)
- mask = thickness = (xy2coord(h->via_pad1_sx) + xy2coord(h->via_pad1_sy)) * 0.5;
- else if (h->via_pad2_sx_set && h->via_pad2_sy_set)
- mask = thickness = (xy2coord(h->via_pad2_sx) + xy2coord(h->via_pad2_sy)) * 0.5;
- else
- mask = thickness = 0;
-
- clearance = 2 * hyp_clearance(h);
-
- if (h->drill_size_set)
- drill_hole = xy2coord(h->drill_size);
- else
- drill_hole = 0;
-
- if (h->via_pad_shape_set)
- shape = h->via_pad_shape;
- else if (h->via_pad1_shape_set)
- shape = h->via_pad1_shape;
- else if (h->via_pad2_shape_set)
- shape = h->via_pad2_shape;
- else
- shape = NULL;
-
- if ((shape != NULL) && (strcmp(shape, "RECT") == 0))
- flags = pcb_flag_make(PCB_FLAG_SQUARE); /* rectangular */
- else if ((shape != NULL) && (strcmp(shape, "OBLONG") == 0))
- flags = pcb_flag_make(PCB_FLAG_OCTAGON); /* oblong */
- else
- flags = pcb_no_flags(); /* round */
-
- /* XXX buried and blind vias not implemented yet */
-
- pcb_via_new(hyp_dest, x2coord(h->x), y2coord(h->y), thickness, clearance, mask, drill_hole, NULL, flags);
-
- return 0;
-}
-
-/*
- * PIN subrecord of NET record.
- * Draws PIN using padstack definiton.
- */
-
-pcb_bool exec_pin(parse_param * h)
-{
- pcb_element_t *device;
- padstack_t *padstack;
- char *device_name = NULL;
- char *pin_name = NULL;
- char *dot = NULL;
- char *pin_net_name = NULL;
-
- if (hyp_debug) {
- pcb_printf("pin: x = %ml y = %ml", x2coord(h->x), y2coord(h->y));
- pcb_printf(" pin_reference = \"%s\"", h->pin_reference);
- if (h->padstack_name_set)
- pcb_printf(" padstack_name = \"%s\"", h->padstack_name);
- if (h->pin_function_set)
- pcb_printf(" pin_function = %i", h->pin_function);
- pcb_printf("\n");
- }
-
- if (!h->padstack_name_set) {
- if (hyp_debug)
- pcb_printf("pin: padstack not set. skipping pin \"%s\"\n", h->pin_reference);
- return 0;
- }
-
- if (net_name != NULL)
- pin_net_name = pcb_strdup(net_name);
- else
- pin_net_name = pcb_strdup("?");
-
- /* h->pin_reference has format 'device_name.pin_name' */
- device_name = pcb_strdup(h->pin_reference);
- pin_name = pcb_strdup("?");
- dot = strrchr(device_name, '.');
- if (dot != NULL) {
- *dot = '\0';
- pin_name = pcb_strdup(dot + 1);
- }
-
- if (hyp_debug)
- pcb_printf("pin: device_name = \"%s\" pin_name = \"%s\"\n", device_name, pin_name);
-
- /* find device by name */
- device = hyp_create_element_by_name(device_name, x2coord(h->x), y2coord(h->y));
-
- if (device == NULL) {
- pcb_printf("pin: device \"%s\" not found. skipping pin \"%s\"\n", device_name, h->pin_reference);
- return 0;
- }
-
- /* find padstack */
- padstack = hyp_padstack_by_name(h->padstack_name);
- if (padstack == NULL) {
- pcb_printf("pin: padstack \"%s\" not found. skipping pin \"%s\"\n", h->padstack_name, h->pin_reference);
- return 0;
- }
-
- /* what if padstack = single layer & no drill ? SMD XXX */
-
- /* add new pin */
- pcb_element_pin_new(device, x2coord(h->x), y2coord(h->y), padstack->thickness, padstack->clearance, padstack->mask,
- padstack->drill_hole, pin_net_name, pin_name, padstack->flags);
-
- /* update */
- pcb_element_bbox(hyp_dest, device, pcb_font(PCB, 0, 1));
-
- return 0;
-}
-
-/*
- * PAD subrecord of NET record.
- * Draws deprecated v1.x pad.
- */
-
-pcb_bool exec_pad(parse_param * h)
-{
- pcb_coord_t x1, y1, x2, y2;
- pcb_coord_t thickness;
- pcb_coord_t clearance;
- pcb_coord_t mask;
- pcb_element_t *device;
- pcb_flag_t flags;
-
- if (hyp_debug) {
- pcb_printf("pad: x = %ml y = %ml", x2coord(h->x), y2coord(h->y));
- if (h->layer_name_set)
- pcb_printf(" layer_name = \"%s\"", h->layer_name);
- if (h->via_pad_shape_set)
- pcb_printf(" via_pad_shape = \"%s\"", h->via_pad_shape);
- if (h->via_pad_sx_set)
- pcb_printf(" via_pad_sx = \"%ml\"", xy2coord(h->via_pad_sx));
- if (h->via_pad_sy_set)
- pcb_printf(" via_pad_sy = \"%ml\"", xy2coord(h->via_pad_sy));
- if (h->via_pad_angle_set)
- pcb_printf(" via_pad_angle = \"%f\"", h->via_pad_angle);
- pcb_printf("\n");
- }
-
- /* if necessary, create an element to connect the pad to */
- if (h->layer_name_set && hyp_is_bottom_layer(h->layer_name)) {
- solder_side_pads =
- pcb_element_new(hyp_dest, NULL, pcb_font(PCB, 0, 1), pcb_flag_make(PCB_FLAG_ONSOLDER), NULL, NULL, NULL, 0, 0, 0, 500,
- pcb_flag_make(PCB_FLAG_ONSOLDER), pcb_false);
- device = solder_side_pads;
- }
- else {
- component_side_pads =
- pcb_element_new(hyp_dest, NULL, pcb_font(PCB, 0, 1), pcb_no_flags(), NULL, NULL, NULL, 0, 0, 0, 500, pcb_no_flags(),
- pcb_false);
- device = component_side_pads;
- }
-
- if (device == NULL) {
- pcb_printf("pad: can't create device. skipping pad.\n");
- return 0;
- }
-
- /* pad shape */
- flags = pcb_no_flags(); /* round */
-
- if (h->via_pad_shape_set && (h->via_pad_shape != NULL) && (strcmp(h->via_pad_shape, "RECT") == 0))
- flags = pcb_flag_add(flags, PCB_FLAG_SQUARE);
-
- if (h->layer_name_set)
- flags = pcb_flag_add(flags, hyp_layer_flag(h->layer_name));
-
- if (h->via_pad_sx_set && h->via_pad_sy_set)
- mask = thickness = (xy2coord(h->via_pad_sx) + xy2coord(h->via_pad_sy)) * 0.5;
-
- clearance = 2 * hyp_clearance(h); /* XXX hyp_layer_clearance */
-
- /* create */
- x1 = x2coord(h->x);
- y1 = y2coord(h->y);
-
- x2 = x1;
- y2 = y1;
- thickness = 0;
-
- if (h->via_pad_sx_set && h->via_pad_sy_set) {
- if (h->via_pad_sy > h->via_pad_sx) {
- thickness = xy2coord(h->via_pad_sx);
- x2 = x2coord(h->x);
- y2 = y2coord(h->y) + xy2coord(h->via_pad_sy) - xy2coord(h->via_pad_sx);
- }
- else if (h->via_pad_sx > h->via_pad_sy) {
- thickness = xy2coord(h->via_pad_sy);
- x2 = x2coord(h->x) + xy2coord(h->via_pad_sx) - xy2coord(h->via_pad_sy);
- y2 = y2coord(h->y);
- }
- else {
- thickness = xy2coord(h->via_pad_sx);
- x2 = x2coord(h->x);
- y2 = y2coord(h->y);
- }
- }
-
- /* XXX ought to rotate pad along h->via_pad_angle, if h->via_pad_angle_set */
-
- mask = thickness;
-
- pcb_element_pad_new(device, x1, y1, x2, y2, thickness, clearance, mask, net_name, NULL, flags);
-
- /* update */
- pcb_element_bbox(hyp_dest, device, pcb_font(PCB, 0, 1));
-
- return 0;
-}
-
-/*
- * USEG subrecord of NET record.
- * unrouted segment.
- */
-
-pcb_bool exec_useg(parse_param * h)
-{
- pcb_layergrp_id_t layer1_grp_id, layer2_grp_id;
-
- if (hyp_debug) {
- pcb_printf("useg: x1 = %ml y1 = %ml layer1_name = \"%s\"", x2coord(h->x1), y2coord(h->y1), h->layer1_name);
- pcb_printf(" x2 = %ml y2 = %ml layer2_name = \"%s\"", x2coord(h->x2), y2coord(h->y2), h->layer2_name);
- if (h->zlayer_name_set)
- pcb_printf(" zlayer_name = \"%s\" width = %ml length = %ml", h->zlayer_name, xy2coord(h->width), xy2coord(h->length));
- if (h->impedance_set)
- pcb_printf(" impedance = %f delay = %f ", h->impedance, h->delay);
- if (h->resistance_set)
- pcb_printf(" resistance = %f ", h->resistance);
- pcb_printf("\n");
- }
-
- /* XXX fixme. I want to put an unrouted segment between two layers, not two layer groups. */
- /* lookup layer group begin and end layer are on */
- layer1_grp_id = pcb_layer_get_group(PCB, hyp_create_layer(h->layer1_name));
- layer2_grp_id = pcb_layer_get_group(PCB, hyp_create_layer(h->layer2_name));
-
- if ((layer1_grp_id == -1) || (layer2_grp_id == -1)) {
- if (hyp_debug)
- pcb_printf("useg: skipping unrouted segment\n");
- return 0;
- }
-
- pcb_rat_new(hyp_dest, x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2), layer1_grp_id, layer2_grp_id,
- xy2coord(h->width), pcb_no_flags());
-
- return 0;
-}
-
-/*
- * POLYGON subrecord of NET record.
- * draws copper polygon.
- */
-
-/* XXX still need to implement different types (POUR, COPPER, PLANE) */
-
-pcb_bool exec_polygon_begin(parse_param * h)
-{
- pcb_layer_t *current_layer;
- hyp_polygon_t *new_poly;
- pcb_flag_t flags;
-
- if (hyp_debug) {
- pcb_printf("polygon begin:");
- if (h->layer_name_set)
- pcb_printf(" layer_name = \"%s\"", h->layer_name);
- if (h->width_set)
- pcb_printf(" width = %ml", xy2coord(h->width));
- if (h->polygon_type_set) {
- pcb_printf(" polygon_type = ", h->polygon_type, " ");
- switch (h->polygon_type) {
- case POLYGON_TYPE_PLANE:
- pcb_printf("POLYGON_TYPE_PLANE");
- break;
- case POLYGON_TYPE_POUR:
- pcb_printf("POLYGON_TYPE_POUR");
- break;
- case POLYGON_TYPE_COPPER:
- pcb_printf("POLYGON_TYPE_COPPER");
- break;
- default:
- pcb_printf("Error");
- break;
- }
- }
- if (h->id_set)
- pcb_printf(" id = %i", h->id);
- pcb_printf(" x = %ml y = %ml\n", xy2coord(h->x), xy2coord(h->y));
- }
-
- if (!h->layer_name_set) {
- hyp_error("expected polygon layer L = ");
- return pcb_true;
- }
-
- if (!h->id_set) {
- hyp_error("expected polygon id ID = ");
- return pcb_true;
- }
-
- /* handle different polygon types: plane, pour, and copper *//* XXX fixme */
- flags = pcb_no_flags();
- switch (h->polygon_type) {
- case POLYGON_TYPE_PLANE:
- flags = pcb_flag_add(flags, PCB_FLAG_CLEARPOLY);
- break;
- case POLYGON_TYPE_POUR:
- break;
- case POLYGON_TYPE_COPPER:
- break;
- default:
- break;
- }
-
- /* create empty pcb polygon */
- current_layer = hyp_get_layer(h);
- current_polygon = pcb_poly_new(current_layer, flags);
-
- /* add first vertex */
- if (current_polygon != NULL)
- pcb_poly_point_new(current_polygon, x2coord(h->x), y2coord(h->y));
-
- /* bookkeeping */
- if ((poly_state != HYP_POLYIDLE) && hyp_debug)
- pcb_printf("polygon: unexpected polygon. continuing.\n");
- poly_state = HYP_POLYGON;
-
- new_poly = malloc(sizeof(hyp_polygon_t));
- new_poly->hyp_poly_id = h->id; /* hyperlynx polygon/polyline id */
- new_poly->polygon = current_polygon;
- new_poly->layer = current_layer;
- new_poly->is_polygon = pcb_true;
-
- new_poly->next = polygon_head;
- polygon_head = new_poly;
-
- return 0;
-}
-
-pcb_bool exec_polygon_end(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("polygon end:\n");
-
- /* bookkeeping */
- if ((poly_state != HYP_POLYGON) && hyp_debug)
- pcb_printf("polygon: unexpected polygon end. continuing.\n");
- poly_state = HYP_POLYIDLE;
- current_polygon = NULL;
-
- return 0;
-}
-
-/*
- * POLYVOID subrecord of NET record.
- * same as POLYGON, but instead of creating copper, creates a hole in copper.
- */
-
-pcb_bool exec_polyvoid_begin(parse_param * h)
-{
- hyp_polygon_t *i;
-
- if (hyp_debug) {
- pcb_printf("polyvoid begin:");
- if (h->id_set)
- pcb_printf(" id = %i", h->id);
- pcb_printf(" x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y));
- }
-
- if (!h->id_set) {
- hyp_error("expected polygon id ID = ");
- return pcb_true;
- }
-
- /* look up polygon with this id */
- current_polygon = NULL;
- for (i = polygon_head; i != NULL; i = i->next)
- if (h->id == i->hyp_poly_id) {
- if (i->is_polygon) {
- current_polygon = i->polygon;
- break;
- }
- else
- pcb_printf("polyvoid: polyvoid hole in polyline not implemented.\n");
- }
-
- if (i == NULL) {
- poly_state = HYP_POLYIDLE;
- pcb_printf("polyvoid: polygon id %i not found\n", h->id);
- return 0;
- }
-
- if (current_polygon != NULL) {
- /* create hole in polygon */
- pcb_poly_hole_new(current_polygon);
- /* add first vertex of hole */
- pcb_poly_point_new(current_polygon, x2coord(h->x), y2coord(h->y));
- }
-
- /* bookkeeping */
- if ((poly_state != HYP_POLYIDLE) && hyp_debug)
- pcb_printf("polyvoid: unexpected polyvoid. continuing.\n");
- if ((i != NULL) && (i->is_polygon))
- poly_state = HYP_POLYGON_HOLE;
- else
- poly_state = HYP_POLYLINE_HOLE;
-
- return 0;
-}
-
-pcb_bool exec_polyvoid_end(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("polyvoid end:\n");
-
- /* bookkeeping */
- if ((poly_state != HYP_POLYGON_HOLE) && (poly_state != HYP_POLYLINE_HOLE) && hyp_debug)
- pcb_printf("polyvoid: unexpected polyvoid end. continuing.\n");
- poly_state = HYP_POLYIDLE;
-
- return 0;
-}
-
-/*
- * POLYLINE subrecord of NET record.
- */
-
-pcb_bool exec_polyline_begin(parse_param * h)
-{
- hyp_polygon_t *new_poly;
-
- if (hyp_debug) {
- pcb_printf("polyline begin:");
- if (h->layer_name_set)
- pcb_printf(" layer_name = \"%s\"", h->layer_name);
- if (h->width_set)
- pcb_printf(" width = %ml", xy2coord(h->width));
- if (h->polygon_type_set) {
- pcb_printf(" polygon_type = ", h->polygon_type, " ");
- switch (h->polygon_type) {
- case POLYGON_TYPE_PLANE:
- pcb_printf("POLYGON_TYPE_PLANE");
- break;
- case POLYGON_TYPE_POUR:
- pcb_printf("POLYGON_TYPE_POUR");
- break;
- case POLYGON_TYPE_COPPER:
- pcb_printf("POLYGON_TYPE_COPPER");
- break;
- default:
- pcb_printf("Error");
- break;
- }
- }
- if (h->id_set)
- pcb_printf(" id = %i", h->id);
- pcb_printf(" x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y));
- }
-
- if (!h->layer_name_set) {
- hyp_error("expected polygon layer L = ");
- return pcb_true;
- }
-
- if (!h->width_set) {
- hyp_error("expected polygon width W = ");
- return pcb_true;
- }
-
- if (!h->id_set) {
- hyp_error("expected polygon id ID = ");
- return pcb_true;
- }
-
- /* create polyline */
- current_polygon = NULL;
- current_polyline_layer = hyp_get_layer(h);
- current_polyline_width = xy2coord(h->width);
- current_polyline_clearance = hyp_clearance(h);
- current_polyline_xpos = x2coord(h->x);
- current_polyline_ypos = y2coord(h->y);
-
- /* bookkeeping */
- if ((poly_state != HYP_POLYIDLE) && hyp_debug)
- pcb_printf("polyline: unexpected polyline. continuing.\n");
- poly_state = HYP_POLYLINE;
-
- /* we need to store the id of the polyline, in case a matching polyvoid occurs. */
- new_poly = malloc(sizeof(hyp_polygon_t));
- new_poly->hyp_poly_id = h->id; /* hyperlynx polygon/polyline id */
- new_poly->polygon = NULL;
- new_poly->layer = current_polyline_layer;
- new_poly->is_polygon = pcb_false;
-
- new_poly->next = polygon_head;
- polygon_head = new_poly;
-
- return 0;
-}
-
-pcb_bool exec_polyline_end(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("polyline end:\n");
-
- /* bookkeeping */
- if ((poly_state != HYP_POLYLINE) && hyp_debug)
- pcb_printf("polyline: unexpected polyline end. continuing.\n");
-
- poly_state = HYP_POLYIDLE;
- current_polygon = NULL;
- current_polyline_layer = NULL;
- current_polyline_width = 0;
- current_polyline_clearance = 0;
- current_polyline_xpos = 0;
- current_polyline_ypos = 0;
-
- return 0;
-}
-
-/*
- * LINE subrecord of NET record.
- */
-
-pcb_bool exec_line(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("line: x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y));
-
- switch (poly_state) {
- case HYP_POLYIDLE:
- if (hyp_debug)
- pcb_printf("line: unexpected. continuing.\n");
- break;
- case HYP_POLYGON:
- case HYP_POLYGON_HOLE:
- /* add new vertex to polygon */
- if (current_polygon != NULL)
- pcb_poly_point_new(current_polygon, x2coord(h->x), y2coord(h->y));
- break;
- case HYP_POLYLINE:
- /* add new point to polyline */
- if (current_polyline_layer != NULL) {
- pcb_line_new(current_polyline_layer, current_polyline_xpos, current_polyline_ypos, x2coord(h->x), y2coord(h->y),
- current_polyline_width, current_polyline_clearance, pcb_no_flags());
- /* move on */
- current_polyline_xpos = x2coord(h->x);
- current_polyline_ypos = y2coord(h->y);
- }
- break;
- case HYP_POLYLINE_HOLE:
- /* hole in polyline not implemented */
- break;
- default:
- if (hyp_debug)
- pcb_printf("line: error\n");
- }
-
- return 0;
-}
-
-/*
- * CURVE subrecord of NET record.
- * Clockwise from (x1, y1) to (x2, y2).
- */
-
-pcb_bool exec_curve(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("curve: x1 = %ml y1 = %ml x2 = %ml y2 = %ml xc = %ml yc = %ml r = %ml\n", x2coord(h->x1), y2coord(h->y1),
- x2coord(h->x2), y2coord(h->y2), x2coord(h->xc), y2coord(h->yc), xy2coord(h->r));
-
- switch (poly_state) {
- case HYP_POLYIDLE:
- if (hyp_debug)
- pcb_printf("curve: unexpected. continuing.\n");
- break;
- case HYP_POLYGON:
- case HYP_POLYGON_HOLE:
- if (current_polygon != NULL) {
- /* polygon contains line segments, not arc segments. convert arc segment to line segments. */
- hyp_arc2poly(x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2), x2coord(h->xc), y2coord(h->yc),
- xy2coord(h->r), pcb_false);
- }
- break;
- case HYP_POLYLINE:
- if (current_polyline_layer != NULL) {
- /* clockwise arc from (x1, y2) to (x2, y2) */
- hyp_arc_new(current_polyline_layer, x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2), x2coord(h->xc),
- y2coord(h->yc), xy2coord(h->r), xy2coord(h->r), pcb_false, current_polyline_width,
- current_polyline_clearance, pcb_no_flags());
-
- /* move on */
- if ((current_polyline_xpos == x2coord(h->x1)) && (current_polyline_ypos == y2coord(h->y1))) {
- current_polyline_xpos = x2coord(h->x2);
- current_polyline_ypos = y2coord(h->y2);
- }
- else if ((current_polyline_xpos == x2coord(h->x2)) && (current_polyline_ypos == y2coord(h->y2))) {
- current_polyline_xpos = x2coord(h->x1);
- current_polyline_ypos = y2coord(h->y1);
- }
- }
- break;
- case HYP_POLYLINE_HOLE:
- /* not implemented */
- break;
- default:
- if (hyp_debug)
- pcb_printf("curve: error\n");
- }
-
- return 0;
-}
-
-/*
- * NET_CLASS record
- */
-
-pcb_bool exec_net_class(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("net_class: net_class_name = \"%s\"\n", h->net_class_name);
-
- return 0;
-}
-
-/*
- * N net membership subrecord of NET_CLASS record
- */
-
-pcb_bool exec_net_class_element(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("net_class_element: net_name = \"%s\"\n", h->net_name);
-
- return 0;
-}
-
-/*
- * A attribute subrecord of NET_CLASS record
- */
-
-
-pcb_bool exec_net_class_attribute(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("netclass_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value);
-
- return 0;
-}
-
-/*
- * KEY record
- */
-
-pcb_bool exec_key(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("key: key = \"%s\"\n", h->key);
-
- return 0;
-}
-
-/*
- * END record
- */
-
-pcb_bool exec_end(parse_param * h)
-{
- if (hyp_debug)
- pcb_printf("end:\n");
-
- return 0;
-}
-
-/* not truncated */
Index: src_plugins/import_hyp/Makefile
===================================================================
--- src_plugins/import_hyp/Makefile (revision 7963)
+++ src_plugins/import_hyp/Makefile (nonexistent)
@@ -1,10 +0,0 @@
-all:
- cd ../../src && $(MAKE) mod_import_hyp
-
-hyp_l.o: hyp_y.h
-
-parser.o: hyp_l.h hyp_y.h
-
-clean:
- rm *.o *.so hyp_l.c hyp_l.h hyp_y.c hyp_y.h 2>/dev/null ; true
-
Index: src_plugins/import_hyp/hyp_y.h
===================================================================
--- src_plugins/import_hyp/hyp_y.h (revision 7963)
+++ src_plugins/import_hyp/hyp_y.h (nonexistent)
@@ -1,191 +0,0 @@
-/* A Bison parser, made by GNU Bison 3.0.4. */
-
-/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see . */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-#ifndef YY_HYY_HYP_Y_H_INCLUDED
-# define YY_HYY_HYP_Y_H_INCLUDED
-/* Debug traces. */
-#ifndef HYYDEBUG
-# if defined YYDEBUG
-#if YYDEBUG
-# define HYYDEBUG 1
-# else
-# define HYYDEBUG 0
-# endif
-# else /* ! defined YYDEBUG */
-# define HYYDEBUG 1
-# endif /* ! defined YYDEBUG */
-#endif /* ! defined HYYDEBUG */
-#if HYYDEBUG
-extern int hyydebug;
-#endif
-/* "%code requires" blocks. */
-#line 21 "hyp_y.y" /* yacc.c:1909 */
-
-#include "parser.h"
-
-#line 56 "hyp_y.h" /* yacc.c:1909 */
-
-/* Token type. */
-#ifndef HYYTOKENTYPE
-# define HYYTOKENTYPE
- enum hyytokentype
- {
- H_BOARD_FILE = 258,
- H_VERSION = 259,
- H_DATA_MODE = 260,
- H_UNITS = 261,
- H_PLANE_SEP = 262,
- H_BOARD = 263,
- H_STACKUP = 264,
- H_DEVICES = 265,
- H_SUPPLIES = 266,
- H_PAD = 267,
- H_PADSTACK = 268,
- H_NET = 269,
- H_NET_CLASS = 270,
- H_END = 271,
- H_KEY = 272,
- H_A = 273,
- H_ARC = 274,
- H_COPPER = 275,
- H_CURVE = 276,
- H_DETAILED = 277,
- H_DIELECTRIC = 278,
- H_ENGLISH = 279,
- H_LENGTH = 280,
- H_LINE = 281,
- H_METRIC = 282,
- H_N = 283,
- H_OPTIONS = 284,
- H_PERIMETER_ARC = 285,
- H_PERIMETER_SEGMENT = 286,
- H_PIN = 287,
- H_PLANE = 288,
- H_POLYGON = 289,
- H_POLYLINE = 290,
- H_POLYVOID = 291,
- H_POUR = 292,
- H_S = 293,
- H_SEG = 294,
- H_SIGNAL = 295,
- H_SIMPLIFIED = 296,
- H_SIM_BOTH = 297,
- H_SIM_IN = 298,
- H_SIM_OUT = 299,
- H_USEG = 300,
- H_VIA = 301,
- H_WEIGHT = 302,
- H_A1 = 303,
- H_A2 = 304,
- H_BR = 305,
- H_C = 306,
- H_C_QM = 307,
- H_CO_QM = 308,
- H_D = 309,
- H_ER = 310,
- H_F = 311,
- H_ID = 312,
- H_L = 313,
- H_L1 = 314,
- H_L2 = 315,
- H_LPS = 316,
- H_LT = 317,
- H_M = 318,
- H_NAME = 319,
- H_P = 320,
- H_PKG = 321,
- H_PR_QM = 322,
- H_PS = 323,
- H_R = 324,
- H_REF = 325,
- H_SX = 326,
- H_SY = 327,
- H_S1 = 328,
- H_S1X = 329,
- H_S1Y = 330,
- H_S2 = 331,
- H_S2X = 332,
- H_S2Y = 333,
- H_T = 334,
- H_TC = 335,
- H_USE_DIE_FOR_METAL = 336,
- H_V = 337,
- H_V_QM = 338,
- H_VAL = 339,
- H_W = 340,
- H_X = 341,
- H_X1 = 342,
- H_X2 = 343,
- H_XC = 344,
- H_Y = 345,
- H_Y1 = 346,
- H_Y2 = 347,
- H_YC = 348,
- H_Z = 349,
- H_ZL = 350,
- H_ZLEN = 351,
- H_ZW = 352,
- H_YES = 353,
- H_NO = 354,
- H_BOOL = 355,
- H_POSINT = 356,
- H_FLOAT = 357,
- H_STRING = 358
- };
-#endif
-
-/* Value type. */
-#if ! defined HYYSTYPE && ! defined HYYSTYPE_IS_DECLARED
-
-union HYYSTYPE
-{
-#line 30 "hyp_y.y" /* yacc.c:1909 */
-
- int boolval;
- int intval;
- double floatval;
- char* strval;
-
-#line 179 "hyp_y.h" /* yacc.c:1909 */
-};
-
-typedef union HYYSTYPE HYYSTYPE;
-# define HYYSTYPE_IS_TRIVIAL 1
-# define HYYSTYPE_IS_DECLARED 1
-#endif
-
-
-extern HYYSTYPE hyylval;
-
-int hyyparse (void);
-
-#endif /* !YY_HYY_HYP_Y_H_INCLUDED */
Index: src_plugins/io_hyp/Makefile
===================================================================
--- src_plugins/io_hyp/Makefile (nonexistent)
+++ src_plugins/io_hyp/Makefile (revision 7964)
@@ -0,0 +1,10 @@
+all:
+ cd ../../src && $(MAKE) mod_io_hyp
+
+hyp_l.o: hyp_y.h
+
+parser.o: hyp_l.h hyp_y.h
+
+clean:
+ rm *.o *.so hyp_l.c hyp_l.h hyp_y.c hyp_y.h 2>/dev/null ; true
+
Index: src_plugins/io_hyp/Plug.tmpasm
===================================================================
--- src_plugins/io_hyp/Plug.tmpasm (nonexistent)
+++ src_plugins/io_hyp/Plug.tmpasm (revision 7964)
@@ -0,0 +1,18 @@
+put /local/pcb/mod {io_hyp}
+
+append /local/pcb/mod/OBJS [@
+ $(PLUGDIR)/io_hyp/io_hyp.o
+ $(PLUGDIR)/io_hyp/hyp_l.o
+ $(PLUGDIR)/io_hyp/hyp_y.o
+ $(PLUGDIR)/io_hyp/parser.o
+@]
+
+put /local/pcb/mod/YACC {$(PLUGDIR)/io_hyp/hyp_y}
+put /local/pcb/mod/LEX {$(PLUGDIR)/io_hyp/hyp_l}
+
+
+switch /local/pcb/io_hyp/controls
+ case {buildin} include /local/pcb/tmpasm/buildin; end;
+ case {plugin} include /local/pcb/tmpasm/plugin; end;
+ case {disable} include /local/pcb/tmpasm/disable; end;
+end
Index: src_plugins/io_hyp/README
===================================================================
--- src_plugins/io_hyp/README (nonexistent)
+++ src_plugins/io_hyp/README (revision 7964)
@@ -0,0 +1,5 @@
+Import plugin for hyperlynx geometry.
+
+#state: WIP
+#default: disable
+#implements: import
Index: src_plugins/io_hyp/hacking.txt
===================================================================
--- src_plugins/io_hyp/hacking.txt (nonexistent)
+++ src_plugins/io_hyp/hacking.txt (revision 7964)
@@ -0,0 +1,17 @@
+
+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
+
Index: src_plugins/io_hyp/hyp_l.c
===================================================================
--- src_plugins/io_hyp/hyp_l.c (nonexistent)
+++ src_plugins/io_hyp/hyp_l.c (revision 7964)
@@ -0,0 +1,4084 @@
+#line 2 "hyp_l.c"
+
+#line 4 "hyp_l.c"
+
+#define YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+/* %not-for-header */
+
+/* %if-c-only */
+/* %if-not-reentrant */
+#define yy_create_buffer hyy_create_buffer
+#define yy_delete_buffer hyy_delete_buffer
+#define yy_flex_debug hyy_flex_debug
+#define yy_init_buffer hyy_init_buffer
+#define yy_flush_buffer hyy_flush_buffer
+#define yy_load_buffer_state hyy_load_buffer_state
+#define yy_switch_to_buffer hyy_switch_to_buffer
+#define yyin hyyin
+#define yyleng hyyleng
+#define yylex hyylex
+#define yylineno hyylineno
+#define yyout hyyout
+#define yyrestart hyyrestart
+#define yytext hyytext
+#define yywrap hyywrap
+#define yyalloc hyyalloc
+#define yyrealloc hyyrealloc
+#define yyfree hyyfree
+
+/* %endif */
+/* %endif */
+/* %ok-for-header */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 39
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* %if-c++-only */
+/* %endif */
+
+/* %if-c-only */
+
+/* %endif */
+
+/* %if-c-only */
+
+/* %endif */
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+/* %if-c-only */
+#include
+#include
+#include
+#include
+/* %endif */
+
+/* %if-tables-serialization */
+/* %endif */
+/* end standard C headers. */
+
+/* %if-c-or-c++ */
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have . Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif /* defined (__STDC__) */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+/* %not-for-header */
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+/* %ok-for-header */
+
+/* %not-for-header */
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+/* %ok-for-header */
+
+/* %if-reentrant */
+/* %endif */
+
+/* %if-not-reentrant */
+
+/* %endif */
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE hyyrestart(hyyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
+#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+/* %if-not-reentrant */
+extern yy_size_t hyyleng;
+/* %endif */
+
+/* %if-c-only */
+/* %if-not-reentrant */
+extern FILE *hyyin, *hyyout;
+/* %endif */
+/* %endif */
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+ /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
+ * access to the local variable yy_act. Since yyless() is a macro, it would break
+ * existing scanners that call yyless() from OUTSIDE hyylex.
+ * One obvious solution it to make yy_act a global. I tried that, and saw
+ * a 5% performance hit in a non-hyylineno scanner, because yy_act is
+ * normally declared as a register variable-- so it is not worth it.
+ */
+ #define YY_LESS_LINENO(n) \
+ do { \
+ int yyl;\
+ for ( yyl = n; yyl < hyyleng; ++yyl )\
+ if ( hyytext[yyl] == '\n' )\
+ --hyylineno;\
+ }while(0)
+ #define YY_LINENO_REWIND_TO(dst) \
+ do {\
+ const char *p;\
+ for ( p = yy_cp-1; p >= (dst); --p)\
+ if ( *p == '\n' )\
+ --hyylineno;\
+ }while(0)
+
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up hyytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
+ YY_RESTORE_YY_MORE_OFFSET \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up hyytext again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, (yytext_ptr) )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+/* %if-c-only */
+ FILE *yy_input_file;
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ yy_size_t yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via hyyrestart()), so that the user can continue scanning by
+ * just pointing hyyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* %if-c-only Standard (non-C++) definition */
+/* %not-for-header */
+
+/* %if-not-reentrant */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+/* %endif */
+/* %ok-for-header */
+
+/* %endif */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* %if-c-only Standard (non-C++) definition */
+
+/* %if-not-reentrant */
+/* %not-for-header */
+
+/* yy_hold_char holds the character lost when hyytext is formed. */
+static char yy_hold_char;
+static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
+yy_size_t hyyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 0; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow hyywrap()'s to do buffer switches
+ * instead of setting up a fresh hyyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+/* %ok-for-header */
+
+/* %endif */
+
+void hyyrestart (FILE *input_file );
+void hyy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE hyy_create_buffer (FILE *file,int size );
+void hyy_delete_buffer (YY_BUFFER_STATE b );
+void hyy_flush_buffer (YY_BUFFER_STATE b );
+void hyypush_buffer_state (YY_BUFFER_STATE new_buffer );
+void hyypop_buffer_state (void );
+
+static void hyyensure_buffer_stack (void );
+static void hyy_load_buffer_state (void );
+static void hyy_init_buffer (YY_BUFFER_STATE b,FILE *file );
+
+#define YY_FLUSH_BUFFER hyy_flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE hyy_scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE hyy_scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE hyy_scan_bytes (yyconst char *bytes,yy_size_t len );
+
+/* %endif */
+
+void *hyyalloc (yy_size_t );
+void *hyyrealloc (void *,yy_size_t );
+void hyyfree (void * );
+
+#define yy_new_buffer hyy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ hyyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ hyy_create_buffer(hyyin,YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){\
+ hyyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ hyy_create_buffer(hyyin,YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* %% [1.0] hyytext/hyyin/hyyout/yy_state_type/hyylineno etc. def's & init go here */
+/* Begin user sect3 */
+
+#define hyywrap() 1
+#define YY_SKIP_YYWRAP
+
+#define FLEX_DEBUG
+
+typedef unsigned char YY_CHAR;
+
+FILE *hyyin = (FILE *) 0, *hyyout = (FILE *) 0;
+
+typedef int yy_state_type;
+
+extern int hyylineno;
+
+int hyylineno = 1;
+
+extern char *hyytext;
+#define yytext_ptr hyytext
+
+/* %% [1.5] DFA */
+
+/* %if-c-only Standard (non-C++) definition */
+
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (yyconst char msg[] );
+
+/* %endif */
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up hyytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ (yytext_ptr) = yy_bp; \
+/* %% [2.0] code to fiddle hyytext and hyyleng for yymore() goes here \ */\
+ hyyleng = (size_t) (yy_cp - yy_bp); \
+ (yy_hold_char) = *yy_cp; \
+ *yy_cp = '\0'; \
+/* %% [3.0] code to copy yytext_ptr to hyytext[] goes here, if %array \ */\
+ (yy_c_buf_p) = yy_cp;
+
+/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
+#define YY_NUM_RULES 137
+#define YY_END_OF_BUFFER 138
+/* This struct is not used in this scanner,
+ but its presence is necessary. */
+struct yy_trans_info
+ {
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+ };
+static yyconst flex_int16_t yy_acclist[696] =
+ { 0,
+ 1, 1, 138, 134, 136, 137, 4, 136, 137, 5,
+ 137, 5, 136, 137, 136, 137, 130, 136, 137, 131,
+ 136, 137, 134, 136, 137, 132, 134, 136, 137, 134,
+ 136, 137, 108, 134, 136, 137, 133, 136, 137, 20,
+ 134, 136, 137, 134, 136, 137, 134, 136, 137, 134,
+ 136, 137, 134, 136, 137, 134, 136, 137, 134, 136,
+ 137, 134, 136, 137, 134, 136, 137, 30, 134, 136,
+ 137, 31, 134, 136, 137, 134, 136, 137, 134, 136,
+ 137, 134, 136, 137, 42, 134, 136, 137, 43, 134,
+ 136, 137, 134, 136, 137, 134, 136, 137, 134, 136,
+
+ 137, 134, 136, 137, 134, 136, 137, 134, 136, 137,
+ 134, 136, 137, 134, 136, 137, 128, 136, 137, 129,
+ 136, 137, 134, 136, 137, 127, 131, 136, 137, 134,
+ 136, 137, 127, 129, 136, 137, 126, 134, 136, 137,
+ 134, 136, 137, 134, 136, 137, 125, 134, 136, 137,
+ 1, 134, 136, 137, 1, 4, 136, 137, 1, 5,
+ 137, 1, 5, 136, 137, 1, 136, 137, 1, 130,
+ 136, 137, 1, 131, 136, 137, 1, 132, 134, 136,
+ 137, 1, 133, 136, 137, 1, 128, 136, 137, 1,
+ 134, 136, 137, 134, 136, 137, 4, 136, 137, 2,
+
+ 5, 137, 2, 5, 136, 137, 136, 137, 130, 136,
+ 137, 131, 136, 137, 132, 134, 136, 137, 133, 136,
+ 137, 128, 136, 137, 129, 136, 137, 134, 136, 137,
+ 134, 4, 5, 135, 134, 108, 134, 108, 134, 108,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 53, 134, 134, 134, 57, 134, 134, 134, 60, 134,
+ 134, 134, 134, 134, 62, 134, 134, 134, 134, 64,
+ 134, 134, 134, 134, 69, 134, 70, 134, 134, 107,
+ 134, 134, 72, 134, 134, 134, 134, 134, 134, 134,
+
+ 134, 76, 134, 134, 134, 78, 134, 134, 134, 134,
+ 134, 134, 87, 134, 134, 134, 90, 134, 134, 134,
+ 134, 93, 134, 134, 134, 94, 134, 134, 134, 98,
+ 134, 134, 102, 134, 134, 134, 134, 3, 134, 127,
+ 126, 134, 134, 125, 134, 125, 134, 125, 134, 134,
+ 1, 134, 1, 1, 4, 1, 5, 1, 1, 135,
+ 1, 134, 1, 1, 3, 134, 2, 4, 2, 5,
+ 2, 135, 134, 2, 3, 108, 134, 111, 134, 108,
+ 134, 134, 121, 134, 114, 134, 116, 134, 115, 134,
+ 119, 134, 112, 120, 134, 113, 134, 118, 134, 109,
+
+ 134, 110, 134, 122, 134, 117, 134, 120, 134, 124,
+ 134, 123, 134, 54, 55, 21, 134, 134, 56, 58,
+ 134, 134, 134, 134, 134, 134, 134, 18, 134, 134,
+ 61, 63, 19, 134, 65, 66, 134, 134, 134, 68,
+ 134, 134, 16, 134, 134, 33, 134, 134, 36, 134,
+ 134, 134, 134, 134, 134, 75, 134, 81, 134, 134,
+ 84, 134, 134, 44, 134, 134, 134, 134, 134, 79,
+ 80, 88, 134, 134, 91, 134, 134, 51, 134, 134,
+ 95, 96, 97, 99, 100, 101, 106, 134, 103, 134,
+ 105, 125, 134, 134, 125, 134, 134, 134, 59, 134,
+
+ 134, 134, 134, 134, 134, 134, 134, 28, 134, 67,
+ 134, 134, 134, 134, 134, 134, 73, 134, 134, 41,
+ 134, 74, 77, 82, 83, 85, 86, 134, 134, 134,
+ 134, 134, 134, 50, 134, 134, 92, 134, 134, 134,
+ 11, 134, 134, 23, 134, 134, 134, 134, 134, 134,
+ 134, 134, 71, 134, 134, 134, 134, 37, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 9,
+ 134, 134, 134, 134, 104, 134, 22, 134, 134, 134,
+ 134, 134, 134, 27, 134, 29, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 45, 134, 134, 134, 48,
+
+ 134, 134, 134, 134, 134, 134, 52, 134, 134, 134,
+ 134, 13, 134, 134, 26, 134, 134, 32, 134, 134,
+ 134, 134, 38, 134, 134, 134, 134, 134, 49, 134,
+ 12, 134, 134, 134, 7, 134, 134, 134, 24, 134,
+ 134, 134, 15, 134, 134, 134, 39, 134, 40, 134,
+ 134, 47, 134, 14, 134, 134, 134, 8, 134, 134,
+ 17, 134, 134, 10, 134, 134, 134, 6, 134, 25,
+ 134, 134, 46, 134, 134, 134, 134, 134, 134, 134,
+ 134, 34, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 35, 134, 134, 89
+
+ } ;
+
+static yyconst flex_int16_t yy_accept[578] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 3, 3, 3, 4, 7, 10, 12, 15, 17, 20,
+ 23, 26, 30, 33, 37, 40, 44, 47, 50, 53,
+ 56, 59, 62, 65, 68, 72, 76, 79, 82, 85,
+ 89, 93, 96, 99, 102, 105, 108, 111, 114, 117,
+ 120, 123, 126, 130, 133, 137, 141, 144, 147, 151,
+ 155, 159, 162, 166, 169, 173, 177, 182, 186, 190,
+ 194, 197, 200, 203, 207, 209, 212, 215, 219, 222,
+ 225, 228, 231, 232, 233, 234, 234, 235, 236, 238,
+ 240, 240, 242, 243, 244, 245, 246, 247, 248, 249,
+
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 259, 260, 261, 262, 263, 264, 265, 265, 266, 267,
+ 268, 269, 269, 270, 271, 272, 273, 274, 275, 275,
+ 276, 277, 278, 278, 279, 280, 281, 282, 283, 284,
+ 285, 285, 286, 287, 287, 288, 289, 290, 292, 293,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 302, 303, 304, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 313, 314, 315, 316, 317, 317, 318,
+ 319, 320, 321, 322, 322, 323, 324, 324, 325, 326,
+ 327, 328, 328, 329, 330, 331, 332, 333, 333, 334,
+
+ 335, 336, 337, 338, 338, 339, 339, 340, 341, 343,
+ 344, 346, 348, 350, 351, 353, 354, 356, 358, 359,
+ 361, 363, 364, 366, 367, 367, 368, 369, 371, 371,
+ 372, 373, 374, 374, 376, 376, 376, 376, 376, 376,
+ 376, 376, 376, 376, 376, 376, 376, 376, 376, 376,
+ 376, 378, 379, 380, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 414, 415, 415, 416,
+ 418, 419, 419, 420, 420, 421, 422, 423, 424, 425,
+
+ 426, 427, 428, 430, 431, 431, 432, 432, 433, 435,
+ 435, 436, 436, 437, 438, 439, 440, 440, 441, 442,
+ 443, 445, 446, 448, 449, 451, 452, 453, 454, 455,
+ 456, 456, 457, 458, 458, 459, 460, 461, 461, 462,
+ 463, 464, 466, 467, 468, 469, 470, 470, 471, 471,
+ 472, 472, 473, 474, 475, 475, 476, 477, 478, 480,
+ 481, 481, 482, 482, 483, 483, 484, 484, 485, 485,
+ 486, 486, 487, 489, 489, 490, 491, 491, 492, 494,
+ 495, 497, 497, 497, 497, 497, 497, 497, 497, 497,
+ 497, 497, 497, 497, 497, 497, 497, 497, 498, 499,
+
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 510, 510, 511, 512, 513, 514, 515, 516, 517, 517,
+ 518, 519, 520, 522, 522, 523, 523, 524, 524, 525,
+ 525, 526, 526, 527, 527, 528, 529, 530, 531, 532,
+ 533, 534, 536, 537, 537, 538, 539, 540, 541, 543,
+ 544, 546, 547, 548, 549, 550, 551, 552, 553, 553,
+ 554, 555, 556, 557, 558, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 572, 573, 574, 575,
+ 575, 576, 577, 579, 580, 581, 582, 583, 584, 586,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 598,
+
+ 599, 600, 602, 603, 604, 605, 606, 607, 609, 610,
+ 611, 612, 614, 615, 617, 618, 620, 621, 622, 623,
+ 625, 626, 627, 628, 629, 631, 633, 634, 635, 637,
+ 638, 639, 641, 642, 643, 645, 646, 647, 649, 651,
+ 652, 654, 656, 657, 658, 660, 661, 663, 664, 666,
+ 667, 668, 670, 672, 673, 675, 676, 677, 678, 679,
+ 680, 681, 682, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 694, 695, 695, 696, 696
+ } ;
+
+static yyconst flex_int32_t yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 2, 2, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 1, 5, 1, 1, 1, 1, 1, 6,
+ 7, 8, 9, 10, 9, 11, 1, 12, 13, 14,
+ 12, 12, 12, 12, 12, 12, 12, 1, 1, 1,
+ 15, 1, 16, 1, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 26, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 1, 1, 1, 1, 42, 1, 43, 44, 44, 44,
+
+ 45, 46, 44, 44, 44, 44, 47, 44, 48, 49,
+ 50, 51, 44, 44, 52, 44, 53, 44, 44, 44,
+ 54, 55, 56, 1, 57, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+ } ;
+
+static yyconst flex_int32_t yy_meta[58] =
+ { 0,
+ 1, 2, 3, 4, 4, 4, 4, 1, 1, 1,
+ 1, 1, 1, 1, 4, 1, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 1, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 4, 6
+ } ;
+
+static yyconst flex_int16_t yy_base[642] =
+ { 0,
+ 0, 1102, 57, 1101, 113, 169, 121, 127, 225, 281,
+ 337, 393, 1107, 0, 1097, 118, 139, 1093, 2955, 2955,
+ 133, 0, 136, 450, 2955, 152, 120, 176, 178, 122,
+ 122, 1077, 1075, 231, 185, 187, 1063, 504, 194, 537,
+ 186, 126, 222, 195, 240, 255, 234, 1041, 1045, 2955,
+ 2955, 576, 2955, 633, 2955, 145, 150, 207, 281, 301,
+ 1087, 210, 219, 255, 0, 0, 315, 0, 0, 687,
+ 743, 275, 247, 261, 294, 297, 306, 799, 310, 320,
+ 324, 855, 0, 1086, 328, 1082, 1081, 321, 0, 337,
+ 911, 342, 966, 1008, 1050, 1092, 1134, 1176, 1218, 1260,
+
+ 1302, 1344, 1386, 1428, 349, 1470, 1512, 1554, 1596, 196,
+ 246, 265, 2955, 1066, 1067, 344, 358, 2955, 362, 313,
+ 1050, 363, 2955, 1047, 236, 1060, 346, 365, 366, 2955,
+ 368, 1040, 370, 372, 373, 2955, 1049, 1048, 1043, 374,
+ 377, 2955, 1041, 389, 2955, 1046, 1039, 0, 1038, 400,
+ 2955, 1052, 1038, 1040, 1046, 1051, 158, 1051, 403, 404,
+ 2955, 1043, 405, 407, 414, 2955, 1034, 361, 1039, 1023,
+ 408, 409, 410, 2955, 411, 1029, 1032, 412, 2955, 415,
+ 1021, 1015, 1030, 419, 2955, 1021, 426, 429, 430, 2955,
+ 433, 440, 441, 505, 2955, 507, 1011, 508, 2955, 509,
+
+ 511, 992, 1637, 433, 435, 512, 0, 2955, 503, 528,
+ 542, 547, 553, 534, 701, 0, 1041, 530, 566, 1037,
+ 1693, 581, 541, 1749, 585, 590, 593, 596, 598, 601,
+ 604, 1805, 607, 609, 1039, 1038, 1037, 1036, 1035, 1034,
+ 1033, 1032, 1031, 1030, 1029, 1028, 1027, 1026, 1025, 1024,
+ 1862, 1023, 602, 697, 1917, 1021, 1959, 1013, 2001, 1012,
+ 2043, 1011, 2085, 1010, 2127, 1009, 2169, 1005, 2211, 1004,
+ 2253, 1003, 2295, 1002, 2337, 1001, 2379, 1000, 2421, 999,
+ 2463, 998, 2505, 997, 2547, 534, 2955, 555, 2955, 0,
+ 965, 615, 2955, 616, 2955, 622, 965, 959, 978, 977,
+
+ 968, 964, 0, 963, 624, 2955, 625, 2955, 0, 697,
+ 2955, 698, 2955, 967, 968, 699, 713, 2955, 955, 966,
+ 944, 960, 950, 958, 0, 715, 951, 933, 939, 717,
+ 718, 2955, 719, 720, 2955, 721, 722, 723, 2955, 724,
+ 725, 0, 941, 283, 951, 937, 739, 2955, 749, 2955,
+ 750, 2955, 928, 730, 753, 2955, 754, 927, 0, 933,
+ 758, 2955, 759, 2955, 760, 2955, 761, 2955, 764, 2955,
+ 765, 2955, 0, 768, 2955, 925, 769, 2955, 773, 607,
+ 683, 951, 948, 947, 946, 943, 942, 940, 937, 935,
+ 934, 933, 929, 928, 927, 926, 925, 2589, 906, 775,
+
+ 2955, 904, 903, 881, 897, 902, 899, 894, 883, 0,
+ 776, 2955, 892, 780, 897, 884, 879, 881, 794, 2955,
+ 888, 770, 0, 795, 2955, 806, 2955, 809, 2955, 810,
+ 2955, 811, 2955, 813, 2955, 891, 879, 798, 879, 877,
+ 870, 0, 883, 815, 2955, 877, 877, 817, 858, 866,
+ 0, 869, 869, 875, 876, 860, 869, 873, 818, 2955,
+ 863, 860, 872, 867, 845, 855, 860, 853, 855, 857,
+ 850, 850, 843, 842, 852, 0, 851, 844, 839, 820,
+ 2955, 851, 0, 841, 850, 835, 833, 843, 0, 0,
+ 849, 831, 845, 828, 820, 823, 822, 826, 0, 828,
+
+ 814, 0, 813, 815, 825, 824, 813, 0, 817, 821,
+ 819, 0, 805, 0, 803, 0, 809, 813, 771, 0,
+ 768, 768, 756, 735, 0, 0, 697, 687, 0, 670,
+ 615, 0, 604, 594, 0, 592, 590, 0, 0, 569,
+ 0, 0, 564, 554, 0, 545, 0, 486, 0, 498,
+ 481, 0, 0, 200, 0, 475, 432, 436, 398, 414,
+ 363, 353, 0, 307, 290, 269, 240, 211, 173, 133,
+ 103, 0, 825, 829, 2955, 2955, 2631, 2637, 2643, 2649,
+ 2654, 2660, 2666, 2671, 2676, 2682, 2688, 2694, 2700, 2706,
+ 2712, 2717, 2722, 2727, 2732, 2737, 2742, 2747, 2752, 2757,
+
+ 2762, 2767, 2772, 2777, 2782, 2787, 2792, 2798, 2804, 2809,
+ 2813, 2817, 2821, 2825, 2829, 2833, 2837, 2841, 2845, 2849,
+ 2853, 2857, 2861, 2865, 2869, 2874, 2879, 2884, 2889, 2894,
+ 2899, 2904, 2909, 2914, 2919, 2924, 2929, 2934, 2939, 2944,
+ 2949
+ } ;
+
+static yyconst flex_int16_t yy_def[642] =
+ { 0,
+ 576, 1, 576, 3, 577, 577, 6, 6, 578, 578,
+ 579, 579, 576, 580, 576, 576, 576, 581, 576, 576,
+ 580, 580, 580, 576, 576, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 576,
+ 576, 582, 576, 576, 576, 580, 580, 580, 580, 583,
+ 584, 584, 584, 585, 584, 584, 583, 584, 584, 586,
+ 587, 588, 576, 576, 589, 588, 588, 587, 588, 588,
+ 588, 590, 580, 576, 576, 581, 576, 580, 24, 24,
+ 576, 24, 591, 592, 593, 594, 595, 596, 597, 598,
+
+ 599, 600, 601, 602, 580, 603, 604, 605, 606, 576,
+ 580, 580, 576, 580, 580, 580, 576, 576, 580, 580,
+ 580, 576, 576, 580, 580, 580, 580, 580, 576, 576,
+ 580, 580, 576, 580, 580, 576, 580, 580, 580, 580,
+ 576, 576, 580, 576, 576, 580, 580, 580, 580, 576,
+ 576, 580, 580, 580, 580, 580, 580, 580, 580, 576,
+ 576, 580, 576, 580, 580, 576, 580, 580, 580, 580,
+ 580, 580, 576, 576, 580, 580, 580, 576, 576, 580,
+ 580, 580, 580, 576, 576, 580, 576, 580, 580, 576,
+ 580, 576, 580, 580, 576, 580, 580, 576, 576, 580,
+
+ 580, 580, 582, 607, 576, 576, 54, 576, 580, 580,
+ 580, 580, 580, 580, 583, 584, 584, 584, 585, 584,
+ 586, 608, 584, 587, 588, 576, 588, 576, 589, 581,
+ 588, 590, 609, 576, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 576, 576, 580, 251, 626, 576, 627, 576, 628, 576,
+ 629, 576, 630, 576, 631, 576, 632, 576, 633, 576,
+ 634, 576, 635, 576, 636, 576, 637, 576, 638, 576,
+ 639, 576, 640, 576, 641, 576, 576, 576, 576, 580,
+ 580, 576, 576, 576, 576, 580, 580, 580, 580, 580,
+
+ 580, 580, 580, 580, 576, 576, 576, 576, 580, 576,
+ 576, 576, 576, 580, 580, 580, 576, 576, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 576, 576, 580, 576, 576, 580, 580, 576, 576, 580,
+ 580, 580, 580, 580, 580, 580, 576, 576, 576, 576,
+ 576, 576, 580, 580, 576, 576, 580, 580, 580, 580,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 580, 576, 576, 580, 576, 576, 580, 580,
+ 580, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 580, 576,
+
+ 576, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 576, 576, 580, 580, 580, 580, 580, 580, 576, 576,
+ 580, 580, 580, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 580, 580, 580, 580, 580,
+ 580, 580, 580, 576, 576, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 576, 576,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 576,
+ 576, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 580, 580, 580, 580, 580, 580, 580,
+ 580, 580, 580, 576, 576, 0, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576
+ } ;
+
+static yyconst flex_int16_t yy_nxt[3013] =
+ { 0,
+ 14, 15, 16, 17, 18, 19, 20, 14, 21, 22,
+ 23, 24, 24, 24, 25, 14, 26, 27, 28, 29,
+ 30, 31, 14, 14, 32, 14, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 14, 14, 14, 14, 14, 14, 14, 48, 14,
+ 14, 14, 14, 49, 14, 50, 51, 14, 15, 16,
+ 17, 18, 19, 53, 14, 14, 22, 14, 14, 14,
+ 14, 25, 14, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 14, 14,
+
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 50, 55, 15, 16, 17, 18, 19, 20,
+ 85, 85, 22, 129, 56, 56, 56, 25, 14, 57,
+ 573, 58, 59, 59, 59, 57, 130, 58, 59, 59,
+ 59, 85, 85, 88, 89, 89, 89, 90, 90, 90,
+ 115, 127, 116, 110, 128, 176, 209, 209, 209, 177,
+ 210, 211, 211, 211, 111, 112, 113, 572, 50, 51,
+ 15, 16, 17, 18, 19, 20, 52, 117, 22, 122,
+ 56, 56, 56, 25, 114, 328, 141, 173, 144, 571,
+ 118, 119, 123, 329, 124, 160, 184, 110, 125, 142,
+
+ 174, 145, 126, 146, 175, 143, 120, 147, 161, 185,
+ 113, 121, 218, 218, 162, 186, 557, 148, 212, 212,
+ 212, 218, 218, 178, 50, 51, 61, 62, 63, 64,
+ 65, 66, 133, 558, 67, 198, 179, 180, 181, 68,
+ 570, 187, 182, 134, 135, 136, 183, 286, 199, 228,
+ 228, 137, 188, 189, 190, 138, 192, 216, 191, 220,
+ 287, 200, 139, 228, 228, 140, 288, 193, 194, 195,
+ 300, 201, 301, 196, 569, 197, 227, 226, 226, 289,
+ 69, 51, 61, 62, 63, 64, 65, 66, 70, 568,
+ 67, 213, 211, 211, 211, 68, 226, 230, 231, 226,
+
+ 226, 214, 216, 216, 216, 216, 216, 216, 226, 226,
+ 567, 86, 226, 226, 437, 216, 216, 216, 216, 216,
+ 216, 216, 226, 226, 438, 214, 226, 226, 296, 216,
+ 85, 85, 90, 90, 90, 566, 69, 51, 72, 73,
+ 74, 75, 76, 77, 297, 292, 78, 83, 90, 90,
+ 90, 79, 83, 251, 251, 251, 216, 253, 293, 117,
+ 254, 254, 254, 294, 122, 303, 305, 129, 304, 307,
+ 216, 133, 118, 310, 312, 317, 295, 123, 141, 306,
+ 130, 565, 308, 343, 136, 564, 311, 313, 318, 344,
+ 144, 142, 80, 81, 72, 73, 74, 75, 76, 77,
+
+ 82, 150, 78, 145, 331, 160, 163, 79, 334, 347,
+ 349, 173, 351, 178, 151, 338, 355, 332, 161, 166,
+ 184, 335, 348, 350, 174, 352, 179, 187, 339, 356,
+ 361, 363, 563, 185, 365, 205, 205, 205, 205, 562,
+ 190, 192, 367, 362, 364, 336, 337, 366, 80, 81,
+ 83, 91, 340, 341, 195, 368, 561, 83, 83, 83,
+ 92, 89, 89, 89, 560, 83, 83, 83, 83, 83,
+ 93, 94, 95, 83, 83, 83, 96, 83, 97, 98,
+ 83, 99, 83, 83, 100, 101, 83, 83, 83, 102,
+ 103, 83, 104, 83, 105, 94, 96, 106, 98, 83,
+
+ 107, 83, 101, 108, 109, 150, 369, 559, 371, 198,
+ 374, 556, 377, 206, 209, 209, 209, 555, 151, 370,
+ 152, 372, 199, 375, 153, 378, 208, 554, 154, 376,
+ 155, 156, 218, 218, 157, 286, 158, 159, 163, 212,
+ 212, 212, 380, 223, 223, 381, 381, 381, 287, 164,
+ 165, 166, 213, 211, 211, 211, 288, 167, 212, 212,
+ 212, 168, 214, 553, 379, 379, 379, 214, 216, 289,
+ 220, 169, 170, 214, 552, 171, 172, 204, 205, 205,
+ 204, 204, 204, 223, 223, 551, 214, 226, 226, 550,
+ 204, 214, 226, 226, 227, 226, 226, 214, 228, 228,
+
+ 226, 230, 231, 226, 230, 87, 226, 226, 229, 234,
+ 234, 234, 234, 254, 254, 254, 292, 294, 381, 381,
+ 381, 549, 86, 400, 548, 305, 307, 547, 546, 293,
+ 295, 204, 204, 83, 206, 545, 401, 204, 306, 308,
+ 83, 83, 83, 83, 83, 207, 207, 208, 83, 207,
+ 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
+ 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
+ 207, 207, 207, 207, 207, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 222, 223,
+ 223, 222, 222, 222, 381, 381, 381, 544, 310, 312,
+
+ 411, 222, 216, 216, 216, 216, 216, 216, 254, 254,
+ 254, 311, 313, 412, 317, 216, 419, 398, 424, 331,
+ 426, 334, 428, 430, 338, 432, 434, 318, 543, 420,
+ 542, 425, 332, 427, 335, 429, 431, 339, 433, 435,
+ 347, 83, 222, 204, 225, 226, 226, 225, 225, 225,
+ 349, 351, 442, 348, 355, 444, 216, 225, 541, 361,
+ 363, 365, 367, 350, 352, 369, 371, 356, 445, 374,
+ 377, 443, 362, 364, 366, 368, 400, 411, 370, 372,
+ 540, 459, 375, 378, 379, 379, 379, 539, 538, 401,
+ 412, 537, 466, 214, 460, 419, 424, 467, 225, 225,
+
+ 225, 226, 226, 225, 225, 225, 468, 426, 420, 425,
+ 428, 430, 432, 225, 434, 471, 444, 214, 480, 459,
+ 427, 480, 472, 429, 431, 433, 574, 435, 473, 445,
+ 574, 481, 460, 536, 481, 535, 534, 533, 532, 575,
+ 531, 530, 529, 575, 528, 527, 526, 525, 524, 523,
+ 522, 521, 520, 519, 225, 225, 233, 234, 234, 233,
+ 233, 233, 518, 517, 516, 515, 514, 513, 512, 233,
+ 511, 510, 509, 508, 507, 506, 505, 504, 503, 502,
+ 501, 500, 499, 498, 497, 496, 495, 494, 493, 492,
+ 491, 490, 489, 488, 487, 486, 485, 484, 483, 482,
+
+ 479, 478, 477, 476, 475, 474, 470, 469, 465, 464,
+ 233, 233, 91, 463, 462, 461, 458, 457, 456, 455,
+ 454, 453, 452, 451, 450, 449, 284, 282, 280, 278,
+ 276, 235, 236, 237, 274, 272, 270, 238, 268, 239,
+ 240, 266, 241, 264, 262, 242, 243, 260, 258, 256,
+ 244, 245, 252, 246, 448, 447, 236, 238, 247, 240,
+ 446, 248, 441, 243, 249, 250, 83, 252, 440, 439,
+ 436, 423, 422, 83, 253, 83, 83, 254, 254, 254,
+ 421, 83, 418, 417, 416, 415, 414, 413, 410, 409,
+ 408, 407, 406, 405, 404, 403, 402, 399, 284, 282,
+
+ 280, 278, 276, 274, 272, 270, 268, 83, 83, 256,
+ 266, 264, 262, 260, 258, 83, 83, 83, 83, 83,
+ 83, 83, 256, 83, 252, 284, 282, 280, 278, 276,
+ 274, 272, 270, 268, 266, 264, 262, 260, 258, 256,
+ 252, 219, 217, 373, 373, 360, 359, 358, 357, 83,
+ 83, 258, 354, 353, 346, 345, 342, 83, 83, 83,
+ 83, 83, 83, 83, 333, 83, 330, 327, 326, 325,
+ 324, 323, 322, 321, 320, 319, 316, 315, 314, 309,
+ 302, 299, 298, 291, 290, 86, 87, 84, 217, 202,
+ 148, 83, 83, 260, 149, 132, 131, 87, 84, 83,
+
+ 83, 83, 83, 83, 83, 83, 576, 83, 52, 52,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 83, 83, 262, 576, 576, 576, 576,
+ 576, 83, 83, 83, 83, 83, 83, 83, 576, 83,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 83, 83, 264, 576, 576,
+ 576, 576, 576, 83, 83, 83, 83, 83, 83, 83,
+ 576, 83, 576, 576, 576, 576, 576, 576, 576, 576,
+
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 83, 83, 266,
+ 576, 576, 576, 576, 576, 83, 83, 83, 83, 83,
+ 83, 83, 576, 83, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 83,
+ 83, 268, 576, 576, 576, 576, 576, 83, 83, 83,
+ 83, 83, 83, 83, 576, 83, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+
+ 576, 83, 83, 270, 576, 576, 576, 576, 576, 83,
+ 83, 83, 83, 83, 83, 83, 576, 83, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 83, 83, 272, 576, 576, 576, 576,
+ 576, 83, 83, 83, 83, 83, 83, 83, 576, 83,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 83, 83, 274, 576, 576,
+ 576, 576, 576, 83, 83, 83, 83, 83, 83, 83,
+
+ 576, 83, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 83, 83, 276,
+ 576, 576, 576, 576, 576, 83, 83, 83, 83, 83,
+ 83, 83, 576, 83, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 83,
+ 83, 278, 576, 576, 576, 576, 576, 83, 83, 83,
+ 83, 83, 83, 83, 576, 83, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 83, 83, 280, 576, 576, 576, 576, 576, 83,
+ 83, 83, 83, 83, 83, 83, 576, 83, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 83, 83, 282, 576, 576, 576, 576,
+ 576, 83, 83, 83, 83, 83, 83, 83, 576, 83,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 83, 83, 284, 576, 576,
+
+ 576, 576, 576, 83, 83, 83, 83, 83, 83, 83,
+ 576, 83, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 83, 204, 205,
+ 205, 204, 204, 204, 576, 576, 576, 576, 576, 576,
+ 576, 204, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 204, 204, 222, 223, 223, 222, 222, 222,
+
+ 576, 576, 576, 576, 576, 576, 576, 222, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 222, 204,
+ 225, 226, 226, 225, 225, 225, 576, 576, 576, 576,
+ 576, 576, 576, 225, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+
+ 576, 576, 576, 576, 225, 225, 233, 234, 234, 233,
+ 233, 233, 576, 576, 576, 576, 576, 576, 576, 233,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 233, 233, 83, 91, 576, 576, 576, 576, 576, 83,
+ 83, 83, 83, 251, 251, 251, 576, 83, 83, 83,
+ 83, 83, 93, 94, 95, 83, 83, 83, 96, 83,
+ 97, 98, 83, 99, 83, 83, 100, 101, 83, 83,
+
+ 83, 102, 103, 83, 104, 83, 105, 94, 96, 106,
+ 98, 83, 107, 83, 101, 108, 109, 83, 252, 576,
+ 576, 576, 576, 576, 83, 83, 83, 83, 83, 83,
+ 83, 576, 83, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 83, 83,
+ 256, 576, 576, 576, 576, 576, 83, 83, 83, 83,
+ 83, 83, 83, 576, 83, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+
+ 83, 83, 258, 576, 576, 576, 576, 576, 83, 83,
+ 83, 83, 83, 83, 83, 576, 83, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 83, 83, 260, 576, 576, 576, 576, 576,
+ 83, 83, 83, 83, 83, 83, 83, 576, 83, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 83, 83, 262, 576, 576, 576,
+ 576, 576, 83, 83, 83, 83, 83, 83, 83, 576,
+
+ 83, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 83, 83, 264, 576,
+ 576, 576, 576, 576, 83, 83, 83, 83, 83, 83,
+ 83, 576, 83, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 83, 83,
+ 266, 576, 576, 576, 576, 576, 83, 83, 83, 83,
+ 83, 83, 83, 576, 83, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 83, 83, 268, 576, 576, 576, 576, 576, 83, 83,
+ 83, 83, 83, 83, 83, 576, 83, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 83, 83, 270, 576, 576, 576, 576, 576,
+ 83, 83, 83, 83, 83, 83, 83, 576, 83, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 83, 83, 272, 576, 576, 576,
+
+ 576, 576, 83, 83, 83, 83, 83, 83, 83, 576,
+ 83, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 83, 83, 274, 576,
+ 576, 576, 576, 576, 83, 83, 83, 83, 83, 83,
+ 83, 576, 83, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 83, 83,
+ 276, 576, 576, 576, 576, 576, 83, 83, 83, 83,
+ 83, 83, 83, 576, 83, 576, 576, 576, 576, 576,
+
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 83, 83, 278, 576, 576, 576, 576, 576, 83, 83,
+ 83, 83, 83, 83, 83, 576, 83, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 83, 83, 280, 576, 576, 576, 576, 576,
+ 83, 83, 83, 83, 83, 83, 83, 576, 83, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+
+ 576, 576, 576, 576, 83, 83, 282, 576, 576, 576,
+ 576, 576, 83, 83, 83, 83, 83, 83, 83, 576,
+ 83, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 83, 83, 284, 576,
+ 576, 576, 576, 576, 83, 83, 83, 83, 83, 83,
+ 83, 576, 83, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 83, 83,
+ 252, 576, 576, 576, 576, 576, 83, 83, 83, 83,
+
+ 83, 83, 83, 576, 83, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 83, 14, 14, 14, 14, 14, 14, 60, 60, 60,
+ 60, 60, 60, 71, 71, 71, 71, 71, 71, 83,
+ 576, 576, 576, 83, 86, 86, 576, 86, 86, 86,
+ 203, 203, 203, 203, 203, 203, 215, 215, 215, 215,
+ 215, 216, 216, 216, 216, 216, 219, 219, 219, 219,
+ 219, 219, 221, 221, 221, 221, 221, 221, 224, 224,
+ 224, 224, 224, 224, 225, 225, 225, 225, 225, 225,
+
+ 229, 229, 229, 229, 229, 229, 232, 232, 232, 232,
+ 232, 232, 255, 255, 576, 576, 255, 257, 257, 576,
+ 576, 257, 259, 259, 576, 576, 259, 261, 261, 576,
+ 576, 261, 263, 263, 576, 576, 263, 265, 265, 576,
+ 576, 265, 267, 267, 576, 576, 267, 269, 269, 576,
+ 576, 269, 271, 271, 576, 576, 271, 273, 273, 576,
+ 576, 273, 275, 275, 576, 576, 275, 277, 277, 576,
+ 576, 277, 279, 279, 576, 576, 279, 281, 281, 576,
+ 576, 281, 283, 283, 576, 576, 283, 285, 285, 576,
+ 576, 285, 204, 204, 204, 204, 204, 204, 222, 222,
+
+ 222, 222, 222, 222, 233, 233, 233, 233, 233, 233,
+ 382, 576, 576, 382, 383, 576, 576, 383, 384, 576,
+ 576, 384, 385, 576, 576, 385, 386, 576, 576, 386,
+ 387, 576, 576, 387, 388, 576, 576, 388, 389, 576,
+ 576, 389, 390, 576, 576, 390, 391, 576, 576, 391,
+ 392, 576, 576, 392, 393, 576, 576, 393, 394, 576,
+ 576, 394, 395, 576, 576, 395, 396, 576, 576, 396,
+ 397, 576, 576, 397, 255, 255, 576, 576, 255, 257,
+ 257, 576, 576, 257, 259, 259, 576, 576, 259, 261,
+ 261, 576, 576, 261, 263, 263, 576, 576, 263, 265,
+
+ 265, 576, 576, 265, 267, 267, 576, 576, 267, 269,
+ 269, 576, 576, 269, 271, 271, 576, 576, 271, 273,
+ 273, 576, 576, 273, 275, 275, 576, 576, 275, 277,
+ 277, 576, 576, 277, 279, 279, 576, 576, 279, 281,
+ 281, 576, 576, 281, 283, 283, 576, 576, 283, 285,
+ 285, 576, 576, 285, 13, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576
+ } ;
+
+static yyconst flex_int16_t yy_chk[3013] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 5, 5, 5, 5, 5, 5,
+ 16, 16, 5, 31, 5, 5, 5, 5, 7, 7,
+ 571, 7, 7, 7, 7, 8, 31, 8, 8, 8,
+ 8, 17, 17, 21, 21, 21, 21, 23, 23, 23,
+ 27, 30, 27, 26, 30, 42, 56, 56, 56, 42,
+ 57, 57, 57, 57, 26, 26, 26, 570, 5, 5,
+ 6, 6, 6, 6, 6, 6, 6, 28, 6, 29,
+ 6, 6, 6, 6, 26, 157, 35, 41, 36, 569,
+ 28, 28, 29, 157, 29, 39, 44, 110, 29, 35,
+
+ 41, 36, 29, 36, 41, 35, 28, 36, 39, 44,
+ 110, 28, 62, 62, 39, 44, 554, 36, 58, 58,
+ 58, 63, 63, 43, 6, 6, 9, 9, 9, 9,
+ 9, 9, 34, 554, 9, 47, 43, 43, 43, 9,
+ 568, 45, 43, 34, 34, 34, 43, 111, 47, 73,
+ 73, 34, 45, 45, 45, 34, 46, 64, 45, 64,
+ 111, 47, 34, 74, 74, 34, 112, 46, 46, 46,
+ 125, 47, 125, 46, 567, 46, 72, 72, 72, 112,
+ 9, 9, 10, 10, 10, 10, 10, 10, 10, 566,
+ 10, 59, 59, 59, 59, 10, 75, 75, 75, 76,
+
+ 76, 59, 60, 60, 60, 60, 60, 60, 77, 77,
+ 565, 64, 79, 79, 344, 60, 67, 67, 67, 67,
+ 67, 67, 80, 80, 344, 59, 81, 81, 120, 67,
+ 85, 85, 88, 88, 88, 564, 10, 10, 11, 11,
+ 11, 11, 11, 11, 120, 116, 11, 90, 90, 90,
+ 90, 11, 92, 92, 92, 92, 60, 105, 116, 117,
+ 105, 105, 105, 119, 122, 127, 128, 129, 127, 131,
+ 67, 133, 117, 134, 135, 140, 119, 122, 141, 128,
+ 129, 562, 131, 168, 133, 561, 134, 135, 140, 168,
+ 144, 141, 11, 11, 12, 12, 12, 12, 12, 12,
+
+ 12, 150, 12, 144, 159, 160, 163, 12, 164, 171,
+ 172, 173, 175, 178, 150, 165, 180, 159, 160, 163,
+ 184, 164, 171, 172, 173, 175, 178, 187, 165, 180,
+ 188, 189, 560, 184, 191, 204, 204, 205, 205, 559,
+ 187, 192, 193, 188, 189, 164, 164, 191, 12, 12,
+ 24, 24, 165, 165, 192, 193, 558, 24, 24, 24,
+ 24, 24, 24, 24, 557, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+
+ 24, 24, 24, 24, 24, 38, 194, 556, 196, 198,
+ 200, 551, 201, 206, 209, 209, 209, 550, 38, 194,
+ 38, 196, 198, 200, 38, 201, 206, 548, 38, 200,
+ 38, 38, 218, 218, 38, 286, 38, 38, 40, 210,
+ 210, 210, 214, 223, 223, 214, 214, 214, 286, 40,
+ 40, 40, 211, 211, 211, 211, 288, 40, 212, 212,
+ 212, 40, 211, 546, 213, 213, 213, 212, 219, 288,
+ 219, 40, 40, 213, 544, 40, 40, 52, 52, 52,
+ 52, 52, 52, 222, 222, 543, 211, 225, 225, 540,
+ 52, 212, 226, 226, 227, 227, 227, 213, 228, 228,
+
+ 229, 229, 229, 230, 230, 230, 231, 231, 231, 233,
+ 233, 234, 234, 253, 253, 253, 292, 294, 380, 380,
+ 380, 537, 219, 296, 536, 305, 307, 534, 533, 292,
+ 294, 52, 52, 54, 54, 531, 296, 222, 305, 307,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 70, 70,
+ 70, 70, 70, 70, 381, 381, 381, 530, 310, 312,
+
+ 316, 70, 215, 215, 215, 215, 215, 215, 254, 254,
+ 254, 310, 312, 316, 317, 215, 326, 254, 330, 331,
+ 333, 334, 336, 337, 338, 340, 341, 317, 528, 326,
+ 527, 330, 331, 333, 334, 336, 337, 338, 340, 341,
+ 347, 254, 70, 70, 71, 71, 71, 71, 71, 71,
+ 349, 351, 354, 347, 355, 357, 215, 71, 524, 361,
+ 363, 365, 367, 349, 351, 369, 371, 355, 357, 374,
+ 377, 354, 361, 363, 365, 367, 400, 411, 369, 371,
+ 523, 414, 374, 377, 379, 379, 379, 522, 521, 400,
+ 411, 519, 422, 379, 414, 419, 424, 422, 71, 71,
+
+ 78, 78, 78, 78, 78, 78, 422, 426, 419, 424,
+ 428, 430, 432, 78, 434, 438, 444, 379, 448, 459,
+ 426, 480, 438, 428, 430, 432, 573, 434, 438, 444,
+ 574, 448, 459, 518, 480, 517, 515, 513, 511, 573,
+ 510, 509, 507, 574, 506, 505, 504, 503, 501, 500,
+ 498, 497, 496, 495, 78, 78, 82, 82, 82, 82,
+ 82, 82, 494, 493, 492, 491, 488, 487, 486, 82,
+ 485, 484, 482, 479, 478, 477, 475, 474, 473, 472,
+ 471, 470, 469, 468, 467, 466, 465, 464, 463, 462,
+ 461, 458, 457, 456, 455, 454, 453, 452, 450, 449,
+
+ 447, 446, 443, 441, 440, 439, 437, 436, 421, 418,
+ 82, 82, 91, 417, 416, 415, 413, 409, 408, 407,
+ 406, 405, 404, 403, 402, 399, 397, 396, 395, 394,
+ 393, 91, 91, 91, 392, 391, 390, 91, 389, 91,
+ 91, 388, 91, 387, 386, 91, 91, 385, 384, 383,
+ 91, 91, 382, 91, 376, 360, 91, 91, 91, 91,
+ 358, 91, 353, 91, 91, 91, 93, 93, 346, 345,
+ 343, 329, 328, 93, 93, 93, 93, 93, 93, 93,
+ 327, 93, 324, 323, 322, 321, 320, 319, 315, 314,
+ 304, 302, 301, 300, 299, 298, 297, 291, 284, 282,
+
+ 280, 278, 276, 274, 272, 270, 268, 93, 94, 94,
+ 266, 264, 262, 260, 258, 94, 94, 94, 94, 94,
+ 94, 94, 256, 94, 252, 250, 249, 248, 247, 246,
+ 245, 244, 243, 242, 241, 240, 239, 238, 237, 236,
+ 235, 220, 217, 202, 197, 186, 183, 182, 181, 94,
+ 95, 95, 177, 176, 170, 169, 167, 95, 95, 95,
+ 95, 95, 95, 95, 162, 95, 158, 156, 155, 154,
+ 153, 152, 149, 147, 146, 143, 139, 138, 137, 132,
+ 126, 124, 121, 115, 114, 87, 86, 84, 61, 49,
+ 48, 95, 96, 96, 37, 33, 32, 18, 15, 96,
+
+ 96, 96, 96, 96, 96, 96, 13, 96, 4, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 96, 97, 97, 0, 0, 0, 0,
+ 0, 97, 97, 97, 97, 97, 97, 97, 0, 97,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 97, 98, 98, 0, 0,
+ 0, 0, 0, 98, 98, 98, 98, 98, 98, 98,
+ 0, 98, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 98, 99, 99,
+ 0, 0, 0, 0, 0, 99, 99, 99, 99, 99,
+ 99, 99, 0, 99, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 99,
+ 100, 100, 0, 0, 0, 0, 0, 100, 100, 100,
+ 100, 100, 100, 100, 0, 100, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 100, 101, 101, 0, 0, 0, 0, 0, 101,
+ 101, 101, 101, 101, 101, 101, 0, 101, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 101, 102, 102, 0, 0, 0, 0,
+ 0, 102, 102, 102, 102, 102, 102, 102, 0, 102,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 102, 103, 103, 0, 0,
+ 0, 0, 0, 103, 103, 103, 103, 103, 103, 103,
+
+ 0, 103, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 103, 104, 104,
+ 0, 0, 0, 0, 0, 104, 104, 104, 104, 104,
+ 104, 104, 0, 104, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 104,
+ 106, 106, 0, 0, 0, 0, 0, 106, 106, 106,
+ 106, 106, 106, 106, 0, 106, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 106, 107, 107, 0, 0, 0, 0, 0, 107,
+ 107, 107, 107, 107, 107, 107, 0, 107, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 107, 108, 108, 0, 0, 0, 0,
+ 0, 108, 108, 108, 108, 108, 108, 108, 0, 108,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 108, 109, 109, 0, 0,
+
+ 0, 0, 0, 109, 109, 109, 109, 109, 109, 109,
+ 0, 109, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 109, 203, 203,
+ 203, 203, 203, 203, 0, 0, 0, 0, 0, 0,
+ 0, 203, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 203, 203, 221, 221, 221, 221, 221, 221,
+
+ 0, 0, 0, 0, 0, 0, 0, 221, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 221, 221,
+ 224, 224, 224, 224, 224, 224, 0, 0, 0, 0,
+ 0, 0, 0, 224, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 224, 224, 232, 232, 232, 232,
+ 232, 232, 0, 0, 0, 0, 0, 0, 0, 232,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 232, 232, 251, 251, 0, 0, 0, 0, 0, 251,
+ 251, 251, 251, 251, 251, 251, 0, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+
+ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 255, 255, 0,
+ 0, 0, 0, 0, 255, 255, 255, 255, 255, 255,
+ 255, 0, 255, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 255, 257,
+ 257, 0, 0, 0, 0, 0, 257, 257, 257, 257,
+ 257, 257, 257, 0, 257, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 257, 259, 259, 0, 0, 0, 0, 0, 259, 259,
+ 259, 259, 259, 259, 259, 0, 259, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 259, 261, 261, 0, 0, 0, 0, 0,
+ 261, 261, 261, 261, 261, 261, 261, 0, 261, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 261, 263, 263, 0, 0, 0,
+ 0, 0, 263, 263, 263, 263, 263, 263, 263, 0,
+
+ 263, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 263, 265, 265, 0,
+ 0, 0, 0, 0, 265, 265, 265, 265, 265, 265,
+ 265, 0, 265, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 265, 267,
+ 267, 0, 0, 0, 0, 0, 267, 267, 267, 267,
+ 267, 267, 267, 0, 267, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 267, 269, 269, 0, 0, 0, 0, 0, 269, 269,
+ 269, 269, 269, 269, 269, 0, 269, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 269, 271, 271, 0, 0, 0, 0, 0,
+ 271, 271, 271, 271, 271, 271, 271, 0, 271, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 271, 273, 273, 0, 0, 0,
+
+ 0, 0, 273, 273, 273, 273, 273, 273, 273, 0,
+ 273, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 273, 275, 275, 0,
+ 0, 0, 0, 0, 275, 275, 275, 275, 275, 275,
+ 275, 0, 275, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 275, 277,
+ 277, 0, 0, 0, 0, 0, 277, 277, 277, 277,
+ 277, 277, 277, 0, 277, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 277, 279, 279, 0, 0, 0, 0, 0, 279, 279,
+ 279, 279, 279, 279, 279, 0, 279, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 279, 281, 281, 0, 0, 0, 0, 0,
+ 281, 281, 281, 281, 281, 281, 281, 0, 281, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 281, 283, 283, 0, 0, 0,
+ 0, 0, 283, 283, 283, 283, 283, 283, 283, 0,
+ 283, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 283, 285, 285, 0,
+ 0, 0, 0, 0, 285, 285, 285, 285, 285, 285,
+ 285, 0, 285, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 285, 398,
+ 398, 0, 0, 0, 0, 0, 398, 398, 398, 398,
+
+ 398, 398, 398, 0, 398, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 398, 577, 577, 577, 577, 577, 577, 578, 578, 578,
+ 578, 578, 578, 579, 579, 579, 579, 579, 579, 580,
+ 0, 0, 0, 580, 581, 581, 0, 581, 581, 581,
+ 582, 582, 582, 582, 582, 582, 583, 583, 583, 583,
+ 583, 584, 584, 584, 584, 584, 585, 585, 585, 585,
+ 585, 585, 586, 586, 586, 586, 586, 586, 587, 587,
+ 587, 587, 587, 587, 588, 588, 588, 588, 588, 588,
+
+ 589, 589, 589, 589, 589, 589, 590, 590, 590, 590,
+ 590, 590, 591, 591, 0, 0, 591, 592, 592, 0,
+ 0, 592, 593, 593, 0, 0, 593, 594, 594, 0,
+ 0, 594, 595, 595, 0, 0, 595, 596, 596, 0,
+ 0, 596, 597, 597, 0, 0, 597, 598, 598, 0,
+ 0, 598, 599, 599, 0, 0, 599, 600, 600, 0,
+ 0, 600, 601, 601, 0, 0, 601, 602, 602, 0,
+ 0, 602, 603, 603, 0, 0, 603, 604, 604, 0,
+ 0, 604, 605, 605, 0, 0, 605, 606, 606, 0,
+ 0, 606, 607, 607, 607, 607, 607, 607, 608, 608,
+
+ 608, 608, 608, 608, 609, 609, 609, 609, 609, 609,
+ 610, 0, 0, 610, 611, 0, 0, 611, 612, 0,
+ 0, 612, 613, 0, 0, 613, 614, 0, 0, 614,
+ 615, 0, 0, 615, 616, 0, 0, 616, 617, 0,
+ 0, 617, 618, 0, 0, 618, 619, 0, 0, 619,
+ 620, 0, 0, 620, 621, 0, 0, 621, 622, 0,
+ 0, 622, 623, 0, 0, 623, 624, 0, 0, 624,
+ 625, 0, 0, 625, 626, 626, 0, 0, 626, 627,
+ 627, 0, 0, 627, 628, 628, 0, 0, 628, 629,
+ 629, 0, 0, 629, 630, 630, 0, 0, 630, 631,
+
+ 631, 0, 0, 631, 632, 632, 0, 0, 632, 633,
+ 633, 0, 0, 633, 634, 634, 0, 0, 634, 635,
+ 635, 0, 0, 635, 636, 636, 0, 0, 636, 637,
+ 637, 0, 0, 637, 638, 638, 0, 0, 638, 639,
+ 639, 0, 0, 639, 640, 640, 0, 0, 640, 641,
+ 641, 0, 0, 641, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+
+ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576,
+ 576, 576
+ } ;
+
+/* Table of booleans, true if rule could match eol. */
+static yyconst flex_int32_t yy_rule_can_match_eol[138] =
+ { 0,
+1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
+
+extern int hyy_flex_debug;
+int hyy_flex_debug = 1;
+
+static yyconst flex_int16_t yy_rule_linenum[137] =
+ { 0,
+ 125, 130, 137, 139, 141, 151, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
+ 199, 200, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
+
+ 253, 254, 255, 256, 257, 261, 262, 267, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 289, 294, 306, 311, 313, 315,
+ 318, 320, 322, 325, 342, 347
+ } ;
+
+static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
+static char *yy_full_match;
+static int yy_lp;
+#define REJECT \
+{ \
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ \
+yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
+++(yy_lp); \
+goto find_rule; \
+}
+
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *hyytext;
+#line 1 "hyp_l.l"
+/*
+ * read hyperlynx files
+ * Copyright 2012, 2016 Koen De Vleeschauwer.
+ *
+ * This file is part of pcb-rnd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+/* avoid collision with other scanners */
+#line 28 "hyp_l.l"
+#include
+
+char *pcb_strdup(const char *s); /* from #include "compat_misc.h" */
+
+#include "hyp_y.h"
+
+/* copy a string between quotes */
+char *strunquote(const char *);
+
+/* remember hyperlynx file section we're in */
+int section = -1;
+
+/*
+* The scanner knows five states: INITIAL, STATE_STRING, STATE_POSINT, STATE_FLOAT and STATE_COMMENT
+*
+* In state INITIAL the scanner recognizes:
+* - punctuation (such as {}()=, )
+* - keywords (such as VERSION, BOARD, NET),
+* - strings (both between double quotes " and unquoted),
+* - and floating point numbers (with optional suffix, eg. 10 uF),
+*
+* In STATE_STRING the scanner recognizes punctuation and strings only.
+* This avoids unquoted strings being interpreted as numbers, or keywords.
+*
+* In STATE_POSINT the scanner recognizes a positive integer.
+*
+* In STATE_FLOAT the scanner recognizes a floating point number (without suffix).
+*
+* In STATE_COMMENT the scanner discards all text up to the next
+* right brace } , and then continues in state INITIAL.
+*
+*/
+
+/* whitespace: space, tab, vertical tab, form feed */
+/* accept windows and unix newlines */
+/*
+* lines with an asterisk in the first column are comments
+*/
+/* Left-hand side of an assignment: check whether next token is equals sign */
+/*
+* Positive integer
+*/
+/*
+* Floating point numbers
+*/
+/* ordinary floating point numbers */
+/* floating point numbers with suffix, e,g. pF, nH */
+/*
+* Strings
+*/
+/* an unquoted string */
+/* a string enclosed in double quotes " */
+#line 1642 "hyp_l.c"
+
+#define INITIAL 0
+#define STATE_STRING 1
+#define STATE_POSINT 2
+#define STATE_FLOAT 3
+#define STATE_COMMENT 4
+#define STATE_COMMENT_EOL 5
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+/* %if-c-only */
+#include
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+/* %if-c-only Reentrant structure and macros (non-C++). */
+/* %if-reentrant */
+/* %if-c-only */
+
+static int yy_init_globals (void );
+
+/* %endif */
+/* %if-reentrant */
+/* %endif */
+/* %endif End reentrant structures and macros. */
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int hyylex_destroy (void );
+
+int hyyget_debug (void );
+
+void hyyset_debug (int debug_flag );
+
+YY_EXTRA_TYPE hyyget_extra (void );
+
+void hyyset_extra (YY_EXTRA_TYPE user_defined );
+
+FILE *hyyget_in (void );
+
+void hyyset_in (FILE * in_str );
+
+FILE *hyyget_out (void );
+
+void hyyset_out (FILE * out_str );
+
+yy_size_t hyyget_leng (void );
+
+char *hyyget_text (void );
+
+int hyyget_lineno (void );
+
+void hyyset_lineno (int line_number );
+
+/* %if-bison-bridge */
+/* %endif */
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int hyywrap (void );
+#else
+extern int hyywrap (void );
+#endif
+#endif
+
+/* %not-for-header */
+
+ static void yyunput (int c,char *buf_ptr );
+
+/* %ok-for-header */
+
+/* %endif */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char *,yyconst char *,int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * );
+#endif
+
+#ifndef YY_NO_INPUT
+/* %if-c-only Standard (non-C++) definition */
+/* %not-for-header */
+
+#ifdef __cplusplus
+static int yyinput (void );
+#else
+static int input (void );
+#endif
+/* %ok-for-header */
+
+/* %endif */
+#endif
+
+/* %if-c-only */
+
+/* %endif */
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
+#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* %if-c-only Standard (non-C++) definition */
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO do { if (fwrite( hyytext, hyyleng, 1, hyyout )) {} } while (0)
+/* %endif */
+/* %if-c++-only C++ definition */
+/* %endif */
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+ { \
+ int c = '*'; \
+ int n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( hyyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( hyyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else \
+ { \
+ errno=0; \
+ while ( (result = fread(buf, 1, (yy_size_t) max_size, hyyin)) == 0 && ferror(hyyin)) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(hyyin); \
+ } \
+ }\
+\
+/* %if-c++-only C++ definition \ */\
+/* %endif */
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+/* %if-c-only */
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+#endif
+
+/* %if-tables-serialization structures and prototypes */
+/* %not-for-header */
+
+/* %ok-for-header */
+
+/* %not-for-header */
+
+/* %tables-yydmap generated elements */
+/* %endif */
+/* end tables serialization structures and prototypes */
+
+/* %ok-for-header */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+/* %if-c-only Standard (non-C++) definition */
+
+extern int hyylex (void);
+
+#define YY_DECL int hyylex (void)
+/* %endif */
+/* %if-c++-only C++ definition */
+/* %endif */
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after hyytext and hyyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+/* %% [6.0] YY_RULE_SETUP definition goes here */
+#define YY_RULE_SETUP \
+ if ( hyyleng > 0 ) \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
+ (hyytext[hyyleng - 1] == '\n'); \
+ YY_USER_ACTION
+
+/* %not-for-header */
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+
+ if ( !(yy_init) )
+ {
+ (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ /* Create the reject buffer large enough to save one state per allowed character. */
+ if ( ! (yy_state_buf) )
+ (yy_state_buf) = (yy_state_type *)hyyalloc(YY_STATE_BUF_SIZE );
+ if ( ! (yy_state_buf) )
+ YY_FATAL_ERROR( "out of dynamic memory in hyylex()" );
+
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
+
+ if ( ! hyyin )
+/* %if-c-only */
+ hyyin = stdin;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+ if ( ! hyyout )
+/* %if-c-only */
+ hyyout = stdout;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+ if ( ! YY_CURRENT_BUFFER ) {
+ hyyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ hyy_create_buffer(hyyin,YY_BUF_SIZE );
+ }
+
+ hyy_load_buffer_state( );
+ }
+
+ {
+/* %% [7.0] user's declarations go here */
+#line 121 "hyp_l.l"
+
+
+ /* When in STATE_COMMENT skip all comment until next right brace */
+#line 1942 "hyp_l.c"
+
+ while ( 1 ) /* loops until end-of-file is reached */
+ {
+/* %% [8.0] yymore()-related code goes here */
+ yy_cp = (yy_c_buf_p);
+
+ /* Support of hyytext. */
+ *yy_cp = (yy_hold_char);
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+/* %% [9.0] code to set up and find next match goes here */
+ yy_current_state = (yy_start);
+ yy_current_state += YY_AT_BOL();
+
+ (yy_state_ptr) = (yy_state_buf);
+ *(yy_state_ptr)++ = yy_current_state;
+
+yy_match:
+ do
+ {
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 577 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ *(yy_state_ptr)++ = yy_current_state;
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 2955 );
+
+yy_find_action:
+/* %% [10.0] code to find the action number goes here */
+ yy_current_state = *--(yy_state_ptr);
+ (yy_lp) = yy_accept[yy_current_state];
+find_rule: /* we branch to this label when backing up */
+ for ( ; ; ) /* until we find what rule we matched */
+ {
+ if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
+ {
+ yy_act = yy_acclist[(yy_lp)];
+ {
+ (yy_full_match) = yy_cp;
+ break;
+ }
+ }
+ --yy_cp;
+ yy_current_state = *--(yy_state_ptr);
+ (yy_lp) = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+/* %% [11.0] code for hyylineno update goes here */
+
+ if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
+ {
+ yy_size_t yyl;
+ for ( yyl = 0; yyl < hyyleng; ++yyl )
+ if ( hyytext[yyl] == '\n' )
+
+ hyylineno++;
+;
+ }
+
+do_action: /* This label is used only to access EOF actions. */
+
+/* %% [12.0] debug code goes here */
+ if ( hyy_flex_debug )
+ {
+ if ( yy_act == 0 )
+ fprintf( stderr, "--scanner backing up\n" );
+ else if ( yy_act < 137 )
+ fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
+ (long)yy_rule_linenum[yy_act], hyytext );
+ else if ( yy_act == 137 )
+ fprintf( stderr, "--accepting default rule (\"%s\")\n",
+ hyytext );
+ else if ( yy_act == 138 )
+ fprintf( stderr, "--(end of buffer or a NUL)\n" );
+ else
+ fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
+ }
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+/* %% [13.0] actions go here */
+
+case 1:
+/* rule 1 can match eol */
+YY_RULE_SETUP
+#line 125 "hyp_l.l"
+{ BEGIN INITIAL; /* skip all comment until next right brace */ }
+ YY_BREAK
+
+/* When in STATE_COMMENT_EOL skip all comment until end-of-line */
+
+case 2:
+/* rule 2 can match eol */
+YY_RULE_SETUP
+#line 130 "hyp_l.l"
+{ BEGIN INITIAL; /* skip all comment until next end-of-line */ }
+ YY_BREAK
+
+/* skip comments and whitespace */
+
+case 3:
+/* rule 3 can match eol */
+YY_RULE_SETUP
+#line 137 "hyp_l.l"
+{ /* skip comments */ }
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 139 "hyp_l.l"
+{ /* skip whitespace */ }
+ YY_BREAK
+case 5:
+/* rule 5 can match eol */
+YY_RULE_SETUP
+#line 141 "hyp_l.l"
+{ /* skip newlines */ }
+ YY_BREAK
+
+/*
+ * Hyperlynx keywords
+ */
+/* Sections */
+case 6:
+YY_RULE_SETUP
+#line 151 "hyp_l.l"
+{section = H_BOARD_FILE; return H_BOARD_FILE;}
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 152 "hyp_l.l"
+{section = H_VERSION; return H_VERSION;}
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 153 "hyp_l.l"
+{section = H_DATA_MODE; return H_DATA_MODE;}
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 154 "hyp_l.l"
+{section = H_UNITS; return H_UNITS;}
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 155 "hyp_l.l"
+{section = H_PLANE_SEP; return H_PLANE_SEP;}
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 156 "hyp_l.l"
+{section = H_BOARD; BEGIN STATE_COMMENT_EOL; return H_BOARD;}
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 157 "hyp_l.l"
+{section = H_STACKUP; BEGIN STATE_COMMENT_EOL; return H_STACKUP;}
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 158 "hyp_l.l"
+{section = H_DEVICES; BEGIN STATE_COMMENT_EOL; return H_DEVICES;}
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 159 "hyp_l.l"
+{section = H_SUPPLIES; BEGIN STATE_COMMENT_EOL; return H_SUPPLIES;}
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 160 "hyp_l.l"
+{section = H_PADSTACK; BEGIN STATE_STRING; return H_PADSTACK;}
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 161 "hyp_l.l"
+{section = H_NET; BEGIN STATE_STRING; return H_NET;}
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 162 "hyp_l.l"
+{section = H_NET_CLASS; return H_NET_CLASS;}
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 163 "hyp_l.l"
+{section = H_END; return H_END;}
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 164 "hyp_l.l"
+{section = H_KEY; return H_KEY;}
+ YY_BREAK
+/* Keywords */
+case 20:
+YY_RULE_SETUP
+#line 168 "hyp_l.l"
+{return H_A;}
+ YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 169 "hyp_l.l"
+{return H_ARC;}
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 170 "hyp_l.l"
+{return H_COPPER;}
+ YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 171 "hyp_l.l"
+{return H_CURVE;}
+ YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 172 "hyp_l.l"
+{if (section == H_DATA_MODE) BEGIN STATE_COMMENT; return H_DETAILED;}
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 173 "hyp_l.l"
+{return H_DIELECTRIC;}
+ YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 174 "hyp_l.l"
+{return H_ENGLISH;}
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 175 "hyp_l.l"
+{if (section == H_UNITS) BEGIN STATE_COMMENT; return H_LENGTH;}
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 176 "hyp_l.l"
+{return H_LINE;}
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 177 "hyp_l.l"
+{return H_METRIC;}
+ YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 178 "hyp_l.l"
+{return H_M;}
+ YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 179 "hyp_l.l"
+{return H_N;}
+ YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 180 "hyp_l.l"
+{return H_OPTIONS;}
+ YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 181 "hyp_l.l"
+{return H_PAD;}
+ YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 182 "hyp_l.l"
+{return H_PERIMETER_ARC;}
+ YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 183 "hyp_l.l"
+{return H_PERIMETER_SEGMENT;}
+ YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 184 "hyp_l.l"
+{return H_PIN;}
+ YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 185 "hyp_l.l"
+{return H_PLANE;}
+ YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 186 "hyp_l.l"
+{return H_POLYGON;}
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 187 "hyp_l.l"
+{return H_POLYLINE;}
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 188 "hyp_l.l"
+{return H_POLYVOID;}
+ YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 189 "hyp_l.l"
+{return H_POUR;}
+ YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 190 "hyp_l.l"
+{return H_S;}
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 191 "hyp_l.l"
+{return H_T;}
+ YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 192 "hyp_l.l"
+{return H_SEG;}
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 193 "hyp_l.l"
+{return H_SIGNAL;}
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 194 "hyp_l.l"
+{if (section == H_DATA_MODE) BEGIN STATE_COMMENT; return H_SIMPLIFIED; }
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 195 "hyp_l.l"
+{return H_SIM_BOTH;}
+ YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 196 "hyp_l.l"
+{return H_SIM_IN;}
+ YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 197 "hyp_l.l"
+{return H_SIM_OUT;}
+ YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 198 "hyp_l.l"
+{return H_USEG;}
+ YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 199 "hyp_l.l"
+{return H_VIA;}
+ YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 200 "hyp_l.l"
+{if (section == H_UNITS) BEGIN STATE_COMMENT; return H_WEIGHT;}
+ YY_BREAK
+/* Assignments */
+case 53:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 204 "hyp_l.l"
+{return H_A;}
+ YY_BREAK
+case 54:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 205 "hyp_l.l"
+{return H_A1;}
+ YY_BREAK
+case 55:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 206 "hyp_l.l"
+{return H_A2;}
+ YY_BREAK
+case 56:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 207 "hyp_l.l"
+{return H_BR;}
+ YY_BREAK
+case 57:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 208 "hyp_l.l"
+{return H_C;}
+ YY_BREAK
+case 58:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 209 "hyp_l.l"
+{return H_C_QM;}
+ YY_BREAK
+case 59:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 210 "hyp_l.l"
+{return H_CO_QM;}
+ YY_BREAK
+case 60:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 211 "hyp_l.l"
+{return H_D;}
+ YY_BREAK
+case 61:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 212 "hyp_l.l"
+{return H_ER;}
+ YY_BREAK
+case 62:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 213 "hyp_l.l"
+{return H_F;}
+ YY_BREAK
+case 63:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 214 "hyp_l.l"
+{BEGIN STATE_POSINT; return H_ID;}
+ YY_BREAK
+case 64:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 215 "hyp_l.l"
+{BEGIN STATE_STRING; return H_L;}
+ YY_BREAK
+case 65:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 216 "hyp_l.l"
+{BEGIN STATE_STRING; return H_L1;}
+ YY_BREAK
+case 66:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 217 "hyp_l.l"
+{BEGIN STATE_STRING; return H_L2;}
+ YY_BREAK
+case 67:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 218 "hyp_l.l"
+{return H_LPS;}
+ YY_BREAK
+case 68:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 219 "hyp_l.l"
+{return H_LT;}
+ YY_BREAK
+case 69:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 220 "hyp_l.l"
+{BEGIN STATE_STRING; return H_M;}
+ YY_BREAK
+case 70:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 221 "hyp_l.l"
+{BEGIN STATE_STRING; return H_N;}
+ YY_BREAK
+case 71:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 4;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 222 "hyp_l.l"
+{BEGIN STATE_STRING; return H_NAME;}
+ YY_BREAK
+/* P is used as "plating thickness" in "stackup/signal" and as "padstack" in "net/via" */
+case 72:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 224 "hyp_l.l"
+{if (section == H_NET) BEGIN STATE_STRING; return H_P;}
+ YY_BREAK
+case 73:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 225 "hyp_l.l"
+{BEGIN STATE_STRING; return H_PKG;}
+ YY_BREAK
+case 74:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 226 "hyp_l.l"
+{return H_PR_QM;}
+ YY_BREAK
+case 75:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 227 "hyp_l.l"
+{return H_PS;}
+ YY_BREAK
+case 76:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 228 "hyp_l.l"
+{return H_R;}
+ YY_BREAK
+case 77:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 229 "hyp_l.l"
+{BEGIN STATE_STRING; return H_REF;}
+ YY_BREAK
+case 78:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 230 "hyp_l.l"
+{BEGIN STATE_STRING; return H_S;}
+ YY_BREAK
+case 79:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 231 "hyp_l.l"
+{return H_SX;}
+ YY_BREAK
+case 80:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 232 "hyp_l.l"
+{return H_SY;}
+ YY_BREAK
+case 81:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 233 "hyp_l.l"
+{BEGIN STATE_STRING; return H_S1;}
+ YY_BREAK
+case 82:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 234 "hyp_l.l"
+{return H_S1X;}
+ YY_BREAK
+case 83:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 235 "hyp_l.l"
+{return H_S1Y;}
+ YY_BREAK
+case 84:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 236 "hyp_l.l"
+{BEGIN STATE_STRING; return H_S2;}
+ YY_BREAK
+case 85:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 237 "hyp_l.l"
+{return H_S2X;}
+ YY_BREAK
+case 86:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 238 "hyp_l.l"
+{return H_S2Y;}
+ YY_BREAK
+case 87:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 239 "hyp_l.l"
+{return H_T;}
+ YY_BREAK
+case 88:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 240 "hyp_l.l"
+{return H_TC;}
+ YY_BREAK
+case 89:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 17;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 241 "hyp_l.l"
+{return H_USE_DIE_FOR_METAL;}
+ YY_BREAK
+case 90:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 242 "hyp_l.l"
+{BEGIN STATE_STRING; return H_V;}
+ YY_BREAK
+case 91:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 243 "hyp_l.l"
+{return H_V_QM;}
+ YY_BREAK
+case 92:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 3;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 244 "hyp_l.l"
+{return H_VAL;}
+ YY_BREAK
+case 93:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 245 "hyp_l.l"
+{return H_W;}
+ YY_BREAK
+case 94:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 246 "hyp_l.l"
+{return H_X;}
+ YY_BREAK
+case 95:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 247 "hyp_l.l"
+{return H_X1;}
+ YY_BREAK
+case 96:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 248 "hyp_l.l"
+{return H_X2;}
+ YY_BREAK
+case 97:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 249 "hyp_l.l"
+{return H_XC;}
+ YY_BREAK
+case 98:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 250 "hyp_l.l"
+{return H_Y;}
+ YY_BREAK
+case 99:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 251 "hyp_l.l"
+{return H_Y1;}
+ YY_BREAK
+case 100:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 252 "hyp_l.l"
+{return H_Y2;}
+ YY_BREAK
+case 101:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 253 "hyp_l.l"
+{return H_YC;}
+ YY_BREAK
+case 102:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 254 "hyp_l.l"
+{return H_Z;}
+ YY_BREAK
+case 103:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 255 "hyp_l.l"
+{return H_ZL;}
+ YY_BREAK
+case 104:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 4;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 256 "hyp_l.l"
+{return H_ZLEN;}
+ YY_BREAK
+case 105:
+*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 2;
+YY_DO_BEFORE_ACTION; /* set up hyytext again */
+YY_RULE_SETUP
+#line 257 "hyp_l.l"
+{return H_ZW;}
+ YY_BREAK
+/* Booleans */
+case 106:
+YY_RULE_SETUP
+#line 261 "hyp_l.l"
+{hyylval.boolval = 1; return H_BOOL; }
+ YY_BREAK
+case 107:
+YY_RULE_SETUP
+#line 262 "hyp_l.l"
+{hyylval.boolval = 0; return H_BOOL; }
+ YY_BREAK
+/* Floats */
+/* ordinary floating point numbers */
+case 108:
+YY_RULE_SETUP
+#line 267 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL); return H_FLOAT;}
+ YY_BREAK
+/* floating point numbers with suffix, e,g. pF, nH */
+case 109:
+YY_RULE_SETUP
+#line 270 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e24; return H_FLOAT;}
+ YY_BREAK
+case 110:
+YY_RULE_SETUP
+#line 271 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e21; return H_FLOAT;}
+ YY_BREAK
+case 111:
+YY_RULE_SETUP
+#line 272 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e18; return H_FLOAT;}
+ YY_BREAK
+case 112:
+YY_RULE_SETUP
+#line 273 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e15; return H_FLOAT;}
+ YY_BREAK
+case 113:
+YY_RULE_SETUP
+#line 274 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e12; return H_FLOAT;}
+ YY_BREAK
+case 114:
+YY_RULE_SETUP
+#line 275 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e9; return H_FLOAT;}
+ YY_BREAK
+case 115:
+YY_RULE_SETUP
+#line 276 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e6; return H_FLOAT;}
+ YY_BREAK
+case 116:
+YY_RULE_SETUP
+#line 277 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e3; return H_FLOAT;}
+ YY_BREAK
+case 117:
+YY_RULE_SETUP
+#line 278 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e-3; return H_FLOAT;}
+ YY_BREAK
+case 118:
+YY_RULE_SETUP
+#line 279 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e-6; return H_FLOAT;}
+ YY_BREAK
+case 119:
+YY_RULE_SETUP
+#line 280 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e-9; return H_FLOAT;}
+ YY_BREAK
+case 120:
+YY_RULE_SETUP
+#line 281 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e-12; return H_FLOAT;}
+ YY_BREAK
+case 121:
+YY_RULE_SETUP
+#line 282 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e-15; return H_FLOAT;}
+ YY_BREAK
+case 122:
+YY_RULE_SETUP
+#line 283 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e-18; return H_FLOAT;}
+ YY_BREAK
+case 123:
+YY_RULE_SETUP
+#line 284 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e-21; return H_FLOAT;}
+ YY_BREAK
+case 124:
+YY_RULE_SETUP
+#line 285 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL) * 1e-24; return H_FLOAT;}
+ YY_BREAK
+/* floating point numbers in VERSION and PLANE_SEP have no suffix and are followed by optional comments */
+
+case 125:
+YY_RULE_SETUP
+#line 289 "hyp_l.l"
+{hyylval.floatval = strtod(hyytext, NULL); BEGIN STATE_COMMENT; return H_FLOAT;}
+ YY_BREAK
+
+/* A positive integer is used only in polygon/polyline/polyvoid "ID = posint" */
+
+case 126:
+YY_RULE_SETUP
+#line 294 "hyp_l.l"
+{ BEGIN INITIAL; hyylval.intval = atoi(hyytext); return H_POSINT; }
+ YY_BREAK
+
+/*
+ * This is a workaround for syntactically incorrect .hyp files.
+ * We accept the following constructs as representing an empty string:
+ * NAME= L1=somelayer
+ * NAME= )
+ * NAME= }
+ */
+
+case 127:
+YY_RULE_SETUP
+#line 306 "hyp_l.l"
+{ yyless(0); BEGIN INITIAL; hyylval.strval = pcb_strdup(""); return H_STRING; } /* emit empty string and reprocess */
+ YY_BREAK
+
+
+case 128:
+YY_RULE_SETUP
+#line 311 "hyp_l.l"
+{return '{';}
+ YY_BREAK
+case 129:
+YY_RULE_SETUP
+#line 313 "hyp_l.l"
+{BEGIN STATE_COMMENT_EOL; return '}';}
+ YY_BREAK
+case 130:
+YY_RULE_SETUP
+#line 315 "hyp_l.l"
+{if (section == H_PADSTACK) BEGIN STATE_STRING; return '(';}
+ YY_BREAK
+/* allow for comment after the closing bracket ) */
+case 131:
+YY_RULE_SETUP
+#line 318 "hyp_l.l"
+{BEGIN STATE_COMMENT_EOL; return ')';}
+ YY_BREAK
+case 132:
+YY_RULE_SETUP
+#line 320 "hyp_l.l"
+{return ',';}
+ YY_BREAK
+case 133:
+YY_RULE_SETUP
+#line 322 "hyp_l.l"
+{if ((section == H_VERSION) || (section == H_PLANE_SEP)) BEGIN STATE_FLOAT; return '=';}
+ YY_BREAK
+/* string */
+case 134:
+YY_RULE_SETUP
+#line 325 "hyp_l.l"
+{
+ /*
+ * Commas are not allowed in strings in the padstack section
+ * unless the string is enclosed in double quotes (").
+ */
+
+ if ((section == H_PADSTACK) && strchr(hyytext, ','))
+ REJECT
+ else
+ {
+ BEGIN INITIAL;
+ hyylval.strval = pcb_strdup(hyytext);
+ return H_STRING;
+ }
+ }
+ YY_BREAK
+/* string in double quotes */
+case 135:
+YY_RULE_SETUP
+#line 342 "hyp_l.l"
+{BEGIN INITIAL; hyylval.strval = strunquote(hyytext); return H_STRING;}
+ YY_BREAK
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(STATE_STRING):
+case YY_STATE_EOF(STATE_POSINT):
+case YY_STATE_EOF(STATE_FLOAT):
+case YY_STATE_EOF(STATE_COMMENT):
+case YY_STATE_EOF(STATE_COMMENT_EOL):
+#line 344 "hyp_l.l"
+{yyterminate();}
+ YY_BREAK
+/* have bison catch all unrecognized characters with parse errors */
+case 136:
+YY_RULE_SETUP
+#line 347 "hyp_l.l"
+{return hyytext[0];}
+ YY_BREAK
+
+case 137:
+YY_RULE_SETUP
+#line 351 "hyp_l.l"
+YY_FATAL_ERROR( "flex scanner jammed" );
+ YY_BREAK
+#line 2947 "hyp_l.c"
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = (yy_hold_char);
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed hyyin at a new source and called
+ * hyylex(). If so, then we have to assure
+ * consistency between YY_CURRENT_BUFFER and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = hyyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++(yy_c_buf_p);
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
+ yy_cp = (yy_c_buf_p);
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ (yy_did_buffer_switch_on_eof) = 0;
+
+ if ( hyywrap( ) )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * hyytext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of user's declarations */
+} /* end of hyylex */
+/* %ok-for-header */
+
+/* %if-c++-only */
+/* %not-for-header */
+
+/* %ok-for-header */
+
+/* %endif */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+/* %if-c-only */
+static int yy_get_next_buffer (void)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ register char *source = (yytext_ptr);
+ register int number_to_move, i;
+ int ret_val;
+
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+ else
+ {
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+
+ YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
+
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ if ( (yy_n_chars) == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ hyyrestart(hyyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) hyyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ }
+
+ (yy_n_chars) += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+ return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+/* %if-c-only */
+/* %not-for-header */
+
+ static yy_state_type yy_get_previous_state (void)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+/* %% [15.0] code to get the start state into yy_current_state goes here */
+ yy_current_state = (yy_start);
+ yy_current_state += YY_AT_BOL();
+
+ (yy_state_ptr) = (yy_state_buf);
+ *(yy_state_ptr)++ = yy_current_state;
+
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+ {
+/* %% [16.0] code to find the next state goes here */
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 577 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ *(yy_state_ptr)++ = yy_current_state;
+ }
+
+ return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+/* %if-c-only */
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ register int yy_is_jam;
+ /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
+
+ register YY_CHAR yy_c = 1;
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 577 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_is_jam = (yy_current_state == 576);
+ if ( ! yy_is_jam )
+ *(yy_state_ptr)++ = yy_current_state;
+
+ return yy_is_jam ? 0 : yy_current_state;
+}
+
+/* %if-c-only */
+
+ static void yyunput (int c, register char * yy_bp )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ register char *yy_cp;
+
+ yy_cp = (yy_c_buf_p);
+
+ /* undo effects of setting up hyytext */
+ *yy_cp = (yy_hold_char);
+
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ { /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ register yy_size_t number_to_move = (yy_n_chars) + 2;
+ register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+ register char *source =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ *--dest = *--source;
+
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
+ }
+
+ *--yy_cp = (char) c;
+
+/* %% [18.0] update hyylineno here */
+
+ if ( c == '\n' ){
+ --hyylineno;
+ }
+
+ (yytext_ptr) = yy_bp;
+ (yy_hold_char) = *yy_cp;
+ (yy_c_buf_p) = yy_cp;
+}
+/* %if-c-only */
+
+/* %endif */
+
+/* %if-c-only */
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+ static int yyinput (void)
+#else
+ static int input (void)
+#endif
+
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
+
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ /* This was really a NUL. */
+ *(yy_c_buf_p) = '\0';
+
+ else
+ { /* need more input */
+ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+ ++(yy_c_buf_p);
+
+ switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ hyyrestart(hyyin );
+
+ /*FALLTHROUGH*/
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( hyywrap( ) )
+ return EOF;
+
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) = (yytext_ptr) + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
+ *(yy_c_buf_p) = '\0'; /* preserve hyytext */
+ (yy_hold_char) = *++(yy_c_buf_p);
+
+/* %% [19.0] update BOL and hyylineno */
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
+
+ hyylineno++;
+;
+
+ return c;
+}
+/* %if-c-only */
+#endif /* ifndef YY_NO_INPUT */
+/* %endif */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+/* %if-c-only */
+ void hyyrestart (FILE * input_file )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+
+ if ( ! YY_CURRENT_BUFFER ){
+ hyyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ hyy_create_buffer(hyyin,YY_BUF_SIZE );
+ }
+
+ hyy_init_buffer(YY_CURRENT_BUFFER,input_file );
+ hyy_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+/* %if-c-only */
+ void hyy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * hyypop_buffer_state();
+ * hyypush_buffer_state(new_buffer);
+ */
+ hyyensure_buffer_stack ();
+ if ( YY_CURRENT_BUFFER == new_buffer )
+ return;
+
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ hyy_load_buffer_state( );
+
+ /* We don't actually know whether we did this switch during
+ * EOF (hyywrap()) processing, but the only time this flag
+ * is looked at is after hyywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/* %if-c-only */
+static void hyy_load_buffer_state (void)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ hyyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ (yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ *
+ * @return the allocated buffer state.
+ */
+/* %if-c-only */
+ YY_BUFFER_STATE hyy_create_buffer (FILE * file, int size )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) hyyalloc(sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in hyy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) hyyalloc(b->yy_buf_size + 2 );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in hyy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ hyy_init_buffer(b,file );
+
+ return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with hyy_create_buffer()
+ *
+ */
+/* %if-c-only */
+ void hyy_delete_buffer (YY_BUFFER_STATE b )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+
+ if ( ! b )
+ return;
+
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ hyyfree((void *) b->yy_ch_buf );
+
+ hyyfree((void *) b );
+}
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a hyyrestart() or at EOF.
+ */
+/* %if-c-only */
+ static void hyy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+{
+ int oerrno = errno;
+
+ hyy_flush_buffer(b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+ /* If b is the current buffer, then hyy_init_buffer was _probably_
+ * called from hyyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+/* %if-c-only */
+
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+ errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ *
+ */
+/* %if-c-only */
+ void hyy_flush_buffer (YY_BUFFER_STATE b )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == YY_CURRENT_BUFFER )
+ hyy_load_buffer_state( );
+}
+
+/* %if-c-or-c++ */
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ *
+ */
+/* %if-c-only */
+void hyypush_buffer_state (YY_BUFFER_STATE new_buffer )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ if (new_buffer == NULL)
+ return;
+
+ hyyensure_buffer_stack();
+
+ /* This block is copied from hyy_switch_to_buffer. */
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (YY_CURRENT_BUFFER)
+ (yy_buffer_stack_top)++;
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from hyy_switch_to_buffer. */
+ hyy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+/* %endif */
+
+/* %if-c-or-c++ */
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ *
+ */
+/* %if-c-only */
+void hyypop_buffer_state (void)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ hyy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0)
+ --(yy_buffer_stack_top);
+
+ if (YY_CURRENT_BUFFER) {
+ hyy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+ }
+}
+/* %endif */
+
+/* %if-c-or-c++ */
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+/* %if-c-only */
+static void hyyensure_buffer_stack (void)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ yy_size_t num_to_alloc;
+
+ if (!(yy_buffer_stack)) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1;
+ (yy_buffer_stack) = (struct yy_buffer_state**)hyyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in hyyensure_buffer_stack()" );
+
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+ }
+
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+ /* Increase the buffer to prepare for a possible push. */
+ int grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
+ (yy_buffer_stack) = (struct yy_buffer_state**)hyyrealloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in hyyensure_buffer_stack()" );
+
+ /* zero only the new slots.*/
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+ (yy_buffer_stack_max) = num_to_alloc;
+ }
+}
+/* %endif */
+
+/* %if-c-only */
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE hyy_scan_buffer (char * base, yy_size_t size )
+{
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return 0;
+
+ b = (YY_BUFFER_STATE) hyyalloc(sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in hyy_scan_buffer()" );
+
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = 0;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ hyy_switch_to_buffer(b );
+
+ return b;
+}
+/* %endif */
+
+/* %if-c-only */
+/** Setup the input buffer state to scan a string. The next call to hyylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * hyy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE hyy_scan_string (yyconst char * yystr )
+{
+
+ return hyy_scan_bytes(yystr,strlen(yystr) );
+}
+/* %endif */
+
+/* %if-c-only */
+/** Setup the input buffer state to scan the given bytes. The next call to hyylex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE hyy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
+{
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ yy_size_t i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = _yybytes_len + 2;
+ buf = (char *) hyyalloc(n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in hyy_scan_bytes()" );
+
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
+
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = hyy_scan_buffer(buf,n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in hyy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+}
+/* %endif */
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+/* %if-c-only */
+static void yy_fatal_error (yyconst char* msg )
+{
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up hyytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ hyytext[hyyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = hyytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ hyyleng = yyless_macro_arg; \
+ } \
+ while ( 0 )
+
+/* Accessor methods (get/set functions) to struct members. */
+
+/* %if-c-only */
+/* %if-reentrant */
+/* %endif */
+
+/** Get the current line number.
+ *
+ */
+int hyyget_lineno (void)
+{
+
+ return hyylineno;
+}
+
+/** Get the input stream.
+ *
+ */
+FILE *hyyget_in (void)
+{
+ return hyyin;
+}
+
+/** Get the output stream.
+ *
+ */
+FILE *hyyget_out (void)
+{
+ return hyyout;
+}
+
+/** Get the length of the current token.
+ *
+ */
+yy_size_t hyyget_leng (void)
+{
+ return hyyleng;
+}
+
+/** Get the current token.
+ *
+ */
+
+char *hyyget_text (void)
+{
+ return hyytext;
+}
+
+/* %if-reentrant */
+/* %endif */
+
+/** Set the current line number.
+ * @param line_number
+ *
+ */
+void hyyset_lineno (int line_number )
+{
+
+ hyylineno = line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ *
+ * @see hyy_switch_to_buffer
+ */
+void hyyset_in (FILE * in_str )
+{
+ hyyin = in_str ;
+}
+
+void hyyset_out (FILE * out_str )
+{
+ hyyout = out_str ;
+}
+
+int hyyget_debug (void)
+{
+ return hyy_flex_debug;
+}
+
+void hyyset_debug (int bdebug )
+{
+ hyy_flex_debug = bdebug ;
+}
+
+/* %endif */
+
+/* %if-reentrant */
+/* %if-bison-bridge */
+/* %endif */
+/* %endif if-c-only */
+
+/* %if-c-only */
+static int yy_init_globals (void)
+{
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from hyylex_destroy(), so don't allocate here.
+ */
+
+ /* We do not touch hyylineno unless the option is enabled. */
+ hyylineno = 1;
+
+ (yy_buffer_stack) = 0;
+ (yy_buffer_stack_top) = 0;
+ (yy_buffer_stack_max) = 0;
+ (yy_c_buf_p) = (char *) 0;
+ (yy_init) = 0;
+ (yy_start) = 0;
+
+ (yy_state_buf) = 0;
+ (yy_state_ptr) = 0;
+ (yy_full_match) = 0;
+ (yy_lp) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ hyyin = stdin;
+ hyyout = stdout;
+#else
+ hyyin = (FILE *) 0;
+ hyyout = (FILE *) 0;
+#endif
+
+ /* For future reference: Set errno on error, since we are called by
+ * hyylex_init()
+ */
+ return 0;
+}
+/* %endif */
+
+/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
+/* hyylex_destroy is for both reentrant and non-reentrant scanners. */
+int hyylex_destroy (void)
+{
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ hyy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ hyypop_buffer_state();
+ }
+
+ /* Destroy the stack itself. */
+ hyyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+
+ hyyfree ( (yy_state_buf) );
+ (yy_state_buf) = NULL;
+
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * hyylex() is called, initialization will occur. */
+ yy_init_globals( );
+
+/* %if-reentrant */
+/* %endif */
+ return 0;
+}
+/* %endif */
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+{
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * s )
+{
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+}
+#endif
+
+void *hyyalloc (yy_size_t size )
+{
+ return (void *) malloc( size );
+}
+
+void *hyyrealloc (void * ptr, yy_size_t size )
+{
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return (void *) realloc( (char *) ptr, size );
+}
+
+void hyyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see hyyrealloc() for (char *) cast */
+}
+
+/* %if-tables-serialization definitions */
+/* %define-yytables The name for this specific scanner's tables. */
+#define YYTABLES_NAME "yytables"
+/* %endif */
+
+/* %ok-for-header */
+
+#line 350 "hyp_l.l"
+
+
+
+ /*
+ * copy a quoted string.
+ * e.g. "data 0" -> data 0
+ * a double quote inside the string can be escaped by writing two consecutive double quotes
+ * e.g. "net ""hi""" -> net "hi"
+ */
+
+ char *strunquote(const char *src)
+ {
+ char* dst;
+ size_t len = strlen(src) + 1;
+ dst = (char *)malloc(len);
+ if (dst != NULL)
+ {
+ char* p = (char *)src + 1; /* first char after initial quote */
+ char* q = dst;
+ do
+ if (*p == '"') p++;
+ while ((*q++ = *p++) != '\0');
+ }
+ return dst;
+ }
+
+ /* not truncated */
+
Index: src_plugins/io_hyp/hyp_l.h
===================================================================
--- src_plugins/io_hyp/hyp_l.h (nonexistent)
+++ src_plugins/io_hyp/hyp_l.h (revision 7964)
@@ -0,0 +1,452 @@
+#ifndef hyyHEADER_H
+#define hyyHEADER_H 1
+#define hyyIN_HEADER 1
+
+#line 6 "hyp_l.h"
+
+#line 8 "hyp_l.h"
+
+#define YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+/* %not-for-header */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 39
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* %if-c++-only */
+/* %endif */
+
+/* %if-c-only */
+
+/* %endif */
+
+/* %if-c-only */
+
+/* %endif */
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+/* %if-c-only */
+#include
+#include
+#include
+#include
+/* %endif */
+
+/* %if-tables-serialization */
+/* %endif */
+/* end standard C headers. */
+
+/* %if-c-or-c++ */
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have . Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#endif /* ! C99 */
+
+#endif /* ! FLEXINT_H */
+
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif /* defined (__STDC__) */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+/* %not-for-header */
+
+/* %not-for-header */
+
+/* %if-reentrant */
+/* %endif */
+
+/* %if-not-reentrant */
+
+/* %endif */
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
+#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+/* %if-not-reentrant */
+extern yy_size_t hyyleng;
+/* %endif */
+
+/* %if-c-only */
+/* %if-not-reentrant */
+extern FILE *hyyin, *hyyout;
+/* %endif */
+/* %endif */
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+/* %if-c-only */
+ FILE *yy_input_file;
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ yy_size_t yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* %if-c-only Standard (non-C++) definition */
+/* %not-for-header */
+
+/* %endif */
+
+/* %if-c-only Standard (non-C++) definition */
+
+/* %if-not-reentrant */
+/* %not-for-header */
+
+/* %endif */
+
+void hyyrestart (FILE *input_file );
+void hyy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE hyy_create_buffer (FILE *file,int size );
+void hyy_delete_buffer (YY_BUFFER_STATE b );
+void hyy_flush_buffer (YY_BUFFER_STATE b );
+void hyypush_buffer_state (YY_BUFFER_STATE new_buffer );
+void hyypop_buffer_state (void );
+
+YY_BUFFER_STATE hyy_scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE hyy_scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE hyy_scan_bytes (yyconst char *bytes,yy_size_t len );
+
+/* %endif */
+
+void *hyyalloc (yy_size_t );
+void *hyyrealloc (void *,yy_size_t );
+void hyyfree (void * );
+
+/* %% [1.0] hyytext/hyyin/hyyout/yy_state_type/hyylineno etc. def's & init go here */
+/* Begin user sect3 */
+
+#define hyywrap() 1
+#define YY_SKIP_YYWRAP
+
+#define FLEX_DEBUG
+
+extern int hyylineno;
+
+extern char *hyytext;
+#define yytext_ptr hyytext
+
+/* %if-c-only Standard (non-C++) definition */
+
+/* %endif */
+
+#ifdef YY_HEADER_EXPORT_START_CONDITIONS
+#define INITIAL 0
+#define STATE_STRING 1
+#define STATE_POSINT 2
+#define STATE_FLOAT 3
+#define STATE_COMMENT 4
+#define STATE_COMMENT_EOL 5
+
+#endif
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+/* %if-c-only */
+#include
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+/* %if-c-only Reentrant structure and macros (non-C++). */
+/* %if-reentrant */
+/* %if-c-only */
+
+/* %endif */
+/* %if-reentrant */
+/* %endif */
+/* %endif End reentrant structures and macros. */
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int hyylex_destroy (void );
+
+int hyyget_debug (void );
+
+void hyyset_debug (int debug_flag );
+
+YY_EXTRA_TYPE hyyget_extra (void );
+
+void hyyset_extra (YY_EXTRA_TYPE user_defined );
+
+FILE *hyyget_in (void );
+
+void hyyset_in (FILE * in_str );
+
+FILE *hyyget_out (void );
+
+void hyyset_out (FILE * out_str );
+
+yy_size_t hyyget_leng (void );
+
+char *hyyget_text (void );
+
+int hyyget_lineno (void );
+
+void hyyset_lineno (int line_number );
+
+/* %if-bison-bridge */
+/* %endif */
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int hyywrap (void );
+#else
+extern int hyywrap (void );
+#endif
+#endif
+
+/* %not-for-header */
+
+/* %endif */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char *,yyconst char *,int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * );
+#endif
+
+#ifndef YY_NO_INPUT
+/* %if-c-only Standard (non-C++) definition */
+/* %not-for-header */
+
+/* %endif */
+#endif
+
+/* %if-c-only */
+
+/* %endif */
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
+#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* %if-tables-serialization structures and prototypes */
+/* %not-for-header */
+
+/* %not-for-header */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+/* %if-c-only Standard (non-C++) definition */
+
+extern int hyylex (void);
+
+#define YY_DECL int hyylex (void)
+/* %endif */
+/* %if-c++-only C++ definition */
+/* %endif */
+#endif /* !YY_DECL */
+
+/* %not-for-header */
+
+/* %if-c++-only */
+/* %not-for-header */
+
+/* %endif */
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+/* %if-c-only */
+/* %not-for-header */
+
+#undef YY_NEW_FILE
+#undef YY_FLUSH_BUFFER
+#undef yy_set_bol
+#undef yy_new_buffer
+#undef yy_set_interactive
+#undef YY_DO_BEFORE_ACTION
+
+#ifdef YY_DECL_IS_OURS
+#undef YY_DECL_IS_OURS
+#undef YY_DECL
+#endif
+
+#line 350 "hyp_l.l"
+
+
+#line 451 "hyp_l.h"
+#undef hyyIN_HEADER
+#endif /* hyyHEADER_H */
Index: src_plugins/io_hyp/hyp_l.l
===================================================================
--- src_plugins/io_hyp/hyp_l.l (nonexistent)
+++ src_plugins/io_hyp/hyp_l.l (revision 7964)
@@ -0,0 +1,376 @@
+
+/*
+ * read hyperlynx files
+ * Copyright 2012, 2016 Koen De Vleeschauwer.
+ *
+ * This file is part of pcb-rnd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+%option noyywrap nodefault yylineno debug
+
+/* avoid collision with other scanners */
+%option prefix="hyy"
+
+%{
+#include
+
+char *pcb_strdup(const char *s); /* from #include "compat_misc.h" */
+
+#include "hyp_y.h"
+
+/* copy a string between quotes */
+char *strunquote(const char *);
+
+/* remember hyperlynx file section we're in */
+int section = -1;
+
+%}
+
+ /*
+ * The scanner knows five states: INITIAL, STATE_STRING, STATE_POSINT, STATE_FLOAT and STATE_COMMENT
+ *
+ * In state INITIAL the scanner recognizes:
+ * - punctuation (such as {}()=, )
+ * - keywords (such as VERSION, BOARD, NET),
+ * - strings (both between double quotes " and unquoted),
+ * - and floating point numbers (with optional suffix, eg. 10 uF),
+ *
+ * In STATE_STRING the scanner recognizes punctuation and strings only.
+ * This avoids unquoted strings being interpreted as numbers, or keywords.
+ *
+ * In STATE_POSINT the scanner recognizes a positive integer.
+ *
+ * In STATE_FLOAT the scanner recognizes a floating point number (without suffix).
+ *
+ * In STATE_COMMENT the scanner discards all text up to the next
+ * right brace } , and then continues in state INITIAL.
+ *
+ */
+
+%x STATE_STRING STATE_POSINT STATE_FLOAT STATE_COMMENT STATE_COMMENT_EOL
+
+ /* whitespace: space, tab, vertical tab, form feed */
+WS [ \t\v\f]
+
+ /* accept windows and unix newlines */
+NEWLINE [\r\n]+
+
+ /*
+ * lines with an asterisk in the first column are comments
+ */
+COMMENT ^\*[^\n\r]*[\n\r]+
+
+ /* Left-hand side of an assignment: check whether next token is equals sign */
+LHS [ \t\v\f]*"="
+
+ /*
+ * Positive integer
+ */
+
+POSINT [0-9]+
+
+ /*
+ * Floating point numbers
+ */
+
+ /* ordinary floating point numbers */
+SIMPLE_FLOAT [-+]?([0-9]+"."[0-9]*|"."?[0-9]+)([Ee][-+]?[0-9]+)?
+
+ /* floating point numbers with suffix, e,g. pF, nH */
+FLOAT_SUFFIX [A-Za-z]*{WS}+
+FLOAT_YOTTA {SIMPLE_FLOAT}{WS}*"Y"{FLOAT_SUFFIX}
+FLOAT_ZETA {SIMPLE_FLOAT}{WS}*"Z"{FLOAT_SUFFIX}
+FLOAT_EXA {SIMPLE_FLOAT}{WS}*"E"{FLOAT_SUFFIX}
+FLOAT_PETA {SIMPLE_FLOAT}{WS}*"P"{FLOAT_SUFFIX}
+FLOAT_TERA {SIMPLE_FLOAT}{WS}*"T"{FLOAT_SUFFIX}
+FLOAT_GIGA {SIMPLE_FLOAT}{WS}*"G"{FLOAT_SUFFIX}
+FLOAT_MEGA {SIMPLE_FLOAT}{WS}*"M"{FLOAT_SUFFIX}
+FLOAT_KILO {SIMPLE_FLOAT}{WS}*[Kk]{FLOAT_SUFFIX}
+FLOAT_MILLI {SIMPLE_FLOAT}{WS}*"m"{FLOAT_SUFFIX}
+FLOAT_MICRO {SIMPLE_FLOAT}{WS}*[uU]{FLOAT_SUFFIX}
+FLOAT_NANO {SIMPLE_FLOAT}{WS}*[nN]{FLOAT_SUFFIX}
+FLOAT_PICO {SIMPLE_FLOAT}{WS}*[pP]{FLOAT_SUFFIX}
+FLOAT_FEMTO {SIMPLE_FLOAT}{WS}*[fF]{FLOAT_SUFFIX}
+FLOAT_ATTO {SIMPLE_FLOAT}{WS}*"a"{FLOAT_SUFFIX}
+FLOAT_ZEPTO {SIMPLE_FLOAT}{WS}*"z"{FLOAT_SUFFIX}
+FLOAT_YOCTO {SIMPLE_FLOAT}{WS}*"y"{FLOAT_SUFFIX}
+
+ /*
+ * Strings
+ */
+
+ /* an unquoted string */
+STRING [^ \t\v\f\r\n\{\}\(\)=\"]+
+
+ /* a string enclosed in double quotes " */
+QUOTED_STRING \"([^\"\n]|\"\")*\"
+
+%%
+
+ /* When in STATE_COMMENT skip all comment until next right brace */
+{
+[^\}]* { BEGIN INITIAL; /* skip all comment until next right brace */ }
+}
+
+ /* When in STATE_COMMENT_EOL skip all comment until end-of-line */
+{
+[^\r\n]*{NEWLINE}+ { BEGIN INITIAL; /* skip all comment until next end-of-line */ }
+}
+
+
+ /* skip comments and whitespace */
+<*>{
+
+ {COMMENT} { /* skip comments */ }
+
+ {WS}+ { /* skip whitespace */ }
+
+ {NEWLINE}+ { /* skip newlines */ }
+
+}
+
+ /*
+ * Hyperlynx keywords
+ */
+
+ /* Sections */
+
+"BOARD_FILE" {section = H_BOARD_FILE; return H_BOARD_FILE;}
+"VERSION" {section = H_VERSION; return H_VERSION;}
+"DATA_MODE" {section = H_DATA_MODE; return H_DATA_MODE;}
+"UNITS" {section = H_UNITS; return H_UNITS;}
+"PLANE_SEP" {section = H_PLANE_SEP; return H_PLANE_SEP;}
+"BOARD" {section = H_BOARD; BEGIN STATE_COMMENT_EOL; return H_BOARD;}
+"STACKUP" {section = H_STACKUP; BEGIN STATE_COMMENT_EOL; return H_STACKUP;}
+"DEVICES" {section = H_DEVICES; BEGIN STATE_COMMENT_EOL; return H_DEVICES;}
+"SUPPLIES" {section = H_SUPPLIES; BEGIN STATE_COMMENT_EOL; return H_SUPPLIES;}
+"PADSTACK" {section = H_PADSTACK; BEGIN STATE_STRING; return H_PADSTACK;}
+"NET" {section = H_NET; BEGIN STATE_STRING; return H_NET;}
+"NET_CLASS" {section = H_NET_CLASS; return H_NET_CLASS;}
+"END" {section = H_END; return H_END;}
+"KEY" {section = H_KEY; return H_KEY;}
+
+ /* Keywords */
+
+"A" {return H_A;}
+"ARC" {return H_ARC;}
+"COPPER" {return H_COPPER;}
+"CURVE" {return H_CURVE;}
+"DETAILED" {if (section == H_DATA_MODE) BEGIN STATE_COMMENT; return H_DETAILED;}
+"DIELECTRIC" {return H_DIELECTRIC;}
+"ENGLISH" {return H_ENGLISH;}
+"LENGTH" {if (section == H_UNITS) BEGIN STATE_COMMENT; return H_LENGTH;}
+"LINE" {return H_LINE;}
+"METRIC" {return H_METRIC;}
+"M" {return H_M;}
+"N" {return H_N;}
+"OPTIONS" {return H_OPTIONS;}
+"PAD" {return H_PAD;}
+"PERIMETER_ARC" {return H_PERIMETER_ARC;}
+"PERIMETER_SEGMENT" {return H_PERIMETER_SEGMENT;}
+"PIN" {return H_PIN;}
+"PLANE" {return H_PLANE;}
+"POLYGON" {return H_POLYGON;}
+"POLYLINE" {return H_POLYLINE;}
+"POLYVOID" {return H_POLYVOID;}
+"POUR" {return H_POUR;}
+"S" {return H_S;}
+"T" {return H_T;}
+"SEG" {return H_SEG;}
+"SIGNAL" {return H_SIGNAL;}
+"SIMPLIFIED" {if (section == H_DATA_MODE) BEGIN STATE_COMMENT; return H_SIMPLIFIED; }
+"SIM_BOTH" {return H_SIM_BOTH;}
+"SIM_IN" {return H_SIM_IN;}
+"SIM_OUT" {return H_SIM_OUT;}
+"USEG" {return H_USEG;}
+"VIA" {return H_VIA;}
+"WEIGHT" {if (section == H_UNITS) BEGIN STATE_COMMENT; return H_WEIGHT;}
+
+ /* Assignments */
+
+"A"/{LHS} {return H_A;}
+"A1"/{LHS} {return H_A1;}
+"A2"/{LHS} {return H_A2;}
+"BR"/{LHS} {return H_BR;}
+"C"/{LHS} {return H_C;}
+"C?"/{LHS} {return H_C_QM;}
+"CO?"/{LHS} {return H_CO_QM;}
+"D"/{LHS} {return H_D;}
+"ER"/{LHS} {return H_ER;}
+"F"/{LHS} {return H_F;}
+"ID"/{LHS} {BEGIN STATE_POSINT; return H_ID;}
+"L"/{LHS} {BEGIN STATE_STRING; return H_L;}
+"L1"/{LHS} {BEGIN STATE_STRING; return H_L1;}
+"L2"/{LHS} {BEGIN STATE_STRING; return H_L2;}
+"LPS"/{LHS} {return H_LPS;}
+"LT"/{LHS} {return H_LT;}
+"M"/{LHS} {BEGIN STATE_STRING; return H_M;}
+"N"/{LHS} {BEGIN STATE_STRING; return H_N;}
+"NAME"/{LHS} {BEGIN STATE_STRING; return H_NAME;}
+ /* P is used as "plating thickness" in "stackup/signal" and as "padstack" in "net/via" */
+"P"/{LHS} {if (section == H_NET) BEGIN STATE_STRING; return H_P;}
+"PKG"/{LHS} {BEGIN STATE_STRING; return H_PKG;}
+"PR?"/{LHS} {return H_PR_QM;}
+"PS"/{LHS} {return H_PS;}
+"R"/{LHS} {return H_R;}
+"REF"/{LHS} {BEGIN STATE_STRING; return H_REF;}
+"S"/{LHS} {BEGIN STATE_STRING; return H_S;}
+"SX"/{LHS} {return H_SX;}
+"SY"/{LHS} {return H_SY;}
+"S1"/{LHS} {BEGIN STATE_STRING; return H_S1;}
+"S1X"/{LHS} {return H_S1X;}
+"S1Y"/{LHS} {return H_S1Y;}
+"S2"/{LHS} {BEGIN STATE_STRING; return H_S2;}
+"S2X"/{LHS} {return H_S2X;}
+"S2Y"/{LHS} {return H_S2Y;}
+"T"/{LHS} {return H_T;}
+"TC"/{LHS} {return H_TC;}
+"USE_DIE_FOR_METAL"/{LHS} {return H_USE_DIE_FOR_METAL;}
+"V"/{LHS} {BEGIN STATE_STRING; return H_V;}
+"V?"/{LHS} {return H_V_QM;}
+"VAL"/{LHS} {return H_VAL;}
+"W"/{LHS} {return H_W;}
+"X"/{LHS} {return H_X;}
+"X1"/{LHS} {return H_X1;}
+"X2"/{LHS} {return H_X2;}
+"XC"/{LHS} {return H_XC;}
+"Y"/{LHS} {return H_Y;}
+"Y1"/{LHS} {return H_Y1;}
+"Y2"/{LHS} {return H_Y2;}
+"YC"/{LHS} {return H_YC;}
+"Z"/{LHS} {return H_Z;}
+"ZL"/{LHS} {return H_ZL;}
+"ZLEN"/{LHS} {return H_ZLEN;}
+"ZW"/{LHS} {return H_ZW;}
+
+ /* Booleans */
+
+"YES"|"yes" {hyylval.boolval = 1; return H_BOOL; }
+"NO"|"no" {hyylval.boolval = 0; return H_BOOL; }
+
+ /* Floats */
+
+ /* ordinary floating point numbers */
+{SIMPLE_FLOAT} {hyylval.floatval = strtod(hyytext, NULL); return H_FLOAT;}
+
+ /* floating point numbers with suffix, e,g. pF, nH */
+{FLOAT_YOTTA} {hyylval.floatval = strtod(hyytext, NULL) * 1e24; return H_FLOAT;}
+{FLOAT_ZETA} {hyylval.floatval = strtod(hyytext, NULL) * 1e21; return H_FLOAT;}
+{FLOAT_EXA} {hyylval.floatval = strtod(hyytext, NULL) * 1e18; return H_FLOAT;}
+{FLOAT_PETA} {hyylval.floatval = strtod(hyytext, NULL) * 1e15; return H_FLOAT;}
+{FLOAT_TERA} {hyylval.floatval = strtod(hyytext, NULL) * 1e12; return H_FLOAT;}
+{FLOAT_GIGA} {hyylval.floatval = strtod(hyytext, NULL) * 1e9; return H_FLOAT;}
+{FLOAT_MEGA} {hyylval.floatval = strtod(hyytext, NULL) * 1e6; return H_FLOAT;}
+{FLOAT_KILO} {hyylval.floatval = strtod(hyytext, NULL) * 1e3; return H_FLOAT;}
+{FLOAT_MILLI} {hyylval.floatval = strtod(hyytext, NULL) * 1e-3; return H_FLOAT;}
+{FLOAT_MICRO} {hyylval.floatval = strtod(hyytext, NULL) * 1e-6; return H_FLOAT;}
+{FLOAT_NANO} {hyylval.floatval = strtod(hyytext, NULL) * 1e-9; return H_FLOAT;}
+{FLOAT_PICO} {hyylval.floatval = strtod(hyytext, NULL) * 1e-12; return H_FLOAT;}
+{FLOAT_FEMTO} {hyylval.floatval = strtod(hyytext, NULL) * 1e-15; return H_FLOAT;}
+{FLOAT_ATTO} {hyylval.floatval = strtod(hyytext, NULL) * 1e-18; return H_FLOAT;}
+{FLOAT_ZEPTO} {hyylval.floatval = strtod(hyytext, NULL) * 1e-21; return H_FLOAT;}
+{FLOAT_YOCTO} {hyylval.floatval = strtod(hyytext, NULL) * 1e-24; return H_FLOAT;}
+
+ /* floating point numbers in VERSION and PLANE_SEP have no suffix and are followed by optional comments */
+{
+{SIMPLE_FLOAT} {hyylval.floatval = strtod(hyytext, NULL); BEGIN STATE_COMMENT; return H_FLOAT;}
+}
+
+ /* A positive integer is used only in polygon/polyline/polyvoid "ID = posint" */
+{
+{POSINT} { BEGIN INITIAL; hyylval.intval = atoi(hyytext); return H_POSINT; }
+}
+
+
+ /*
+ * This is a workaround for syntactically incorrect .hyp files.
+ * We accept the following constructs as representing an empty string:
+ * NAME= L1=somelayer
+ * NAME= )
+ * NAME= }
+ */
+{
+([A-Z][A-Z1-2_]*{WS}*"="|")"|"}") { yyless(0); BEGIN INITIAL; hyylval.strval = pcb_strdup(""); return H_STRING; } /* emit empty string and reprocess */
+}
+
+<*>{
+
+ "{" {return '{';}
+
+ "}" {BEGIN STATE_COMMENT_EOL; return '}';}
+
+ "(" {if (section == H_PADSTACK) BEGIN STATE_STRING; return '(';}
+
+ /* allow for comment after the closing bracket ) */
+ ")" {BEGIN STATE_COMMENT_EOL; return ')';}
+
+ "," {return ',';}
+
+ "=" {if ((section == H_VERSION) || (section == H_PLANE_SEP)) BEGIN STATE_FLOAT; return '=';}
+
+ /* string */
+ {STRING} {
+ /*
+ * Commas are not allowed in strings in the padstack section
+ * unless the string is enclosed in double quotes (").
+ */
+
+ if ((section == H_PADSTACK) && strchr(hyytext, ','))
+ REJECT
+ else
+ {
+ BEGIN INITIAL;
+ hyylval.strval = pcb_strdup(hyytext);
+ return H_STRING;
+ }
+ }
+
+ /* string in double quotes */
+ {QUOTED_STRING} {BEGIN INITIAL; hyylval.strval = strunquote(hyytext); return H_STRING;}
+
+ <> {yyterminate();}
+
+ /* have bison catch all unrecognized characters with parse errors */
+ . {return hyytext[0];}
+
+}
+
+%%
+
+ /*
+ * copy a quoted string.
+ * e.g. "data 0" -> data 0
+ * a double quote inside the string can be escaped by writing two consecutive double quotes
+ * e.g. "net ""hi""" -> net "hi"
+ */
+
+ char *strunquote(const char *src)
+ {
+ char* dst;
+ size_t len = strlen(src) + 1;
+ dst = (char *)malloc(len);
+ if (dst != NULL)
+ {
+ char* p = (char *)src + 1; /* first char after initial quote */
+ char* q = dst;
+ do
+ if (*p == '"') p++;
+ while ((*q++ = *p++) != '\0');
+ }
+ return dst;
+ }
+
+ /* not truncated */
Index: src_plugins/io_hyp/hyp_y.c
===================================================================
--- src_plugins/io_hyp/hyp_y.c (nonexistent)
+++ src_plugins/io_hyp/hyp_y.c (revision 7964)
@@ -0,0 +1,3182 @@
+/* A Bison parser, made by GNU Bison 3.0.4. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see . */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "3.0.4"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+/* Substitute the type names. */
+#define YYSTYPE HYYSTYPE
+/* Substitute the variable and function names. */
+#define yyparse hyyparse
+#define yylex hyylex
+#define yyerror hyyerror
+#define yydebug hyydebug
+#define yynerrs hyynerrs
+
+#define yylval hyylval
+#define yychar hyychar
+
+/* Copy the first part of user declarations. */
+
+#line 76 "hyp_y.c" /* yacc.c:339 */
+
+# ifndef YY_NULLPTR
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 1
+#endif
+
+/* In a future release of Bison, this section will be replaced
+ by #include "hyp_y.h". */
+#ifndef YY_HYY_HYP_Y_H_INCLUDED
+# define YY_HYY_HYP_Y_H_INCLUDED
+/* Debug traces. */
+#ifndef HYYDEBUG
+# if defined YYDEBUG
+#if YYDEBUG
+# define HYYDEBUG 1
+# else
+# define HYYDEBUG 0
+# endif
+# else /* ! defined YYDEBUG */
+# define HYYDEBUG 1
+# endif /* ! defined YYDEBUG */
+#endif /* ! defined HYYDEBUG */
+#if HYYDEBUG
+extern int hyydebug;
+#endif
+/* "%code requires" blocks. */
+#line 21 "hyp_y.y" /* yacc.c:355 */
+
+#include "parser.h"
+
+#line 118 "hyp_y.c" /* yacc.c:355 */
+
+/* Token type. */
+#ifndef HYYTOKENTYPE
+# define HYYTOKENTYPE
+ enum hyytokentype
+ {
+ H_BOARD_FILE = 258,
+ H_VERSION = 259,
+ H_DATA_MODE = 260,
+ H_UNITS = 261,
+ H_PLANE_SEP = 262,
+ H_BOARD = 263,
+ H_STACKUP = 264,
+ H_DEVICES = 265,
+ H_SUPPLIES = 266,
+ H_PAD = 267,
+ H_PADSTACK = 268,
+ H_NET = 269,
+ H_NET_CLASS = 270,
+ H_END = 271,
+ H_KEY = 272,
+ H_A = 273,
+ H_ARC = 274,
+ H_COPPER = 275,
+ H_CURVE = 276,
+ H_DETAILED = 277,
+ H_DIELECTRIC = 278,
+ H_ENGLISH = 279,
+ H_LENGTH = 280,
+ H_LINE = 281,
+ H_METRIC = 282,
+ H_N = 283,
+ H_OPTIONS = 284,
+ H_PERIMETER_ARC = 285,
+ H_PERIMETER_SEGMENT = 286,
+ H_PIN = 287,
+ H_PLANE = 288,
+ H_POLYGON = 289,
+ H_POLYLINE = 290,
+ H_POLYVOID = 291,
+ H_POUR = 292,
+ H_S = 293,
+ H_SEG = 294,
+ H_SIGNAL = 295,
+ H_SIMPLIFIED = 296,
+ H_SIM_BOTH = 297,
+ H_SIM_IN = 298,
+ H_SIM_OUT = 299,
+ H_USEG = 300,
+ H_VIA = 301,
+ H_WEIGHT = 302,
+ H_A1 = 303,
+ H_A2 = 304,
+ H_BR = 305,
+ H_C = 306,
+ H_C_QM = 307,
+ H_CO_QM = 308,
+ H_D = 309,
+ H_ER = 310,
+ H_F = 311,
+ H_ID = 312,
+ H_L = 313,
+ H_L1 = 314,
+ H_L2 = 315,
+ H_LPS = 316,
+ H_LT = 317,
+ H_M = 318,
+ H_NAME = 319,
+ H_P = 320,
+ H_PKG = 321,
+ H_PR_QM = 322,
+ H_PS = 323,
+ H_R = 324,
+ H_REF = 325,
+ H_SX = 326,
+ H_SY = 327,
+ H_S1 = 328,
+ H_S1X = 329,
+ H_S1Y = 330,
+ H_S2 = 331,
+ H_S2X = 332,
+ H_S2Y = 333,
+ H_T = 334,
+ H_TC = 335,
+ H_USE_DIE_FOR_METAL = 336,
+ H_V = 337,
+ H_V_QM = 338,
+ H_VAL = 339,
+ H_W = 340,
+ H_X = 341,
+ H_X1 = 342,
+ H_X2 = 343,
+ H_XC = 344,
+ H_Y = 345,
+ H_Y1 = 346,
+ H_Y2 = 347,
+ H_YC = 348,
+ H_Z = 349,
+ H_ZL = 350,
+ H_ZLEN = 351,
+ H_ZW = 352,
+ H_YES = 353,
+ H_NO = 354,
+ H_BOOL = 355,
+ H_POSINT = 356,
+ H_FLOAT = 357,
+ H_STRING = 358
+ };
+#endif
+
+/* Value type. */
+#if ! defined HYYSTYPE && ! defined HYYSTYPE_IS_DECLARED
+
+union HYYSTYPE
+{
+#line 30 "hyp_y.y" /* yacc.c:355 */
+
+ int boolval;
+ int intval;
+ double floatval;
+ char* strval;
+
+#line 241 "hyp_y.c" /* yacc.c:355 */
+};
+
+typedef union HYYSTYPE HYYSTYPE;
+# define HYYSTYPE_IS_TRIVIAL 1
+# define HYYSTYPE_IS_DECLARED 1
+#endif
+
+
+extern HYYSTYPE hyylval;
+
+int hyyparse (void);
+
+#endif /* !YY_HYY_HYP_Y_H_INCLUDED */
+
+/* Copy the second part of user declarations. */
+#line 37 "hyp_y.y" /* yacc.c:358 */
+
+#include
+#include
+#include
+#include
+
+void hyyerror(const char *);
+
+/* HYYPRINT and hyyprint print values of the tokens when debugging is switched on */
+void hyyprint(FILE *, int, HYYSTYPE);
+#define HYYPRINT(file, type, value) hyyprint (file, type, value)
+
+/* clear parse_param struct at beginning of new record */
+void new_record();
+
+/* struct to pass to calling class */
+parse_param h;
+
+
+#line 277 "hyp_y.c" /* yacc.c:358 */
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T
+# include /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include /* INFRINGES ON USER NAME SPACE */
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(E) ((void) (E))
+#else
+# define YYUSE(E) /* empty */
+#endif
+
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined HYYSTYPE_IS_TRIVIAL && HYYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 34
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 761
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 110
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 179
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 310
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 619
+
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 358
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
+static const yytype_uint8 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 107, 108, 2, 2, 109, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 106, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 105, 2, 104, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103
+};
+
+#if HYYDEBUG
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_uint16 yyrline[] =
+{
+ 0, 127, 127, 128, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 150,
+ 150, 155, 155, 160, 163, 164, 169, 172, 173, 176,
+ 177, 181, 181, 186, 187, 190, 191, 194, 195, 196,
+ 200, 201, 202, 205, 208, 211, 211, 211, 216, 219,
+ 220, 223, 224, 225, 226, 227, 230, 233, 233, 234,
+ 238, 238, 241, 242, 245, 246, 247, 248, 249, 250,
+ 251, 252, 253, 254, 257, 257, 260, 261, 264, 265,
+ 266, 267, 268, 269, 270, 271, 275, 275, 278, 279,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 293,
+ 296, 299, 302, 305, 308, 311, 314, 317, 320, 323,
+ 328, 329, 332, 333, 336, 336, 336, 336, 337, 340,
+ 341, 345, 346, 350, 351, 355, 358, 359, 363, 366,
+ 369, 374, 377, 378, 381, 382, 385, 388, 393, 393,
+ 393, 396, 396, 397, 398, 401, 402, 405, 405, 406,
+ 409, 409, 410, 414, 414, 414, 417, 418, 419, 420,
+ 421, 422, 423, 420, 430, 430, 433, 433, 434, 437,
+ 438, 438, 442, 443, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 461, 461, 464, 464,
+ 467, 468, 472, 473, 477, 480, 483, 483, 487, 488,
+ 492, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 512, 515, 518, 521,
+ 521, 524, 525, 529, 530, 534, 537, 538, 539, 540,
+ 544, 544, 547, 548, 552, 553, 554, 555, 556, 560,
+ 560, 563, 564, 568, 569, 570, 568, 575, 576, 575,
+ 580, 580, 582, 586, 586, 586, 590, 591, 595, 596,
+ 597, 598, 602, 606, 607, 608, 612, 612, 612, 616,
+ 616, 616, 620, 621, 625, 626, 627, 631, 631, 634,
+ 634, 637, 637, 637, 642, 642, 645, 646, 650, 651,
+ 655, 656, 657, 661, 661, 664, 664, 664, 669, 674,
+ 674, 679, 679, 682, 682, 685, 685, 688, 691, 691,
+ 691
+};
+#endif
+
+#if HYYDEBUG || YYERROR_VERBOSE || 1
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "H_BOARD_FILE", "H_VERSION",
+ "H_DATA_MODE", "H_UNITS", "H_PLANE_SEP", "H_BOARD", "H_STACKUP",
+ "H_DEVICES", "H_SUPPLIES", "H_PAD", "H_PADSTACK", "H_NET", "H_NET_CLASS",
+ "H_END", "H_KEY", "H_A", "H_ARC", "H_COPPER", "H_CURVE", "H_DETAILED",
+ "H_DIELECTRIC", "H_ENGLISH", "H_LENGTH", "H_LINE", "H_METRIC", "H_N",
+ "H_OPTIONS", "H_PERIMETER_ARC", "H_PERIMETER_SEGMENT", "H_PIN",
+ "H_PLANE", "H_POLYGON", "H_POLYLINE", "H_POLYVOID", "H_POUR", "H_S",
+ "H_SEG", "H_SIGNAL", "H_SIMPLIFIED", "H_SIM_BOTH", "H_SIM_IN",
+ "H_SIM_OUT", "H_USEG", "H_VIA", "H_WEIGHT", "H_A1", "H_A2", "H_BR",
+ "H_C", "H_C_QM", "H_CO_QM", "H_D", "H_ER", "H_F", "H_ID", "H_L", "H_L1",
+ "H_L2", "H_LPS", "H_LT", "H_M", "H_NAME", "H_P", "H_PKG", "H_PR_QM",
+ "H_PS", "H_R", "H_REF", "H_SX", "H_SY", "H_S1", "H_S1X", "H_S1Y", "H_S2",
+ "H_S2X", "H_S2Y", "H_T", "H_TC", "H_USE_DIE_FOR_METAL", "H_V", "H_V_QM",
+ "H_VAL", "H_W", "H_X", "H_X1", "H_X2", "H_XC", "H_Y", "H_Y1", "H_Y2",
+ "H_YC", "H_Z", "H_ZL", "H_ZLEN", "H_ZW", "H_YES", "H_NO", "H_BOOL",
+ "H_POSINT", "H_FLOAT", "H_STRING", "'}'", "'{'", "'='", "'('", "')'",
+ "','", "$accept", "hyp_file", "hyp_section", "board_file", "$@1",
+ "version", "$@2", "data_mode", "mode", "units", "unit_system",
+ "metal_thickness_unit", "plane_sep", "$@3", "board", "board_param_list",
+ "board_param_list_item", "board_param", "perimeter_segment",
+ "perimeter_arc", "board_attribute", "$@4", "$@5", "stackup",
+ "stackup_paramlist", "stackup_param", "options", "options_params", "$@6",
+ "signal", "$@7", "signal_paramlist", "signal_param", "dielectric", "$@8",
+ "dielectric_paramlist", "dielectric_param", "plane", "$@9",
+ "plane_paramlist", "plane_param", "thickness", "plating_thickness",
+ "bulk_resistivity", "temperature_coefficient", "epsilon_r",
+ "loss_tangent", "layer_name", "material_name", "plane_separation",
+ "conformal", "prepreg", "devices", "device_list", "device", "$@10",
+ "$@11", "$@12", "device_paramlist", "device_value", "device_layer",
+ "name", "value", "value_float", "value_string", "package", "supplies",
+ "supply_list", "supply", "voltage_spec", "conversion", "padstack",
+ "$@13", "$@14", "drill_size", "$@15", "padstack_list", "padstack_def",
+ "$@16", "pad_shape", "$@17", "pad_coord", "$@18", "$@19", "pad_type",
+ "$@20", "$@21", "$@22", "$@23", "net", "$@24", "net_separation", "$@25",
+ "net_copper", "$@26", "net_subrecord_list", "net_subrecord", "seg",
+ "$@27", "arc", "$@28", "ps_lps_param", "lps_param", "width",
+ "left_plane_separation", "via", "$@29", "via_param_list", "via_param",
+ "padstack_name", "layer1_name", "layer2_name", "pin", "$@30",
+ "pin_param", "pin_function_param", "pin_reference", "pin_function",
+ "pad", "$@31", "pad_param_list", "pad_param", "useg", "$@32",
+ "useg_param", "useg_stackup", "$@33", "$@34", "$@35", "useg_impedance",
+ "$@36", "$@37", "useg_resistance", "$@38", "polygon", "$@39", "$@40",
+ "polygon_param_list", "polygon_param", "polygon_id", "polygon_type",
+ "polyvoid", "$@41", "$@42", "polyline", "$@43", "$@44",
+ "lines_and_curves", "line_or_curve", "line", "$@45", "curve", "$@46",
+ "net_attribute", "$@47", "$@48", "netclass", "$@49",
+ "netclass_subrecords", "netclass_paramlist", "netclass_param",
+ "net_name", "$@50", "netclass_attribute", "$@51", "$@52", "end", "key",
+ "$@53", "coord_point", "$@54", "coord_point1", "$@55", "coord_point2",
+ "$@56", "coord_line", "coord_arc", "$@57", "$@58", YY_NULLPTR
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 125, 123, 61, 40, 41, 44
+};
+# endif
+
+#define YYPACT_NINF -310
+
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-310)))
+
+#define YYTABLE_NINF -115
+
+#define yytable_value_is_error(Yytable_value) \
+ 0
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const yytype_int16 yypact[] =
+{
+ 13, -5, 319, 10, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -82, 0, 20, 26, 7, 49, -60, 53, -310,
+ 72, 93, 117, 132, -310, -310, 151, 143, 83, 114,
+ 162, 167, -310, 188, 12, -310, 175, 124, -310, -310,
+ -310, -310, -310, -310, 14, 128, -310, 30, 129, -310,
+ 164, 178, 183, -310, 185, -310, -310, -310, -310, 191,
+ -310, -310, 8, -310, -310, 272, 219, 219, 199, -310,
+ -310, -310, -310, -310, 200, -310, -22, -310, -310, -310,
+ -310, 201, 207, -310, -310, 204, 247, -310, -310, 211,
+ -310, -310, -310, 212, -310, -310, -310, 213, 214, 225,
+ 231, 232, 230, -310, -310, -310, -310, 236, 233, -310,
+ -310, 222, 203, -310, -310, -310, 234, 254, -310, -3,
+ 139, 237, -310, -310, -310, 239, 241, 238, -310, 240,
+ 242, 243, 244, 245, 246, 248, 249, 250, 126, -310,
+ -310, -310, -310, -310, -310, -310, -310, 253, 251, 252,
+ 255, 256, 112, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, 257, 258, 103, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, 275, 262, 260, 264, 160,
+ 206, 184, -310, -310, -310, 263, 120, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, 141,
+ -310, 140, -310, -310, -310, -310, -310, -310, 266, 267,
+ 268, 259, 269, 270, 273, 271, 276, 277, -310, -310,
+ -310, 278, 279, 280, 281, -310, -310, 282, 283, -310,
+ -310, 284, -310, 285, 286, 308, 17, 88, 274, 265,
+ -310, 287, -310, -310, -310, 288, -310, 349, -310, -310,
+ -310, -310, -310, 105, -310, -310, -310, 289, 358, 360,
+ -310, -310, 307, 302, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, 290, -310, -310, -310, -310, -310,
+ -310, 291, -310, 295, 293, 292, 294, -310, -310, 265,
+ -310, -310, -310, 51, 51, 344, -310, 317, 298, 219,
+ 317, 219, 219, 317, -310, -310, 299, 300, 301, 303,
+ 316, 318, -310, -310, -310, 310, -310, -310, 304, 265,
+ 306, 309, 311, -310, -310, 115, -310, -310, -310, 115,
+ 317, 312, 25, 313, 329, 350, 329, 361, 74, 320,
+ 321, 322, 324, 315, 323, 71, -310, 55, 265, 326,
+ 107, 328, -310, -310, -310, -310, 330, 325, 327, 331,
+ 332, -310, -1, -310, -310, 364, 333, -20, 364, 334,
+ 232, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 345, 346, 347, 348, 351, 352, 2, -310, -310, -310,
+ -310, -310, -310, -310, -310, 353, 354, 355, 362, 356,
+ -310, -310, 37, 364, -310, -310, -310, -310, 357, -310,
+ -310, -310, -310, -310, 359, 359, 359, -310, 363, 365,
+ 367, 368, -310, -310, 378, -8, 369, 370, -310, -15,
+ -310, -310, 366, -8, 372, 374, 371, 375, 377, 379,
+ 380, 381, 382, 384, 385, 386, 388, 389, 390, 392,
+ 393, -310, -310, 395, 391, -310, -310, -310, 84, 394,
+ -310, -310, -310, -310, 383, -310, 170, 196, 144, -310,
+ -310, -310, 145, 156, 373, -310, -310, -310, -310, 396,
+ 397, -310, -36, -310, -310, 398, -310, -21, -310, -310,
+ -310, -310, 198, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, 399, -310,
+ 402, -310, 401, -310, 387, -310, 1, -310, 400, -310,
+ -310, -310, -310, -310, -310, 403, 404, 408, -310, -310,
+ -310, -310, -310, -310, 405, 406, -310, -310, -310, 410,
+ 409, -310, 412, 411, 413, -310, -310, 219, 317, 414,
+ -310, -310, 415, 417, -310, 416, -310, -310, -310, 418,
+ 420, 421, -310, 422, -310, -310, 423, -310, 424, 430,
+ -310, -310, -310, 426, 425, -310, 432, -310, 419, 429,
+ -310, 427, 435, 436, 437, -310, -310, -310, -42, 428,
+ 431, 438, -310, -310, 439, 440, 441, 444, -310, -310,
+ -310, 442, 433, 445, 447, -310, -310, 446, -310
+};
+
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint16 yydefact[] =
+{
+ 0, 0, 0, 0, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 0, 0, 0, 0, 0, 0, 0, 0, 138,
+ 0, 0, 0, 0, 1, 2, 0, 0, 0, 0,
+ 0, 0, 34, 0, 0, 36, 0, 0, 50, 51,
+ 52, 53, 54, 111, 0, 0, 113, 0, 0, 133,
+ 0, 0, 0, 298, 0, 20, 21, 25, 24, 0,
+ 27, 28, 0, 31, 39, 0, 0, 0, 38, 40,
+ 41, 42, 33, 35, 0, 74, 0, 86, 60, 48,
+ 49, 0, 0, 110, 112, 0, 0, 131, 132, 0,
+ 164, 284, 299, 0, 23, 30, 29, 0, 0, 0,
+ 0, 0, 0, 44, 43, 37, 55, 0, 0, 59,
+ 56, 0, 0, 118, 115, 135, 0, 0, 139, 170,
+ 0, 0, 22, 26, 32, 0, 0, 0, 307, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
+ 78, 80, 81, 84, 85, 82, 83, 0, 0, 0,
+ 0, 0, 0, 89, 90, 92, 93, 94, 95, 96,
+ 97, 98, 0, 0, 0, 63, 64, 65, 67, 68,
+ 69, 70, 71, 72, 73, 0, 0, 0, 0, 0,
+ 0, 0, 166, 165, 168, 0, 0, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 287, 0,
+ 285, 0, 289, 291, 290, 300, 45, 303, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 75, 76,
+ 57, 0, 0, 0, 0, 87, 88, 0, 0, 61,
+ 62, 0, 125, 0, 0, 0, 0, 0, 0, 144,
+ 146, 0, 253, 269, 266, 0, 230, 0, 188, 219,
+ 186, 239, 196, 170, 171, 169, 172, 0, 0, 0,
+ 286, 288, 0, 0, 305, 308, 79, 108, 103, 105,
+ 104, 106, 109, 99, 0, 101, 91, 107, 102, 66,
+ 100, 0, 128, 0, 0, 0, 0, 147, 141, 143,
+ 140, 145, 185, 0, 0, 0, 184, 0, 0, 0,
+ 0, 0, 0, 0, 167, 292, 0, 0, 0, 0,
+ 0, 0, 58, 116, 136, 0, 134, 149, 0, 0,
+ 0, 0, 0, 258, 259, 0, 257, 261, 260, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 137, 0, 142, 0,
+ 0, 0, 256, 254, 270, 267, 0, 0, 0, 0,
+ 0, 234, 0, 233, 281, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 199, 200, 202,
+ 203, 295, 293, 46, 304, 0, 0, 0, 124, 0,
+ 120, 122, 0, 0, 126, 127, 150, 152, 0, 262,
+ 265, 264, 263, 194, 0, 0, 0, 301, 0, 0,
+ 0, 0, 231, 232, 0, 0, 0, 0, 224, 0,
+ 220, 222, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 197, 198, 0, 0, 47, 306, 309, 0, 0,
+ 123, 117, 119, 121, 0, 153, 0, 0, 0, 273,
+ 274, 275, 0, 0, 0, 238, 235, 236, 237, 0,
+ 0, 193, 0, 189, 191, 0, 225, 0, 221, 223,
+ 187, 217, 0, 207, 204, 211, 215, 201, 218, 216,
+ 205, 206, 208, 209, 210, 212, 213, 214, 0, 294,
+ 0, 129, 0, 151, 0, 156, 0, 148, 0, 279,
+ 277, 255, 272, 271, 268, 0, 0, 0, 190, 192,
+ 228, 227, 226, 229, 0, 0, 240, 241, 242, 0,
+ 0, 130, 0, 0, 0, 159, 276, 0, 0, 0,
+ 282, 195, 0, 0, 296, 0, 154, 158, 157, 0,
+ 0, 0, 302, 0, 247, 243, 0, 310, 0, 0,
+ 280, 278, 283, 0, 0, 297, 0, 160, 0, 0,
+ 155, 0, 0, 0, 0, 248, 244, 161, 0, 0,
+ 0, 0, 252, 249, 0, 0, 0, 0, 162, 250,
+ 245, 0, 0, 0, 0, 251, 246, 0, 163
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -310, -310, 459, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, 453, -310, -310, -310,
+ -310, -310, -310, -310, -310, 451, -310, -310, -310, -310,
+ -310, -310, 261, -310, -310, -310, 407, -310, -310, -310,
+ 305, -93, -310, -87, -80, -73, -37, -116, -31, -122,
+ -310, -310, -310, -310, 468, -310, -310, -310, -310, 24,
+ 70, 95, -310, 434, -310, -310, -310, -310, 443, -310,
+ -310, -310, -310, -310, -310, -310, -231, -245, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, 296, -310, -310, 376, -310, -310, -310,
+ -310, 45, 56, -70, -310, -310, -310, -310, 153, 173,
+ 205, 102, -310, -310, -310, 118, -310, -310, -310, -310,
+ -310, 186, -310, -310, -310, -310, -310, -310, -310, -310,
+ -310, -310, -310, -310, -310, -310, -310, 297, -309, 314,
+ -310, -310, -310, -310, -310, -310, -310, -121, -269, -310,
+ -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
+ 448, -310, -310, -310, -310, -310, -310, -310, -310, -301,
+ -310, 449, -310, 176, -310, -74, -307, -310, -310
+};
+
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 3, 4, 5, 36, 6, 103, 7, 69, 8,
+ 72, 107, 9, 108, 10, 44, 45, 78, 79, 80,
+ 81, 272, 465, 11, 47, 48, 49, 120, 284, 50,
+ 122, 174, 175, 51, 117, 148, 149, 52, 121, 162,
+ 163, 150, 177, 165, 166, 151, 152, 333, 154, 171,
+ 155, 156, 12, 55, 56, 92, 185, 355, 409, 410,
+ 411, 127, 413, 414, 415, 470, 13, 58, 59, 245,
+ 295, 14, 60, 189, 248, 329, 249, 250, 328, 418,
+ 474, 476, 524, 578, 527, 569, 591, 600, 611, 15,
+ 129, 193, 263, 194, 195, 196, 197, 198, 311, 199,
+ 309, 493, 494, 334, 495, 200, 313, 396, 397, 398,
+ 399, 400, 201, 310, 440, 441, 377, 442, 202, 307,
+ 372, 373, 203, 312, 546, 547, 584, 599, 613, 548,
+ 583, 598, 603, 612, 204, 303, 424, 335, 336, 337,
+ 338, 205, 305, 426, 206, 304, 425, 478, 479, 480,
+ 558, 481, 557, 207, 434, 573, 16, 130, 210, 211,
+ 212, 213, 464, 214, 463, 576, 17, 18, 131, 342,
+ 484, 111, 273, 138, 320, 112, 113, 321, 520
+};
+
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_int16 yytable[] =
+{
+ 184, 153, 344, 114, 301, 169, 182, 192, 41, 345,
+ 34, 1, 348, 41, 1, 91, 299, 367, 296, 553,
+ 381, 540, 541, 542, 37, 490, 362, 601, 164, 176,
+ 362, 95, 153, 105, 363, 178, 437, 368, 364, 365,
+ 382, 437, 179, 367, 53, 387, 169, 54, 167, 180,
+ 383, 384, 184, 490, 301, 106, 385, 143, 182, 118,
+ 160, 379, 386, 368, 554, 160, 602, 387, 96, 164,
+ 369, 370, 491, 388, 389, 390, 391, 392, 393, 394,
+ 395, 176, 543, 143, 168, 181, 119, 178, 438, 167,
+ 170, 183, 381, 438, 179, 143, 369, 370, 358, 19,
+ 491, 180, 190, 555, 191, 67, 38, 432, 330, 143,
+ 461, 42, 382, 301, 43, 2, 82, -114, 2, 43,
+ 297, 407, 383, 384, 68, 168, 39, 420, 385, 143,
+ 331, 170, 40, 379, 386, 126, 332, 181, 70, 387,
+ 421, 71, 267, 183, 422, 388, 389, 390, 391, 392,
+ 393, 394, 395, 158, 172, 407, 46, 416, 142, 268,
+ 57, 143, 158, 159, 417, 144, 145, 142, 173, 269,
+ 143, 160, 330, 143, 144, 145, 84, 140, 61, 141,
+ 160, 142, 147, 161, 143, 255, 292, 521, 144, 145,
+ 298, 147, 161, 146, 331, 246, 256, 528, 85, 62,
+ 332, 341, 257, 258, 86, 147, 75, 251, 87, 532,
+ 190, 239, 191, 532, 532, 88, 259, 529, 76, 77,
+ 235, 63, 530, 260, 265, 190, 371, 191, 89, 261,
+ 262, 46, 93, 97, 228, 54, 57, 346, 64, 408,
+ 252, 253, 254, 208, 270, 66, 209, 209, 531, 533,
+ 570, 477, 477, 158, 172, 65, 371, 571, 142, 435,
+ 534, 143, 443, 477, 73, 144, 145, 246, 173, 247,
+ 99, 160, 158, 159, 375, 74, 378, 142, 525, 526,
+ 143, 100, 147, 161, 144, 145, 101, 140, 102, 141,
+ 160, 142, 544, 545, 143, 104, 408, 408, 144, 145,
+ 109, 147, 161, 146, 482, 483, 110, 115, 116, 123,
+ 124, 126, 125, 492, 128, 147, 132, 133, 134, 139,
+ 137, 492, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 135, 29, 30, 31, 32, 33, 136, 187, 157,
+ 186, 215, 216, 217, 218, 241, 219, 244, 220, 221,
+ 222, 223, 224, 230, 225, 226, 227, 231, 232, 277,
+ 294, 233, 234, 237, 238, 242, 243, 264, 274, 275,
+ 276, 278, 246, 279, 281, 280, 282, 308, 300, 283,
+ 285, 286, 287, 288, 289, 290, 316, 292, 317, 318,
+ 291, 302, 293, 319, 323, 324, 306, 315, 322, 325,
+ 326, 330, 327, 341, 343, 349, 350, 351, 353, 352,
+ 356, 354, 359, 357, 332, 360, 374, 361, 366, 376,
+ 379, 405, 143, 401, 402, 403, 404, 419, 469, 406,
+ 423, 428, 427, 429, 386, 240, 472, 430, 431, 436,
+ 444, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 412, 455, 456, 457, 458, 466, 467, 459, 460, 475,
+ 489, 468, 35, 535, 471, 485, 477, 236, 486, 487,
+ 488, 550, 496, 503, 499, 501, 497, 518, 504, 505,
+ 588, 506, 507, 473, 508, 509, 510, 511, 500, 512,
+ 513, 514, 523, 515, 516, 517, 552, 83, 90, 519,
+ 522, 98, 536, 537, 551, 549, 539, 560, 556, 559,
+ 561, 562, 563, 564, 566, 565, 572, 574, 577, 567,
+ 575, 568, 589, 94, 604, 592, 617, 579, 580, 581,
+ 582, 585, 587, 586, 590, 593, 594, 595, 596, 597,
+ 605, 615, 608, 609, 606, 607, 610, 502, 538, 462,
+ 439, 614, 380, 616, 618, 229, 445, 498, 433, 314,
+ 0, 188, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 266, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 339, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 340,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 271,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 347
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 122, 117, 309, 77, 249, 121, 122, 129, 1, 310,
+ 0, 1, 313, 1, 1, 1, 247, 18, 1, 18,
+ 18, 42, 43, 44, 106, 61, 335, 69, 121, 122,
+ 339, 1, 148, 25, 335, 122, 56, 38, 339, 340,
+ 38, 56, 122, 18, 104, 65, 162, 107, 121, 122,
+ 48, 49, 174, 61, 299, 47, 54, 58, 174, 81,
+ 68, 59, 60, 38, 63, 68, 108, 65, 38, 162,
+ 71, 72, 108, 71, 72, 73, 74, 75, 76, 77,
+ 78, 174, 103, 58, 121, 122, 108, 174, 108, 162,
+ 121, 122, 18, 108, 174, 58, 71, 72, 329, 104,
+ 108, 174, 105, 102, 107, 22, 106, 108, 57, 58,
+ 108, 104, 38, 358, 107, 105, 104, 103, 105, 107,
+ 103, 84, 48, 49, 41, 162, 106, 20, 54, 58,
+ 79, 162, 106, 59, 60, 64, 85, 174, 24, 65,
+ 33, 27, 1, 174, 37, 71, 72, 73, 74, 75,
+ 76, 77, 78, 50, 51, 84, 107, 102, 55, 18,
+ 107, 58, 50, 51, 109, 62, 63, 55, 65, 28,
+ 58, 68, 57, 58, 62, 63, 1, 51, 106, 53,
+ 68, 55, 79, 80, 58, 1, 102, 103, 62, 63,
+ 102, 79, 80, 67, 79, 107, 12, 1, 23, 106,
+ 85, 86, 18, 19, 29, 79, 18, 1, 33, 478,
+ 105, 108, 107, 482, 483, 40, 32, 21, 30, 31,
+ 108, 104, 26, 39, 104, 105, 342, 107, 104, 45,
+ 46, 107, 104, 104, 108, 107, 107, 311, 106, 355,
+ 34, 35, 36, 104, 104, 102, 107, 107, 104, 104,
+ 557, 107, 107, 50, 51, 104, 372, 558, 55, 375,
+ 104, 58, 378, 107, 102, 62, 63, 107, 65, 109,
+ 106, 68, 50, 51, 344, 108, 346, 55, 108, 109,
+ 58, 103, 79, 80, 62, 63, 103, 51, 103, 53,
+ 68, 55, 94, 95, 58, 104, 412, 413, 62, 63,
+ 28, 79, 80, 67, 425, 426, 87, 108, 108, 108,
+ 103, 64, 108, 435, 103, 79, 104, 104, 104, 89,
+ 88, 443, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 106, 13, 14, 15, 16, 17, 106, 84, 106,
+ 106, 104, 103, 102, 106, 70, 106, 83, 106, 106,
+ 106, 106, 106, 100, 106, 106, 106, 106, 106, 100,
+ 52, 106, 106, 106, 106, 103, 106, 104, 102, 102,
+ 102, 102, 107, 103, 103, 102, 100, 28, 104, 102,
+ 102, 102, 102, 102, 102, 102, 28, 102, 28, 82,
+ 106, 104, 106, 91, 103, 100, 108, 108, 108, 106,
+ 108, 57, 108, 86, 106, 106, 106, 106, 92, 106,
+ 100, 93, 106, 109, 85, 106, 103, 106, 106, 69,
+ 59, 106, 58, 103, 103, 103, 102, 101, 66, 106,
+ 102, 106, 102, 106, 60, 174, 412, 106, 106, 106,
+ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
+ 355, 106, 106, 106, 106, 102, 102, 106, 106, 102,
+ 82, 106, 3, 90, 108, 102, 107, 162, 103, 102,
+ 102, 69, 103, 102, 108, 103, 106, 82, 103, 102,
+ 54, 102, 102, 413, 103, 103, 102, 102, 443, 103,
+ 102, 102, 109, 103, 102, 102, 109, 44, 47, 108,
+ 106, 58, 106, 106, 103, 106, 108, 103, 108, 106,
+ 102, 106, 106, 103, 102, 106, 102, 102, 102, 108,
+ 103, 108, 97, 55, 96, 106, 79, 109, 108, 108,
+ 108, 108, 102, 109, 102, 106, 109, 102, 102, 102,
+ 109, 108, 102, 102, 106, 106, 102, 445, 492, 396,
+ 377, 109, 347, 108, 108, 148, 380, 439, 372, 263,
+ -1, 127, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 196, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 304, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 305,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 211,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 312
+};
+
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint16 yystos[] =
+{
+ 0, 1, 105, 111, 112, 113, 115, 117, 119, 122,
+ 124, 133, 162, 176, 181, 199, 266, 276, 277, 104,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13,
+ 14, 15, 16, 17, 0, 112, 114, 106, 106, 106,
+ 106, 1, 104, 107, 125, 126, 107, 134, 135, 136,
+ 139, 143, 147, 104, 107, 163, 164, 107, 177, 178,
+ 182, 106, 106, 104, 106, 104, 102, 22, 41, 118,
+ 24, 27, 120, 102, 108, 18, 30, 31, 127, 128,
+ 129, 130, 104, 126, 1, 23, 29, 33, 40, 104,
+ 135, 1, 165, 104, 164, 1, 38, 104, 178, 106,
+ 103, 103, 103, 116, 104, 25, 47, 121, 123, 28,
+ 87, 281, 285, 286, 285, 108, 108, 144, 81, 108,
+ 137, 148, 140, 108, 103, 108, 64, 171, 103, 200,
+ 267, 278, 104, 104, 104, 106, 106, 88, 283, 89,
+ 51, 53, 55, 58, 62, 63, 67, 79, 145, 146,
+ 151, 155, 156, 157, 158, 160, 161, 106, 50, 51,
+ 68, 80, 149, 150, 151, 153, 154, 155, 156, 157,
+ 158, 159, 51, 65, 141, 142, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, 166, 106, 84, 173, 183,
+ 105, 107, 159, 201, 203, 204, 205, 206, 207, 209,
+ 215, 222, 228, 232, 244, 251, 254, 263, 104, 107,
+ 268, 269, 270, 271, 273, 104, 103, 102, 106, 106,
+ 106, 106, 106, 106, 106, 106, 106, 106, 108, 146,
+ 100, 106, 106, 106, 106, 108, 150, 106, 106, 108,
+ 142, 70, 103, 106, 83, 179, 107, 109, 184, 186,
+ 187, 1, 34, 35, 36, 1, 12, 18, 19, 32,
+ 39, 45, 46, 202, 104, 104, 206, 1, 18, 28,
+ 104, 270, 131, 282, 102, 102, 102, 100, 102, 103,
+ 102, 103, 100, 102, 138, 102, 102, 102, 102, 102,
+ 102, 106, 102, 106, 52, 180, 1, 103, 102, 186,
+ 104, 187, 104, 245, 255, 252, 108, 229, 28, 210,
+ 223, 208, 233, 216, 203, 108, 28, 28, 82, 91,
+ 284, 287, 108, 103, 100, 106, 108, 108, 188, 185,
+ 57, 79, 85, 157, 213, 247, 248, 249, 250, 247,
+ 249, 86, 279, 106, 286, 279, 285, 281, 279, 106,
+ 106, 106, 106, 92, 93, 167, 100, 109, 186, 106,
+ 106, 106, 248, 279, 279, 279, 106, 18, 38, 71,
+ 72, 157, 230, 231, 103, 213, 69, 226, 213, 59,
+ 220, 18, 38, 48, 49, 54, 60, 65, 71, 72,
+ 73, 74, 75, 76, 77, 78, 217, 218, 219, 220,
+ 221, 103, 103, 103, 102, 106, 106, 84, 157, 168,
+ 169, 170, 171, 172, 173, 174, 102, 109, 189, 101,
+ 20, 33, 37, 102, 246, 256, 253, 102, 106, 106,
+ 106, 106, 108, 231, 264, 157, 106, 56, 108, 219,
+ 224, 225, 227, 157, 106, 283, 106, 106, 106, 106,
+ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
+ 106, 108, 218, 274, 272, 132, 102, 102, 106, 66,
+ 175, 108, 169, 170, 190, 102, 191, 107, 257, 258,
+ 259, 261, 257, 257, 280, 102, 103, 102, 102, 82,
+ 61, 108, 159, 211, 212, 214, 103, 106, 225, 108,
+ 211, 103, 221, 102, 103, 102, 102, 102, 103, 103,
+ 102, 102, 103, 102, 102, 103, 102, 102, 82, 108,
+ 288, 103, 106, 109, 192, 108, 109, 194, 1, 21,
+ 26, 104, 258, 104, 104, 90, 106, 106, 212, 108,
+ 42, 43, 44, 103, 94, 95, 234, 235, 239, 106,
+ 69, 103, 109, 18, 63, 102, 108, 262, 260, 106,
+ 103, 102, 106, 106, 103, 106, 102, 108, 108, 195,
+ 286, 279, 102, 265, 102, 103, 275, 102, 193, 109,
+ 108, 108, 108, 240, 236, 108, 109, 102, 54, 97,
+ 102, 196, 106, 106, 109, 102, 102, 102, 241, 237,
+ 197, 69, 108, 242, 96, 109, 106, 106, 102, 102,
+ 102, 198, 243, 238, 109, 108, 108, 79, 108
+};
+
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint16 yyr1[] =
+{
+ 0, 110, 111, 111, 112, 112, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 112, 112, 112, 112, 114,
+ 113, 116, 115, 117, 118, 118, 119, 120, 120, 121,
+ 121, 123, 122, 124, 124, 125, 125, 126, 126, 126,
+ 127, 127, 127, 128, 129, 131, 132, 130, 133, 134,
+ 134, 135, 135, 135, 135, 135, 136, 138, 137, 137,
+ 140, 139, 141, 141, 142, 142, 142, 142, 142, 142,
+ 142, 142, 142, 142, 144, 143, 145, 145, 146, 146,
+ 146, 146, 146, 146, 146, 146, 148, 147, 149, 149,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 162, 163, 163, 165, 166, 167, 164, 164, 168,
+ 168, 169, 169, 170, 170, 171, 172, 172, 173, 174,
+ 175, 176, 177, 177, 178, 178, 179, 180, 182, 183,
+ 181, 185, 184, 184, 184, 186, 186, 188, 187, 187,
+ 190, 189, 189, 192, 193, 191, 194, 194, 194, 195,
+ 196, 197, 198, 194, 200, 199, 202, 201, 201, 203,
+ 204, 203, 205, 205, 206, 206, 206, 206, 206, 206,
+ 206, 206, 206, 206, 206, 206, 208, 207, 210, 209,
+ 211, 211, 212, 212, 213, 214, 216, 215, 217, 217,
+ 218, 218, 218, 218, 218, 218, 218, 218, 218, 218,
+ 218, 218, 218, 218, 218, 218, 219, 220, 221, 223,
+ 222, 224, 224, 225, 225, 226, 227, 227, 227, 227,
+ 229, 228, 230, 230, 231, 231, 231, 231, 231, 233,
+ 232, 234, 234, 236, 237, 238, 235, 240, 241, 239,
+ 243, 242, 242, 245, 246, 244, 247, 247, 248, 248,
+ 248, 248, 249, 250, 250, 250, 252, 253, 251, 255,
+ 256, 254, 257, 257, 258, 258, 258, 260, 259, 262,
+ 261, 264, 265, 263, 267, 266, 268, 268, 269, 269,
+ 270, 270, 270, 272, 271, 274, 275, 273, 276, 278,
+ 277, 280, 279, 282, 281, 284, 283, 285, 287, 288,
+ 286
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 0,
+ 4, 0, 6, 5, 1, 1, 6, 1, 1, 1,
+ 1, 0, 6, 4, 3, 2, 1, 3, 2, 2,
+ 1, 1, 1, 2, 2, 0, 0, 9, 4, 2,
+ 1, 1, 1, 1, 1, 3, 3, 0, 5, 1,
+ 0, 5, 2, 1, 1, 1, 3, 1, 1, 1,
+ 1, 1, 1, 1, 0, 5, 2, 1, 1, 3,
+ 1, 1, 1, 1, 1, 1, 0, 5, 2, 1,
+ 1, 3, 1, 1, 1, 1, 1, 1, 1, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 4, 3, 2, 1, 0, 0, 0, 10, 3, 2,
+ 1, 2, 1, 2, 1, 3, 1, 1, 3, 3,
+ 3, 4, 2, 1, 7, 3, 3, 3, 0, 0,
+ 8, 0, 4, 2, 1, 2, 1, 0, 7, 3,
+ 0, 3, 1, 0, 0, 7, 1, 3, 3, 0,
+ 0, 0, 0, 15, 0, 6, 0, 3, 1, 2,
+ 0, 2, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 3, 3, 0, 7, 0, 7,
+ 2, 1, 2, 1, 3, 3, 0, 6, 2, 1,
+ 1, 3, 1, 1, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 0,
+ 6, 2, 1, 2, 1, 3, 3, 3, 3, 3,
+ 0, 6, 2, 1, 1, 3, 3, 3, 3, 0,
+ 8, 1, 1, 0, 0, 0, 13, 0, 0, 9,
+ 0, 5, 1, 0, 0, 8, 2, 1, 1, 1,
+ 1, 1, 3, 3, 3, 3, 0, 0, 8, 0,
+ 0, 8, 2, 1, 1, 1, 3, 0, 5, 0,
+ 5, 0, 0, 11, 0, 6, 2, 1, 2, 1,
+ 1, 1, 3, 0, 7, 0, 0, 11, 3, 0,
+ 6, 0, 7, 0, 7, 0, 7, 2, 0, 0,
+ 12
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (0)
+
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+
+/* Enable debugging if requested. */
+#if HYYDEBUG
+
+# ifndef YYFPRINTF
+# include /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+{
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ YYUSE (yytype);
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+{
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
+{
+ unsigned long int yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !HYYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !HYYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+yystrlen (const char *yystr)
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULLPTR;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
+ }
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+{
+ YYUSE (yyvaluep);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+int
+yyparse (void)
+{
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex ();
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ '$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 19:
+#line 150 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_board_file(&h)) YYERROR; }
+#line 1872 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 21:
+#line 155 "hyp_y.y" /* yacc.c:1646 */
+ { h.vers = yylval.floatval; }
+#line 1878 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 22:
+#line 155 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_version(&h)) YYERROR; }
+#line 1884 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 23:
+#line 160 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_data_mode(&h)) YYERROR; }
+#line 1890 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 24:
+#line 163 "hyp_y.y" /* yacc.c:1646 */
+ { h.detailed = pcb_false; }
+#line 1896 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 25:
+#line 164 "hyp_y.y" /* yacc.c:1646 */
+ { h.detailed = pcb_true; }
+#line 1902 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 26:
+#line 169 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_units(&h)) YYERROR; }
+#line 1908 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 27:
+#line 172 "hyp_y.y" /* yacc.c:1646 */
+ { h.unit_system_english = pcb_true; }
+#line 1914 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 28:
+#line 173 "hyp_y.y" /* yacc.c:1646 */
+ { h.unit_system_english = pcb_false; }
+#line 1920 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 29:
+#line 176 "hyp_y.y" /* yacc.c:1646 */
+ { h.metal_thickness_weight = pcb_true; }
+#line 1926 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 30:
+#line 177 "hyp_y.y" /* yacc.c:1646 */
+ { h.metal_thickness_weight = pcb_false; }
+#line 1932 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 31:
+#line 181 "hyp_y.y" /* yacc.c:1646 */
+ { h.default_plane_separation = yylval.floatval; }
+#line 1938 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 32:
+#line 181 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_plane_sep(&h)) YYERROR; }
+#line 1944 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 38:
+#line 195 "hyp_y.y" /* yacc.c:1646 */
+ { hyyerror("warning: missing ')'"); }
+#line 1950 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 43:
+#line 205 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_perimeter_segment(&h)) YYERROR; }
+#line 1956 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 44:
+#line 208 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_perimeter_arc(&h)) YYERROR; }
+#line 1962 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 45:
+#line 211 "hyp_y.y" /* yacc.c:1646 */
+ { h.name = yylval.strval; }
+#line 1968 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 46:
+#line 211 "hyp_y.y" /* yacc.c:1646 */
+ { h.value = yylval.strval; }
+#line 1974 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 47:
+#line 211 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_board_attribute(&h)) YYERROR; }
+#line 1980 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 56:
+#line 230 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_options(&h)) YYERROR; }
+#line 1986 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 57:
+#line 233 "hyp_y.y" /* yacc.c:1646 */
+ { h.use_die_for_metal = yylval.boolval; }
+#line 1992 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 60:
+#line 238 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 1998 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 61:
+#line 238 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_signal(&h)) YYERROR; }
+#line 2004 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 66:
+#line 247 "hyp_y.y" /* yacc.c:1646 */
+ { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; }
+#line 2010 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 74:
+#line 257 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2016 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 75:
+#line 257 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_dielectric(&h)) YYERROR; }
+#line 2022 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 79:
+#line 265 "hyp_y.y" /* yacc.c:1646 */
+ { h.epsilon_r = yylval.floatval; h.epsilon_r_set = pcb_true; }
+#line 2028 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 86:
+#line 275 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2034 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 87:
+#line 275 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_plane(&h)) YYERROR; }
+#line 2040 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 91:
+#line 283 "hyp_y.y" /* yacc.c:1646 */
+ { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; }
+#line 2046 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 99:
+#line 293 "hyp_y.y" /* yacc.c:1646 */
+ { h.thickness = yylval.floatval; h.thickness_set = pcb_true; }
+#line 2052 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 100:
+#line 296 "hyp_y.y" /* yacc.c:1646 */
+ { h.plating_thickness = yylval.floatval; h.plating_thickness_set = pcb_true; }
+#line 2058 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 101:
+#line 299 "hyp_y.y" /* yacc.c:1646 */
+ { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; }
+#line 2064 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 102:
+#line 302 "hyp_y.y" /* yacc.c:1646 */
+ { h.temperature_coefficient = yylval.floatval; h.temperature_coefficient_set = pcb_true; }
+#line 2070 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 103:
+#line 305 "hyp_y.y" /* yacc.c:1646 */
+ { h.epsilon_r = yylval.floatval; h.epsilon_r_set = pcb_true; }
+#line 2076 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 104:
+#line 308 "hyp_y.y" /* yacc.c:1646 */
+ { h.loss_tangent = yylval.floatval; h.loss_tangent_set = pcb_true; }
+#line 2082 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 105:
+#line 311 "hyp_y.y" /* yacc.c:1646 */
+ { h.layer_name = yylval.strval; h.layer_name_set = pcb_true; }
+#line 2088 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 106:
+#line 314 "hyp_y.y" /* yacc.c:1646 */
+ { h.material_name = yylval.strval; h.material_name_set = pcb_true; }
+#line 2094 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 107:
+#line 317 "hyp_y.y" /* yacc.c:1646 */
+ { h.plane_separation = yylval.floatval; h.plane_separation_set = pcb_true; }
+#line 2100 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 108:
+#line 320 "hyp_y.y" /* yacc.c:1646 */
+ { h.conformal = yylval.boolval; h.conformal_set = pcb_true; }
+#line 2106 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 109:
+#line 323 "hyp_y.y" /* yacc.c:1646 */
+ { h.prepreg = yylval.boolval; h.prepreg_set = pcb_true; }
+#line 2112 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 114:
+#line 336 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2118 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 115:
+#line 336 "hyp_y.y" /* yacc.c:1646 */
+ { h.device_type = yylval.strval; }
+#line 2124 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 116:
+#line 336 "hyp_y.y" /* yacc.c:1646 */
+ { h.ref = yylval.strval; }
+#line 2130 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 117:
+#line 336 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_devices(&h)) YYERROR; }
+#line 2136 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 125:
+#line 355 "hyp_y.y" /* yacc.c:1646 */
+ { h.name = yylval.strval; h.name_set = pcb_true; }
+#line 2142 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 128:
+#line 363 "hyp_y.y" /* yacc.c:1646 */
+ { h.value_float = yylval.floatval; h.value_float_set = pcb_true; }
+#line 2148 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 129:
+#line 366 "hyp_y.y" /* yacc.c:1646 */
+ { h.value_string = yylval.strval; h.value_string_set = pcb_true; }
+#line 2154 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 130:
+#line 369 "hyp_y.y" /* yacc.c:1646 */
+ { h.package = yylval.strval; h.package_set = pcb_true; }
+#line 2160 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 134:
+#line 381 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_supplies(&h)) YYERROR; }
+#line 2166 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 136:
+#line 385 "hyp_y.y" /* yacc.c:1646 */
+ { h.voltage_specified = yylval.boolval; }
+#line 2172 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 137:
+#line 388 "hyp_y.y" /* yacc.c:1646 */
+ { h.conversion = yylval.boolval; }
+#line 2178 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 138:
+#line 393 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2184 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 139:
+#line 393 "hyp_y.y" /* yacc.c:1646 */
+ { h.padstack_name = yylval.strval; h.padstack_name_set = pcb_true; }
+#line 2190 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 140:
+#line 393 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_padstack_end(&h)) YYERROR; }
+#line 2196 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 141:
+#line 396 "hyp_y.y" /* yacc.c:1646 */
+ { h.drill_size = yylval.floatval; h.drill_size_set = pcb_true; }
+#line 2202 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 147:
+#line 405 "hyp_y.y" /* yacc.c:1646 */
+ { h.layer_name = yylval.strval; h.layer_name_set = pcb_true; }
+#line 2208 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 148:
+#line 405 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_padstack_element(&h)) YYERROR; new_record(); }
+#line 2214 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 150:
+#line 409 "hyp_y.y" /* yacc.c:1646 */
+ { h.pad_shape = yylval.floatval; }
+#line 2220 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 152:
+#line 410 "hyp_y.y" /* yacc.c:1646 */
+ { h.pad_shape = -1; }
+#line 2226 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 153:
+#line 414 "hyp_y.y" /* yacc.c:1646 */
+ { h.pad_sx = yylval.floatval; }
+#line 2232 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 154:
+#line 414 "hyp_y.y" /* yacc.c:1646 */
+ { h.pad_sy = yylval.floatval; }
+#line 2238 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 155:
+#line 414 "hyp_y.y" /* yacc.c:1646 */
+ { h.pad_angle = yylval.floatval; }
+#line 2244 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 157:
+#line 418 "hyp_y.y" /* yacc.c:1646 */
+ { h.pad_type = PAD_TYPE_METAL; h.pad_type_set = pcb_true; }
+#line 2250 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 158:
+#line 419 "hyp_y.y" /* yacc.c:1646 */
+ { h.pad_type = PAD_TYPE_ANTIPAD; h.pad_type_set = pcb_true; }
+#line 2256 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 159:
+#line 420 "hyp_y.y" /* yacc.c:1646 */
+ { h.thermal_clear_shape = yylval.floatval; }
+#line 2262 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 160:
+#line 421 "hyp_y.y" /* yacc.c:1646 */
+ { h.thermal_clear_sx = yylval.floatval; }
+#line 2268 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 161:
+#line 422 "hyp_y.y" /* yacc.c:1646 */
+ { h.thermal_clear_sy = yylval.floatval; }
+#line 2274 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 162:
+#line 423 "hyp_y.y" /* yacc.c:1646 */
+ { h.thermal_clear_angle = yylval.floatval; }
+#line 2280 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 163:
+#line 424 "hyp_y.y" /* yacc.c:1646 */
+ { h.pad_type = PAD_TYPE_THERMAL_RELIEF; h.pad_type_set = pcb_true; }
+#line 2286 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 164:
+#line 430 "hyp_y.y" /* yacc.c:1646 */
+ { h.net_name = yylval.strval; if (exec_net(&h)) YYERROR; }
+#line 2292 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 166:
+#line 433 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_net_plane_separation(&h)) YYERROR; }
+#line 2298 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 170:
+#line 438 "hyp_y.y" /* yacc.c:1646 */
+ { hyyerror("warning: empty net"); }
+#line 2304 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 186:
+#line 461 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2310 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 187:
+#line 461 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_seg(&h)) YYERROR; }
+#line 2316 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 188:
+#line 464 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2322 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 189:
+#line 464 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_arc(&h)) YYERROR; }
+#line 2328 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 194:
+#line 477 "hyp_y.y" /* yacc.c:1646 */
+ { h.width = yylval.floatval; h.width_set = pcb_true; }
+#line 2334 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 195:
+#line 480 "hyp_y.y" /* yacc.c:1646 */
+ { h.left_plane_separation = yylval.floatval; h.left_plane_separation_set = pcb_true; }
+#line 2340 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 196:
+#line 483 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2346 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 197:
+#line 483 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_via(&h)) YYERROR; }
+#line 2352 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 201:
+#line 494 "hyp_y.y" /* yacc.c:1646 */
+ { h.drill_size = yylval.floatval; h.drill_size_set = pcb_true; }
+#line 2358 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 204:
+#line 497 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = pcb_true; }
+#line 2364 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 205:
+#line 498 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = pcb_true; }
+#line 2370 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 206:
+#line 499 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = pcb_true; }
+#line 2376 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 207:
+#line 500 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = pcb_true; }
+#line 2382 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 208:
+#line 501 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad1_shape = yylval.strval; h.via_pad1_shape_set = pcb_true; }
+#line 2388 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 209:
+#line 502 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad1_sx = yylval.floatval; h.via_pad1_sx_set = pcb_true; }
+#line 2394 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 210:
+#line 503 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad1_sy = yylval.floatval; h.via_pad1_sy_set = pcb_true; }
+#line 2400 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 211:
+#line 504 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad1_angle = yylval.floatval; h.via_pad1_angle_set = pcb_true; }
+#line 2406 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 212:
+#line 505 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad2_shape = yylval.strval; h.via_pad2_shape_set = pcb_true; }
+#line 2412 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 213:
+#line 506 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad2_sx = yylval.floatval; h.via_pad2_sx_set = pcb_true; }
+#line 2418 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 214:
+#line 507 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad2_sy = yylval.floatval; h.via_pad2_sy_set = pcb_true; }
+#line 2424 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 215:
+#line 508 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad2_angle = yylval.floatval; h.via_pad2_angle_set = pcb_true; }
+#line 2430 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 216:
+#line 512 "hyp_y.y" /* yacc.c:1646 */
+ { h.padstack_name = yylval.strval; h.padstack_name_set = pcb_true; }
+#line 2436 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 217:
+#line 515 "hyp_y.y" /* yacc.c:1646 */
+ { h.layer1_name = yylval.strval; h.layer1_name_set = pcb_true; }
+#line 2442 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 218:
+#line 518 "hyp_y.y" /* yacc.c:1646 */
+ { h.layer2_name = yylval.strval; h.layer2_name_set = pcb_true; }
+#line 2448 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 219:
+#line 521 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2454 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 220:
+#line 521 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_pin(&h)) YYERROR; }
+#line 2460 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 225:
+#line 534 "hyp_y.y" /* yacc.c:1646 */
+ { h.pin_reference = yylval.strval; h.pin_reference_set = pcb_true; }
+#line 2466 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 226:
+#line 537 "hyp_y.y" /* yacc.c:1646 */
+ { h.pin_function = PIN_SIM_OUT; h.pin_function_set = pcb_true; }
+#line 2472 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 227:
+#line 538 "hyp_y.y" /* yacc.c:1646 */
+ { h.pin_function = PIN_SIM_IN; h.pin_function_set = pcb_true; }
+#line 2478 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 228:
+#line 539 "hyp_y.y" /* yacc.c:1646 */
+ { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = pcb_true; }
+#line 2484 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 229:
+#line 540 "hyp_y.y" /* yacc.c:1646 */
+ { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = pcb_true; hyyerror("warning: SIM_BOTH assumed"); }
+#line 2490 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 230:
+#line 544 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2496 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 231:
+#line 544 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_pad(&h)) YYERROR; }
+#line 2502 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 235:
+#line 553 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = pcb_true; }
+#line 2508 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 236:
+#line 554 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = pcb_true; }
+#line 2514 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 237:
+#line 555 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = pcb_true; }
+#line 2520 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 238:
+#line 556 "hyp_y.y" /* yacc.c:1646 */
+ { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = pcb_true; }
+#line 2526 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 239:
+#line 560 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2532 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 240:
+#line 560 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_useg(&h)) YYERROR; }
+#line 2538 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 243:
+#line 568 "hyp_y.y" /* yacc.c:1646 */
+ { h.zlayer_name = yylval.strval; h.zlayer_name_set = pcb_true; }
+#line 2544 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 244:
+#line 569 "hyp_y.y" /* yacc.c:1646 */
+ { h.width = yylval.floatval; }
+#line 2550 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 245:
+#line 570 "hyp_y.y" /* yacc.c:1646 */
+ { h.length = yylval.floatval; }
+#line 2556 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 247:
+#line 575 "hyp_y.y" /* yacc.c:1646 */
+ { h.impedance = yylval.floatval; h.impedance_set = pcb_true; }
+#line 2562 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 248:
+#line 576 "hyp_y.y" /* yacc.c:1646 */
+ { h.delay = yylval.floatval; }
+#line 2568 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 250:
+#line 580 "hyp_y.y" /* yacc.c:1646 */
+ { h.resistance = yylval.floatval; h.resistance_set = pcb_true;}
+#line 2574 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 253:
+#line 586 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2580 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 254:
+#line 586 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_polygon_begin(&h)) YYERROR; }
+#line 2586 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 255:
+#line 587 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_polygon_end(&h)) YYERROR; }
+#line 2592 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 262:
+#line 602 "hyp_y.y" /* yacc.c:1646 */
+ { h.id = yylval.intval; h.id_set = pcb_true; }
+#line 2598 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 263:
+#line 606 "hyp_y.y" /* yacc.c:1646 */
+ { h.polygon_type = POLYGON_TYPE_POUR; h.polygon_type_set = pcb_true; }
+#line 2604 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 264:
+#line 607 "hyp_y.y" /* yacc.c:1646 */
+ { h.polygon_type = POLYGON_TYPE_PLANE; h.polygon_type_set = pcb_true; }
+#line 2610 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 265:
+#line 608 "hyp_y.y" /* yacc.c:1646 */
+ { h.polygon_type = POLYGON_TYPE_COPPER; h.polygon_type_set = pcb_true; }
+#line 2616 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 266:
+#line 612 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2622 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 267:
+#line 612 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_polyvoid_begin(&h)) YYERROR; }
+#line 2628 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 268:
+#line 613 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_polyvoid_end(&h)) YYERROR; }
+#line 2634 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 269:
+#line 616 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2640 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 270:
+#line 616 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_polyline_begin(&h)) YYERROR; }
+#line 2646 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 271:
+#line 617 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_polyline_end(&h)) YYERROR; }
+#line 2652 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 277:
+#line 631 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2658 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 278:
+#line 631 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_line(&h)) YYERROR; }
+#line 2664 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 279:
+#line 634 "hyp_y.y" /* yacc.c:1646 */
+ { new_record(); }
+#line 2670 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 280:
+#line 634 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_curve(&h)) YYERROR; }
+#line 2676 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 281:
+#line 637 "hyp_y.y" /* yacc.c:1646 */
+ { h.name = yylval.strval; }
+#line 2682 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 282:
+#line 637 "hyp_y.y" /* yacc.c:1646 */
+ { h.value = yylval.strval; }
+#line 2688 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 283:
+#line 637 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_net_attribute(&h)) YYERROR; }
+#line 2694 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 284:
+#line 642 "hyp_y.y" /* yacc.c:1646 */
+ { h.net_class_name = yylval.strval; if (exec_net_class(&h)) YYERROR; }
+#line 2700 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 293:
+#line 661 "hyp_y.y" /* yacc.c:1646 */
+ { h.net_name = yylval.strval; }
+#line 2706 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 294:
+#line 661 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_net_class_element(&h)) YYERROR; }
+#line 2712 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 295:
+#line 664 "hyp_y.y" /* yacc.c:1646 */
+ { h.name = yylval.strval; }
+#line 2718 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 296:
+#line 664 "hyp_y.y" /* yacc.c:1646 */
+ { h.value = yylval.strval; }
+#line 2724 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 297:
+#line 664 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_net_class_attribute(&h)) YYERROR; }
+#line 2730 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 298:
+#line 669 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_end(&h)) YYERROR; }
+#line 2736 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 299:
+#line 674 "hyp_y.y" /* yacc.c:1646 */
+ { h.key = yylval.strval; }
+#line 2742 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 300:
+#line 674 "hyp_y.y" /* yacc.c:1646 */
+ { if (exec_key(&h)) YYERROR; }
+#line 2748 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 301:
+#line 679 "hyp_y.y" /* yacc.c:1646 */
+ { h.x = yylval.floatval; }
+#line 2754 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 302:
+#line 679 "hyp_y.y" /* yacc.c:1646 */
+ { h.y = yylval.floatval; }
+#line 2760 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 303:
+#line 682 "hyp_y.y" /* yacc.c:1646 */
+ { h.x1 = yylval.floatval; }
+#line 2766 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 304:
+#line 682 "hyp_y.y" /* yacc.c:1646 */
+ { h.y1 = yylval.floatval; }
+#line 2772 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 305:
+#line 685 "hyp_y.y" /* yacc.c:1646 */
+ { h.x2 = yylval.floatval; }
+#line 2778 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 306:
+#line 685 "hyp_y.y" /* yacc.c:1646 */
+ { h.y2 = yylval.floatval; }
+#line 2784 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 308:
+#line 691 "hyp_y.y" /* yacc.c:1646 */
+ { h.xc = yylval.floatval; }
+#line 2790 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 309:
+#line 691 "hyp_y.y" /* yacc.c:1646 */
+ { h.yc = yylval.floatval; }
+#line 2796 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+ case 310:
+#line 691 "hyp_y.y" /* yacc.c:1646 */
+ { h.r = yylval.floatval; }
+#line 2802 "hyp_y.c" /* yacc.c:1646 */
+ break;
+
+
+#line 2806 "hyp_y.c" /* yacc.c:1646 */
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+ /* Now 'shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
+ {
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
+ }
+# undef YYSYNTAX_ERROR
+#endif
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#if !defined yyoverflow || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ return yyresult;
+}
+#line 693 "hyp_y.y" /* yacc.c:1906 */
+
+
+/*
+ * Supporting C routines
+ */
+
+void hyyerror(const char *msg)
+{
+ /* log pcb-rnd message */
+ hyp_error(msg);
+}
+
+void hyyprint(FILE *file, int type, YYSTYPE value)
+{
+ if (type == H_STRING)
+ fprintf (file, "%s", value.strval);
+ else if (type == H_FLOAT)
+ fprintf (file, "%g", value.floatval);
+ else if (type == H_BOOL)
+ fprintf (file, "%i", value.boolval);
+ return;
+}
+
+/*
+ * reset parse_param struct at beginning of record
+ */
+
+void new_record()
+{
+ h.vers = 0;
+ h.detailed = pcb_false;
+ h.unit_system_english = pcb_false;
+ h.metal_thickness_weight = pcb_false;
+ h.default_plane_separation = 0;
+ h.use_die_for_metal = pcb_false;
+ h.bulk_resistivity = 0;
+ h.conformal = pcb_false;
+ h.epsilon_r = 0;
+ h.layer_name = NULL;
+ h.loss_tangent = 0;
+ h.material_name = NULL;
+ h.plane_separation = 0;
+ h.plating_thickness = 0;
+ h.prepreg = pcb_false;
+ h.temperature_coefficient = 0;
+ h.thickness = 0;
+ h.bulk_resistivity_set = pcb_false;
+ h.conformal_set = pcb_false;
+ h.epsilon_r_set = pcb_false;
+ h.layer_name_set = pcb_false;
+ h.loss_tangent_set = pcb_false;
+ h.material_name_set = pcb_false;
+ h.plane_separation_set = pcb_false;
+ h.plating_thickness_set = pcb_false;
+ h.prepreg_set = pcb_false;
+ h.temperature_coefficient_set = pcb_false;
+ h.thickness_set = pcb_false;
+ h.device_type = NULL;
+ h.ref = NULL;
+ h.value_float = 0;
+ h.value_string = NULL;
+ h.package = NULL;
+ h.name_set = pcb_false;
+ h.value_float_set = pcb_false;
+ h.value_string_set = pcb_false;
+ h.package_set = pcb_false;
+ h.voltage_specified = pcb_false;
+ h.conversion = pcb_false;
+ h.padstack_name = NULL;
+ h.drill_size = 0;
+ h.pad_shape = 0;
+ h.pad_sx = 0;
+ h.pad_sy = 0;
+ h.pad_angle = 0;
+ h.thermal_clear_shape = 0;
+ h.thermal_clear_sx = 0;
+ h.thermal_clear_sy = 0;
+ h.thermal_clear_angle = 0;
+ h.pad_type = PAD_TYPE_METAL;
+ h.padstack_name_set = pcb_false;
+ h.drill_size_set = pcb_false;
+ h.pad_type_set = pcb_false;
+ h.width = 0;
+ h.left_plane_separation = 0;
+ h.width_set = pcb_false;
+ h.left_plane_separation_set = pcb_false;
+ h.layer1_name = NULL;
+ h.layer1_name_set = pcb_false;
+ h.layer2_name = NULL;
+ h.layer2_name_set = pcb_false;
+ h.via_pad_shape = NULL;
+ h.via_pad_shape_set = pcb_false;
+ h.via_pad_sx = 0;
+ h.via_pad_sx_set = pcb_false;
+ h.via_pad_sy = 0;
+ h.via_pad_sy_set = pcb_false;
+ h.via_pad_angle = 0;
+ h.via_pad_angle_set = pcb_false;
+ h.via_pad1_shape = NULL;
+ h.via_pad1_shape_set = pcb_false;
+ h.via_pad1_sx = 0;
+ h.via_pad1_sx_set = pcb_false;
+ h.via_pad1_sy = 0;
+ h.via_pad1_sy_set = pcb_false;
+ h.via_pad1_angle = 0;
+ h.via_pad1_angle_set = pcb_false;
+ h.via_pad2_shape = NULL;
+ h.via_pad2_shape_set = pcb_false;
+ h.via_pad2_sx = 0;
+ h.via_pad2_sx_set = pcb_false;
+ h.via_pad2_sy = 0;
+ h.via_pad2_sy_set = pcb_false;
+ h.via_pad2_angle = 0;
+ h.via_pad2_angle_set = pcb_false;
+ h.pin_reference = NULL;
+ h.pin_reference_set = pcb_false;
+ h.pin_function = PIN_SIM_BOTH;
+ h.pin_function_set = pcb_false;
+ h.zlayer_name = NULL;
+ h.zlayer_name_set = pcb_false;
+ h.length = 0;
+ h.impedance = 0;
+ h.impedance_set = pcb_false;
+ h.delay = 0;
+ h.resistance = 0;
+ h.resistance_set = pcb_false;
+ h.id = -1;
+ h.id_set = pcb_false;
+ h.polygon_type = POLYGON_TYPE_PLANE;
+ h.polygon_type_set = pcb_false;
+ h.net_class_name = NULL;
+ h.net_name = NULL;
+ h.key = NULL;
+ h.name = NULL;
+ h.value = NULL;
+ h.x = 0;
+ h.y = 0;
+ h.x1 = 0;
+ h.y1 = 0;
+ h.x2 = 0;
+ h.y2 = 0;
+ h.xc = 0;
+ h.yc = 0;
+ h.r = 0;
+
+ return;
+}
+
+/* not truncated */
Index: src_plugins/io_hyp/hyp_y.h
===================================================================
--- src_plugins/io_hyp/hyp_y.h (nonexistent)
+++ src_plugins/io_hyp/hyp_y.h (revision 7964)
@@ -0,0 +1,191 @@
+/* A Bison parser, made by GNU Bison 3.0.4. */
+
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see . */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+#ifndef YY_HYY_HYP_Y_H_INCLUDED
+# define YY_HYY_HYP_Y_H_INCLUDED
+/* Debug traces. */
+#ifndef HYYDEBUG
+# if defined YYDEBUG
+#if YYDEBUG
+# define HYYDEBUG 1
+# else
+# define HYYDEBUG 0
+# endif
+# else /* ! defined YYDEBUG */
+# define HYYDEBUG 1
+# endif /* ! defined YYDEBUG */
+#endif /* ! defined HYYDEBUG */
+#if HYYDEBUG
+extern int hyydebug;
+#endif
+/* "%code requires" blocks. */
+#line 21 "hyp_y.y" /* yacc.c:1909 */
+
+#include "parser.h"
+
+#line 56 "hyp_y.h" /* yacc.c:1909 */
+
+/* Token type. */
+#ifndef HYYTOKENTYPE
+# define HYYTOKENTYPE
+ enum hyytokentype
+ {
+ H_BOARD_FILE = 258,
+ H_VERSION = 259,
+ H_DATA_MODE = 260,
+ H_UNITS = 261,
+ H_PLANE_SEP = 262,
+ H_BOARD = 263,
+ H_STACKUP = 264,
+ H_DEVICES = 265,
+ H_SUPPLIES = 266,
+ H_PAD = 267,
+ H_PADSTACK = 268,
+ H_NET = 269,
+ H_NET_CLASS = 270,
+ H_END = 271,
+ H_KEY = 272,
+ H_A = 273,
+ H_ARC = 274,
+ H_COPPER = 275,
+ H_CURVE = 276,
+ H_DETAILED = 277,
+ H_DIELECTRIC = 278,
+ H_ENGLISH = 279,
+ H_LENGTH = 280,
+ H_LINE = 281,
+ H_METRIC = 282,
+ H_N = 283,
+ H_OPTIONS = 284,
+ H_PERIMETER_ARC = 285,
+ H_PERIMETER_SEGMENT = 286,
+ H_PIN = 287,
+ H_PLANE = 288,
+ H_POLYGON = 289,
+ H_POLYLINE = 290,
+ H_POLYVOID = 291,
+ H_POUR = 292,
+ H_S = 293,
+ H_SEG = 294,
+ H_SIGNAL = 295,
+ H_SIMPLIFIED = 296,
+ H_SIM_BOTH = 297,
+ H_SIM_IN = 298,
+ H_SIM_OUT = 299,
+ H_USEG = 300,
+ H_VIA = 301,
+ H_WEIGHT = 302,
+ H_A1 = 303,
+ H_A2 = 304,
+ H_BR = 305,
+ H_C = 306,
+ H_C_QM = 307,
+ H_CO_QM = 308,
+ H_D = 309,
+ H_ER = 310,
+ H_F = 311,
+ H_ID = 312,
+ H_L = 313,
+ H_L1 = 314,
+ H_L2 = 315,
+ H_LPS = 316,
+ H_LT = 317,
+ H_M = 318,
+ H_NAME = 319,
+ H_P = 320,
+ H_PKG = 321,
+ H_PR_QM = 322,
+ H_PS = 323,
+ H_R = 324,
+ H_REF = 325,
+ H_SX = 326,
+ H_SY = 327,
+ H_S1 = 328,
+ H_S1X = 329,
+ H_S1Y = 330,
+ H_S2 = 331,
+ H_S2X = 332,
+ H_S2Y = 333,
+ H_T = 334,
+ H_TC = 335,
+ H_USE_DIE_FOR_METAL = 336,
+ H_V = 337,
+ H_V_QM = 338,
+ H_VAL = 339,
+ H_W = 340,
+ H_X = 341,
+ H_X1 = 342,
+ H_X2 = 343,
+ H_XC = 344,
+ H_Y = 345,
+ H_Y1 = 346,
+ H_Y2 = 347,
+ H_YC = 348,
+ H_Z = 349,
+ H_ZL = 350,
+ H_ZLEN = 351,
+ H_ZW = 352,
+ H_YES = 353,
+ H_NO = 354,
+ H_BOOL = 355,
+ H_POSINT = 356,
+ H_FLOAT = 357,
+ H_STRING = 358
+ };
+#endif
+
+/* Value type. */
+#if ! defined HYYSTYPE && ! defined HYYSTYPE_IS_DECLARED
+
+union HYYSTYPE
+{
+#line 30 "hyp_y.y" /* yacc.c:1909 */
+
+ int boolval;
+ int intval;
+ double floatval;
+ char* strval;
+
+#line 179 "hyp_y.h" /* yacc.c:1909 */
+};
+
+typedef union HYYSTYPE HYYSTYPE;
+# define HYYSTYPE_IS_TRIVIAL 1
+# define HYYSTYPE_IS_DECLARED 1
+#endif
+
+
+extern HYYSTYPE hyylval;
+
+int hyyparse (void);
+
+#endif /* !YY_HYY_HYP_Y_H_INCLUDED */
Index: src_plugins/io_hyp/hyp_y.y
===================================================================
--- src_plugins/io_hyp/hyp_y.y (nonexistent)
+++ src_plugins/io_hyp/hyp_y.y (revision 7964)
@@ -0,0 +1,841 @@
+/*
+ * read hyperlynx files
+ * Copyright 2012-2017 Koen De Vleeschauwer.
+ *
+ * This file is part of pcb-rnd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+%code requires {
+#include "parser.h"
+}
+
+%error-verbose
+%debug
+%defines "hyp_y.h"
+%define api.prefix {hyy}
+
+%union {
+ int boolval;
+ int intval;
+ double floatval;
+ char* strval;
+}
+
+%{
+#include
+#include
+#include
+#include
+
+void hyyerror(const char *);
+
+/* HYYPRINT and hyyprint print values of the tokens when debugging is switched on */
+void hyyprint(FILE *, int, HYYSTYPE);
+#define HYYPRINT(file, type, value) hyyprint (file, type, value)
+
+/* clear parse_param struct at beginning of new record */
+void new_record();
+
+/* struct to pass to calling class */
+parse_param h;
+
+%}
+
+/*
+ * Hyperlynx keywords
+ */
+
+ /* Punctuation: { } ( ) = , */
+
+ /* Sections */
+
+%token H_BOARD_FILE H_VERSION H_DATA_MODE H_UNITS H_PLANE_SEP
+%token H_BOARD H_STACKUP H_DEVICES H_SUPPLIES
+%token H_PAD H_PADSTACK H_NET H_NET_CLASS H_END H_KEY
+
+ /* Keywords */
+
+%token H_A H_ARC H_COPPER H_CURVE H_DETAILED H_DIELECTRIC H_ENGLISH H_LENGTH
+%token H_LINE H_METRIC H_N H_OPTIONS H_PERIMETER_ARC H_PERIMETER_SEGMENT H_PIN
+%token H_PLANE H_POLYGON H_POLYLINE H_POLYVOID H_POUR H_S H_SEG H_SIGNAL
+%token H_SIMPLIFIED H_SIM_BOTH H_SIM_IN H_SIM_OUT H_USEG H_VIA H_WEIGHT
+
+ /* Assignments */
+
+%token H_A1 H_A2 H_BR H_C H_C_QM H_CO_QM H_D H_ER H_F H_ID
+%token H_L H_L1 H_L2 H_LPS H_LT H_M H_NAME
+%token H_P H_PKG H_PR_QM H_PS H_R H_REF H_SX H_SY H_S1 H_S1X H_S1Y H_S2 H_S2X H_S2Y H_T H_TC
+%token H_USE_DIE_FOR_METAL H_V H_V_QM H_VAL H_W H_X H_X1 H_X2
+%token H_XC H_Y H_Y1 H_Y2 H_YC H_Z H_ZL H_ZLEN H_ZW
+
+ /* Booleans */
+
+%token H_YES H_NO
+
+%token H_BOOL
+%token H_POSINT
+%token H_FLOAT
+%token H_STRING
+
+%start hyp_file
+
+%%
+
+/*
+ * Note:
+ * Use left recursion when parsing board perimeter and nets.
+ * When using left recursion cpu time is linear with board size.
+ * When using right recursion we run out of memory on large boards.
+ * (Typical error message: line xxx: memory exhausted at 'yyy' )
+ */
+
+ /*
+ hyperlynx file sections:
+
+ board_file
+ version
+ data_mode*
+ units
+ plane_sep*
+ board*
+ stackup*
+ devices
+ supplies*
+ padstack*
+ net
+ net_class*
+ end
+
+ * = optional section
+
+ */
+
+hyp_file
+ : hyp_file hyp_section
+ | hyp_section ;
+
+hyp_section
+ : board_file
+ | version
+ | data_mode
+ | units
+ | plane_sep
+ | board
+ | stackup
+ | devices
+ | supplies
+ | padstack
+ | net
+ | netclass
+ | end
+ | key
+ | error '}' ;
+
+ /* board_file */
+
+board_file
+ : '{' H_BOARD_FILE { if (exec_board_file(&h)) YYERROR; } '}' ;
+
+ /* version */
+
+version
+ : '{' H_VERSION '=' H_FLOAT { h.vers = yylval.floatval; } '}' { if (exec_version(&h)) YYERROR; } ;
+
+ /* data_mode */
+
+data_mode
+ : '{' H_DATA_MODE '=' mode '}' { if (exec_data_mode(&h)) YYERROR; };
+
+mode
+ : H_SIMPLIFIED { h.detailed = pcb_false; }
+ | H_DETAILED { h.detailed = pcb_true; } ;
+
+ /* units */
+
+units
+ : '{' H_UNITS '=' unit_system metal_thickness_unit '}' { if (exec_units(&h)) YYERROR; } ;
+
+unit_system
+ : H_ENGLISH { h.unit_system_english = pcb_true; }
+ | H_METRIC { h.unit_system_english = pcb_false; };
+
+metal_thickness_unit
+ : H_WEIGHT { h.metal_thickness_weight = pcb_true; }
+ | H_LENGTH { h.metal_thickness_weight = pcb_false; } ;
+
+ /* plane_sep */
+plane_sep
+ : '{' H_PLANE_SEP '=' H_FLOAT { h.default_plane_separation = yylval.floatval; } '}' { if (exec_plane_sep(&h)) YYERROR; } ;
+
+ /* board */
+
+board
+ : '{' H_BOARD board_param_list '}'
+ | '{' H_BOARD '}' ;
+
+board_param_list
+ : board_param_list board_param_list_item
+ | board_param_list_item ;
+
+board_param_list_item
+ : '(' board_param ')'
+ | '(' board_param { hyyerror("warning: missing ')'"); }
+ | error ')' ;
+ ;
+
+board_param
+ : perimeter_segment
+ | perimeter_arc
+ | board_attribute ;
+
+perimeter_segment
+ : H_PERIMETER_SEGMENT coord_line { if (exec_perimeter_segment(&h)) YYERROR; } ;
+
+perimeter_arc
+ : H_PERIMETER_ARC coord_arc { if (exec_perimeter_arc(&h)) YYERROR; } ;
+
+board_attribute
+ : H_A H_N '=' H_STRING { h.name = yylval.strval; } H_V '=' H_STRING { h.value = yylval.strval; } { if (exec_board_attribute(&h)) YYERROR; } ;
+
+ /* stackup */
+
+stackup
+ : '{' H_STACKUP stackup_paramlist '}' ;
+
+stackup_paramlist
+ : stackup_paramlist stackup_param
+ | stackup_param ;
+
+stackup_param
+ : options
+ | signal
+ | dielectric
+ | plane
+ | '(' error ')' ;
+
+options
+ : '(' H_OPTIONS options_params { if (exec_options(&h)) YYERROR; } ;
+
+options_params
+ : H_USE_DIE_FOR_METAL '=' H_BOOL { h.use_die_for_metal = yylval.boolval; } ')'
+ | ')'
+ ;
+
+signal
+ : '(' H_SIGNAL { new_record(); } signal_paramlist ')' { if (exec_signal(&h)) YYERROR; } ;
+
+signal_paramlist
+ : signal_paramlist signal_param
+ | signal_param ;
+
+signal_param
+ : thickness
+ | plating_thickness
+ | H_C '=' H_FLOAT { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; }
+ | bulk_resistivity
+ | temperature_coefficient
+ | epsilon_r
+ | loss_tangent
+ | layer_name
+ | material_name
+ | plane_separation ;
+
+dielectric
+ : '(' H_DIELECTRIC { new_record(); } dielectric_paramlist ')' { if (exec_dielectric(&h)) YYERROR; } ;
+
+dielectric_paramlist
+ : dielectric_paramlist dielectric_param
+ | dielectric_param ;
+
+dielectric_param
+ : thickness
+ | H_C '=' H_FLOAT { h.epsilon_r = yylval.floatval; h.epsilon_r_set = pcb_true; }
+ | epsilon_r
+ | loss_tangent
+ | conformal
+ | prepreg
+ | layer_name
+ | material_name
+ ;
+
+plane
+ : '(' H_PLANE { new_record(); } plane_paramlist ')' { if (exec_plane(&h)) YYERROR; } ;
+
+plane_paramlist
+ : plane_paramlist plane_param
+ | plane_param ;
+
+plane_param
+ : thickness
+ | H_C '=' H_FLOAT { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; }
+ | bulk_resistivity
+ | temperature_coefficient
+ | epsilon_r
+ | loss_tangent
+ | layer_name
+ | material_name
+ | plane_separation ;
+
+thickness
+ : H_T '=' H_FLOAT { h.thickness = yylval.floatval; h.thickness_set = pcb_true; }
+
+plating_thickness
+ : H_P '=' H_FLOAT { h.plating_thickness = yylval.floatval; h.plating_thickness_set = pcb_true; }
+
+bulk_resistivity
+ : H_BR '=' H_FLOAT { h.bulk_resistivity = yylval.floatval; h.bulk_resistivity_set = pcb_true; }
+
+temperature_coefficient
+ : H_TC '=' H_FLOAT { h.temperature_coefficient = yylval.floatval; h.temperature_coefficient_set = pcb_true; }
+
+epsilon_r
+ : H_ER '=' H_FLOAT { h.epsilon_r = yylval.floatval; h.epsilon_r_set = pcb_true; }
+
+loss_tangent
+ : H_LT '=' H_FLOAT { h.loss_tangent = yylval.floatval; h.loss_tangent_set = pcb_true; }
+
+layer_name
+ : H_L '=' H_STRING { h.layer_name = yylval.strval; h.layer_name_set = pcb_true; }
+
+material_name
+ : H_M '=' H_STRING { h.material_name = yylval.strval; h.material_name_set = pcb_true; }
+
+plane_separation
+ : H_PS '=' H_FLOAT { h.plane_separation = yylval.floatval; h.plane_separation_set = pcb_true; }
+
+conformal
+ : H_CO_QM '=' H_BOOL { h.conformal = yylval.boolval; h.conformal_set = pcb_true; }
+
+prepreg
+ : H_PR_QM '=' H_BOOL { h.prepreg = yylval.boolval; h.prepreg_set = pcb_true; }
+
+ /* devices */
+
+devices
+ : '{' H_DEVICES device_list '}'
+ | '{' H_DEVICES '}' ;
+
+device_list
+ : device_list device
+ | device ;
+
+device
+ : '(' { new_record(); } H_STRING { h.device_type = yylval.strval; } H_REF '=' H_STRING { h.ref = yylval.strval; } device_paramlist ')' { if (exec_devices(&h)) YYERROR; }
+ | '(' error ')' ;
+
+device_paramlist
+ : name device_value
+ | device_value
+ ;
+
+device_value
+ : value device_layer
+ | device_layer
+ ;
+
+device_layer
+ : layer_name package
+ | layer_name
+ ;
+
+name
+ : H_NAME '=' H_STRING { h.name = yylval.strval; h.name_set = pcb_true; } ;
+
+value
+ : value_float
+ | value_string
+ ;
+
+value_float
+ : H_VAL '=' H_FLOAT { h.value_float = yylval.floatval; h.value_float_set = pcb_true; } ;
+
+value_string
+ : H_VAL '=' H_STRING { h.value_string = yylval.strval; h.value_string_set = pcb_true; } ;
+
+package
+ : H_PKG '=' H_STRING { h.package = yylval.strval; h.package_set = pcb_true; } ;
+
+ /* supplies */
+
+supplies
+ : '{' H_SUPPLIES supply_list '}' ;
+
+supply_list
+ : supply_list supply
+ | supply ;
+
+supply
+ : '(' H_S name value_float voltage_spec conversion ')' { if (exec_supplies(&h)) YYERROR; }
+ | '(' error ')' ;
+
+voltage_spec
+ : H_V_QM '=' H_BOOL { h.voltage_specified = yylval.boolval; } ;
+
+conversion
+ : H_C_QM '=' H_BOOL { h.conversion = yylval.boolval; }
+
+ /* padstack */
+
+padstack
+ : '{' H_PADSTACK { new_record(); } '=' H_STRING { h.padstack_name = yylval.strval; h.padstack_name_set = pcb_true; } drill_size '}' { if (exec_padstack_end(&h)) YYERROR; } ;
+
+drill_size
+ : ',' H_FLOAT { h.drill_size = yylval.floatval; h.drill_size_set = pcb_true; } padstack_list
+ | ',' padstack_list ;
+ | padstack_list ;
+
+padstack_list
+ : padstack_list padstack_def
+ | padstack_def ;
+
+padstack_def
+ : '(' H_STRING { h.layer_name = yylval.strval; h.layer_name_set = pcb_true; } ',' pad_shape pad_coord pad_type { if (exec_padstack_element(&h)) YYERROR; new_record(); }
+ | '(' error ')' ;
+
+pad_shape
+ : H_FLOAT { h.pad_shape = yylval.floatval; } ','
+ | ',' { h.pad_shape = -1; } /* Workaround: Altium sometimes prints an empty pad shape */
+ ;
+
+pad_coord
+ : H_FLOAT { h.pad_sx = yylval.floatval; } ',' H_FLOAT { h.pad_sy = yylval.floatval; } ',' H_FLOAT { h.pad_angle = yylval.floatval; }
+
+pad_type
+ : ')'
+ | ',' H_M ')' { h.pad_type = PAD_TYPE_METAL; h.pad_type_set = pcb_true; }
+ | ',' H_A ')' { h.pad_type = PAD_TYPE_ANTIPAD; h.pad_type_set = pcb_true; }
+ | ',' H_FLOAT { h.thermal_clear_shape = yylval.floatval; }
+ ',' H_FLOAT { h.thermal_clear_sx = yylval.floatval; }
+ ',' H_FLOAT { h.thermal_clear_sy = yylval.floatval; }
+ ',' H_FLOAT { h.thermal_clear_angle = yylval.floatval; }
+ ',' H_T ')' { h.pad_type = PAD_TYPE_THERMAL_RELIEF; h.pad_type_set = pcb_true; }
+ ;
+
+ /* net */
+
+net
+ : '{' H_NET '=' H_STRING { h.net_name = yylval.strval; if (exec_net(&h)) YYERROR; } net_separation ;
+
+net_separation
+ : plane_separation { if (exec_net_plane_separation(&h)) YYERROR; } net_copper
+ | net_copper
+
+net_copper
+ : net_subrecord_list '}'
+ | { hyyerror("warning: empty net"); } '}'
+ ;
+
+net_subrecord_list
+ : net_subrecord_list net_subrecord
+ | net_subrecord ;
+
+net_subrecord
+ : seg
+ | arc
+ | via
+ | pin
+ | pad
+ | useg
+ | polygon
+ | polyvoid
+ | polyline
+ | net_attribute
+ | '(' error ')'
+ | '{' error '}'
+ ;
+
+seg
+ : '(' H_SEG { new_record(); } coord_line width layer_name ps_lps_param { if (exec_seg(&h)) YYERROR; } ;
+
+arc
+ : '(' H_ARC { new_record(); } coord_arc width layer_name ps_lps_param { if (exec_arc(&h)) YYERROR; } ;
+
+ps_lps_param
+ : plane_separation lps_param
+ | lps_param
+ ;
+
+lps_param
+ : left_plane_separation ')'
+ | ')'
+ ;
+
+width
+ : H_W '=' H_FLOAT { h.width = yylval.floatval; h.width_set = pcb_true; } ;
+
+left_plane_separation
+ : H_LPS '=' H_FLOAT { h.left_plane_separation = yylval.floatval; h.left_plane_separation_set = pcb_true; } ;
+
+via
+ : '(' H_VIA { new_record(); } coord_point via_param_list ')' { if (exec_via(&h)) YYERROR; } ;
+ ;
+
+via_param_list
+ : via_param_list via_param
+ | via_param
+ ;
+
+via_param
+ : padstack_name
+ /* parameters below are for deprecated v1.0 via format */
+ | H_D '=' H_FLOAT { h.drill_size = yylval.floatval; h.drill_size_set = pcb_true; }
+ | layer1_name
+ | layer2_name
+ | H_S '=' H_STRING { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = pcb_true; }
+ | H_SX '=' H_FLOAT { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = pcb_true; }
+ | H_SY '=' H_FLOAT { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = pcb_true; }
+ | H_A '=' H_FLOAT { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = pcb_true; }
+ | H_S1 '=' H_STRING { h.via_pad1_shape = yylval.strval; h.via_pad1_shape_set = pcb_true; }
+ | H_S1X '=' H_FLOAT { h.via_pad1_sx = yylval.floatval; h.via_pad1_sx_set = pcb_true; }
+ | H_S1Y '=' H_FLOAT { h.via_pad1_sy = yylval.floatval; h.via_pad1_sy_set = pcb_true; }
+ | H_A1 '=' H_FLOAT { h.via_pad1_angle = yylval.floatval; h.via_pad1_angle_set = pcb_true; }
+ | H_S2 '=' H_STRING { h.via_pad2_shape = yylval.strval; h.via_pad2_shape_set = pcb_true; }
+ | H_S2X '=' H_FLOAT { h.via_pad2_sx = yylval.floatval; h.via_pad2_sx_set = pcb_true; }
+ | H_S2Y '=' H_FLOAT { h.via_pad2_sy = yylval.floatval; h.via_pad2_sy_set = pcb_true; }
+ | H_A2 '=' H_FLOAT { h.via_pad2_angle = yylval.floatval; h.via_pad2_angle_set = pcb_true; }
+ ;
+
+padstack_name
+ : H_P '=' H_STRING { h.padstack_name = yylval.strval; h.padstack_name_set = pcb_true; } ;
+
+layer1_name
+ : H_L1 '=' H_STRING { h.layer1_name = yylval.strval; h.layer1_name_set = pcb_true; } ;
+
+layer2_name
+ : H_L2 '=' H_STRING { h.layer2_name = yylval.strval; h.layer2_name_set = pcb_true; } ;
+
+pin
+ : '(' H_PIN { new_record(); } coord_point pin_reference pin_param { if (exec_pin(&h)) YYERROR; } ;
+
+pin_param
+ : padstack_name pin_function_param
+ | pin_function_param
+ ;
+
+pin_function_param
+ : pin_function ')'
+ | ')'
+ ;
+
+pin_reference
+ : H_R '=' H_STRING { h.pin_reference = yylval.strval; h.pin_reference_set = pcb_true; } ;
+
+pin_function
+ : H_F '=' H_SIM_OUT { h.pin_function = PIN_SIM_OUT; h.pin_function_set = pcb_true; }
+ | H_F '=' H_SIM_IN { h.pin_function = PIN_SIM_IN; h.pin_function_set = pcb_true; }
+ | H_F '=' H_SIM_BOTH { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = pcb_true; }
+ | H_F '=' H_STRING { h.pin_function = PIN_SIM_BOTH; h.pin_function_set = pcb_true; hyyerror("warning: SIM_BOTH assumed"); }
+ ;
+
+pad /* deprecated hyperlynx v1.x only */
+ : '(' H_PAD { new_record(); } coord_point pad_param_list ')' { if (exec_pad(&h)) YYERROR; } ;
+
+pad_param_list
+ : pad_param_list pad_param
+ | pad_param
+ ;
+
+pad_param
+ : layer_name
+ | H_S '=' H_STRING { h.via_pad_shape = yylval.strval; h.via_pad_shape_set = pcb_true; }
+ | H_SX '=' H_FLOAT { h.via_pad_sx = yylval.floatval; h.via_pad_sx_set = pcb_true; }
+ | H_SY '=' H_FLOAT { h.via_pad_sy = yylval.floatval; h.via_pad_sy_set = pcb_true; }
+ | H_A '=' H_FLOAT { h.via_pad_angle = yylval.floatval; h.via_pad_angle_set = pcb_true; }
+ ;
+
+useg
+ : '(' H_USEG { new_record(); } coord_point1 layer1_name coord_point2 layer2_name useg_param { if (exec_useg(&h)) YYERROR; } ;
+
+useg_param
+ : useg_stackup
+ | useg_impedance
+ ;
+
+useg_stackup
+ : H_ZL '=' H_STRING { h.zlayer_name = yylval.strval; h.zlayer_name_set = pcb_true; }
+ H_ZW '=' H_FLOAT { h.width = yylval.floatval; }
+ H_ZLEN '=' H_FLOAT { h.length = yylval.floatval; }
+ ')'
+ ;
+
+useg_impedance
+ : H_Z '=' H_FLOAT { h.impedance = yylval.floatval; h.impedance_set = pcb_true; }
+ H_D '=' H_FLOAT { h.delay = yylval.floatval; }
+ useg_resistance;
+
+useg_resistance
+ : H_R '=' H_FLOAT { h.resistance = yylval.floatval; h.resistance_set = pcb_true;}
+ ')'
+ | ')'
+ ;
+
+polygon
+ : '{' H_POLYGON { new_record(); } polygon_param_list coord_point { if (exec_polygon_begin(&h)) YYERROR; }
+ lines_and_curves '}' { if (exec_polygon_end(&h)) YYERROR; } ;
+
+polygon_param_list
+ : polygon_param_list polygon_param
+ | polygon_param
+ ;
+
+polygon_param
+ : layer_name
+ | width
+ | polygon_type
+ | polygon_id
+ ;
+
+polygon_id
+ : H_ID '=' H_POSINT { h.id = yylval.intval; h.id_set = pcb_true; } /* polygon id is a non-negative integer */
+ ;
+
+polygon_type
+ : H_T '=' H_POUR { h.polygon_type = POLYGON_TYPE_POUR; h.polygon_type_set = pcb_true; }
+ | H_T '=' H_PLANE { h.polygon_type = POLYGON_TYPE_PLANE; h.polygon_type_set = pcb_true; }
+ | H_T '=' H_COPPER { h.polygon_type = POLYGON_TYPE_COPPER; h.polygon_type_set = pcb_true; }
+ ;
+
+polyvoid
+ : '{' H_POLYVOID { new_record(); } polygon_id coord_point { if (exec_polyvoid_begin(&h)) YYERROR; }
+ lines_and_curves '}' { if (exec_polyvoid_end(&h)) YYERROR; } ;
+
+polyline
+ : '{' H_POLYLINE { new_record(); } polygon_param_list coord_point { if (exec_polyline_begin(&h)) YYERROR; }
+ lines_and_curves '}' { if (exec_polyline_end(&h)) YYERROR; } ;
+
+lines_and_curves
+ : lines_and_curves line_or_curve
+ | line_or_curve
+ ;
+
+line_or_curve
+ : line
+ | curve
+ | '(' error ')'
+ ;
+
+line
+ : '(' H_LINE { new_record(); } coord_point ')' { if (exec_line(&h)) YYERROR; } ;
+
+curve
+ : '(' H_CURVE { new_record(); } coord_arc ')' { if (exec_curve(&h)) YYERROR; } ;
+
+net_attribute
+ : '(' H_A H_N '=' H_STRING { h.name = yylval.strval; } H_V '=' H_STRING { h.value = yylval.strval; } ')' { if (exec_net_attribute(&h)) YYERROR; } ;
+
+ /* net class */
+
+netclass
+ : '{' H_NET_CLASS '=' H_STRING { h.net_class_name = yylval.strval; if (exec_net_class(&h)) YYERROR; } netclass_subrecords ;
+
+netclass_subrecords
+ : netclass_paramlist '}'
+ | '}'
+ ;
+
+netclass_paramlist
+ : netclass_paramlist netclass_param
+ | netclass_param
+ ;
+
+netclass_param
+ : netclass_attribute
+ | net_name
+ | '(' error ')'
+ ;
+
+net_name
+ : '(' H_N H_N '=' H_STRING { h.net_name = yylval.strval; } ')' { if (exec_net_class_element(&h)) YYERROR; } ;
+
+netclass_attribute
+ : '(' H_A H_N '=' H_STRING { h.name = yylval.strval; } H_V '=' H_STRING { h.value = yylval.strval; } ')' { if (exec_net_class_attribute(&h)) YYERROR; } ;
+
+ /* end */
+
+end
+ : '{' H_END '}' { if (exec_end(&h)) YYERROR; } ;
+
+ /* key */
+
+key
+ : '{' H_KEY '=' H_STRING { h.key = yylval.strval; } '}' { if (exec_key(&h)) YYERROR; } ;
+
+ /* coordinates */
+
+coord_point
+ : H_X '=' H_FLOAT { h.x = yylval.floatval; } H_Y '=' H_FLOAT { h.y = yylval.floatval; } ;
+
+coord_point1
+ : H_X1 '=' H_FLOAT { h.x1 = yylval.floatval; } H_Y1 '=' H_FLOAT { h.y1 = yylval.floatval; } ;
+
+coord_point2
+ : H_X2 '=' H_FLOAT { h.x2 = yylval.floatval; } H_Y2 '=' H_FLOAT { h.y2 = yylval.floatval; } ;
+
+coord_line
+ : coord_point1 coord_point2 ;
+
+coord_arc
+ : coord_line H_XC '=' H_FLOAT { h.xc = yylval.floatval; } H_YC '=' H_FLOAT { h.yc = yylval.floatval; } H_R '=' H_FLOAT { h.r = yylval.floatval; } ;
+
+%%
+
+/*
+ * Supporting C routines
+ */
+
+void hyyerror(const char *msg)
+{
+ /* log pcb-rnd message */
+ hyp_error(msg);
+}
+
+void hyyprint(FILE *file, int type, YYSTYPE value)
+{
+ if (type == H_STRING)
+ fprintf (file, "%s", value.strval);
+ else if (type == H_FLOAT)
+ fprintf (file, "%g", value.floatval);
+ else if (type == H_BOOL)
+ fprintf (file, "%i", value.boolval);
+ return;
+}
+
+/*
+ * reset parse_param struct at beginning of record
+ */
+
+void new_record()
+{
+ h.vers = 0;
+ h.detailed = pcb_false;
+ h.unit_system_english = pcb_false;
+ h.metal_thickness_weight = pcb_false;
+ h.default_plane_separation = 0;
+ h.use_die_for_metal = pcb_false;
+ h.bulk_resistivity = 0;
+ h.conformal = pcb_false;
+ h.epsilon_r = 0;
+ h.layer_name = NULL;
+ h.loss_tangent = 0;
+ h.material_name = NULL;
+ h.plane_separation = 0;
+ h.plating_thickness = 0;
+ h.prepreg = pcb_false;
+ h.temperature_coefficient = 0;
+ h.thickness = 0;
+ h.bulk_resistivity_set = pcb_false;
+ h.conformal_set = pcb_false;
+ h.epsilon_r_set = pcb_false;
+ h.layer_name_set = pcb_false;
+ h.loss_tangent_set = pcb_false;
+ h.material_name_set = pcb_false;
+ h.plane_separation_set = pcb_false;
+ h.plating_thickness_set = pcb_false;
+ h.prepreg_set = pcb_false;
+ h.temperature_coefficient_set = pcb_false;
+ h.thickness_set = pcb_false;
+ h.device_type = NULL;
+ h.ref = NULL;
+ h.value_float = 0;
+ h.value_string = NULL;
+ h.package = NULL;
+ h.name_set = pcb_false;
+ h.value_float_set = pcb_false;
+ h.value_string_set = pcb_false;
+ h.package_set = pcb_false;
+ h.voltage_specified = pcb_false;
+ h.conversion = pcb_false;
+ h.padstack_name = NULL;
+ h.drill_size = 0;
+ h.pad_shape = 0;
+ h.pad_sx = 0;
+ h.pad_sy = 0;
+ h.pad_angle = 0;
+ h.thermal_clear_shape = 0;
+ h.thermal_clear_sx = 0;
+ h.thermal_clear_sy = 0;
+ h.thermal_clear_angle = 0;
+ h.pad_type = PAD_TYPE_METAL;
+ h.padstack_name_set = pcb_false;
+ h.drill_size_set = pcb_false;
+ h.pad_type_set = pcb_false;
+ h.width = 0;
+ h.left_plane_separation = 0;
+ h.width_set = pcb_false;
+ h.left_plane_separation_set = pcb_false;
+ h.layer1_name = NULL;
+ h.layer1_name_set = pcb_false;
+ h.layer2_name = NULL;
+ h.layer2_name_set = pcb_false;
+ h.via_pad_shape = NULL;
+ h.via_pad_shape_set = pcb_false;
+ h.via_pad_sx = 0;
+ h.via_pad_sx_set = pcb_false;
+ h.via_pad_sy = 0;
+ h.via_pad_sy_set = pcb_false;
+ h.via_pad_angle = 0;
+ h.via_pad_angle_set = pcb_false;
+ h.via_pad1_shape = NULL;
+ h.via_pad1_shape_set = pcb_false;
+ h.via_pad1_sx = 0;
+ h.via_pad1_sx_set = pcb_false;
+ h.via_pad1_sy = 0;
+ h.via_pad1_sy_set = pcb_false;
+ h.via_pad1_angle = 0;
+ h.via_pad1_angle_set = pcb_false;
+ h.via_pad2_shape = NULL;
+ h.via_pad2_shape_set = pcb_false;
+ h.via_pad2_sx = 0;
+ h.via_pad2_sx_set = pcb_false;
+ h.via_pad2_sy = 0;
+ h.via_pad2_sy_set = pcb_false;
+ h.via_pad2_angle = 0;
+ h.via_pad2_angle_set = pcb_false;
+ h.pin_reference = NULL;
+ h.pin_reference_set = pcb_false;
+ h.pin_function = PIN_SIM_BOTH;
+ h.pin_function_set = pcb_false;
+ h.zlayer_name = NULL;
+ h.zlayer_name_set = pcb_false;
+ h.length = 0;
+ h.impedance = 0;
+ h.impedance_set = pcb_false;
+ h.delay = 0;
+ h.resistance = 0;
+ h.resistance_set = pcb_false;
+ h.id = -1;
+ h.id_set = pcb_false;
+ h.polygon_type = POLYGON_TYPE_PLANE;
+ h.polygon_type_set = pcb_false;
+ h.net_class_name = NULL;
+ h.net_name = NULL;
+ h.key = NULL;
+ h.name = NULL;
+ h.value = NULL;
+ h.x = 0;
+ h.y = 0;
+ h.x1 = 0;
+ h.y1 = 0;
+ h.x2 = 0;
+ h.y2 = 0;
+ h.xc = 0;
+ h.yc = 0;
+ h.r = 0;
+
+ return;
+}
+
+/* not truncated */
Index: src_plugins/io_hyp/io_hyp.c
===================================================================
--- src_plugins/io_hyp/io_hyp.c (nonexistent)
+++ src_plugins/io_hyp/io_hyp.c (revision 7964)
@@ -0,0 +1,118 @@
+/*
+ * COPYRIGHT
+ *
+ * PCB, interactive printed circuit board design
+ *
+ * hyperlynx .hyp importer, plugin entry
+ * Copyright (C) 2016 Tibor 'Igor2' Palinkas
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include "config.h"
+
+#include
+#include
+
+#include "action_helper.h"
+#include "compat_nls.h"
+#include "hid.h"
+#include "hid_draw_helpers.h"
+#include "hid_nogui.h"
+#include "hid_actions.h"
+#include "hid_init.h"
+#include "hid_attrib.h"
+#include "hid_helper.h"
+#include "plugins.h"
+#include "event.h"
+
+#warning TODO: rename config.h VERSION to PCB_VERSION
+#undef VERSION
+
+#include "parser.h"
+#include "board.h"
+
+static const char *hyp_cookie = "hyp importer";
+
+static const char load_hyp_syntax[] = "LoadhypFrom(filename[, \"debug\"]...)";
+
+static const char load_hyp_help[] = "Loads the specified Hyperlynx file.";
+
+int pcb_act_LoadhypFrom(int argc, const char **argv, pcb_coord_t x, pcb_coord_t y)
+{
+ const char *fname = NULL;
+ int debug = 0;
+ int i = 0;
+ pcb_bool_t retval;
+
+ fname = argc ? argv[0] : 0;
+
+ if ((fname == NULL) || (*fname == '\0')) {
+ fname = pcb_gui->fileselect(_("Load .hyp file..."),
+ _("Picks a hyperlynx file to load.\n"), "default.hyp", ".hyp", "hyp", HID_FILESELECT_READ);
+ }
+
+ if (fname == NULL)
+ PCB_AFAIL(load_hyp);
+
+
+ /*
+ * debug level.
+ * one "debug" argument: hyperlynx logging.
+ * two "debug" arguments: hyperlynx and bison logging.
+ * three "debug" arguments: hyperlynx, bison and flex logging.
+ */
+
+ for (i = 0; i < argc; i++)
+ debug += (strcmp(argv[i], "debug") == 0);
+
+ if (debug > 0)
+ pcb_message(PCB_MSG_INFO, _("Importing Hyperlynx file '%s', debug level %d\n"), fname, debug);
+
+ pcb_event(PCB_EVENT_BUSY, NULL);
+
+ retval = hyp_parse(PCB->Data, fname, debug);
+
+ /* notify GUI */
+ pcb_event(PCB_EVENT_LAYERS_CHANGED, NULL);
+ pcb_event(PCB_EVENT_BOARD_CHANGED, NULL);
+
+ if (retval)
+ PCB_AFAIL(load_hyp);
+
+ return 0;
+}
+
+pcb_hid_action_t hyp_action_list[] = {
+ {"LoadhypFrom", 0, pcb_act_LoadhypFrom, load_hyp_help, load_hyp_syntax}
+};
+
+PCB_REGISTER_ACTIONS(hyp_action_list, hyp_cookie)
+
+ static void hid_io_hyp_uninit()
+{
+ pcb_hid_remove_actions_by_cookie(hyp_cookie);
+}
+
+#include "dolists.h"
+pcb_uninit_t hid_io_hyp_init()
+{
+#warning TODO: rather register an importer than an action
+ PCB_REGISTER_ACTIONS(hyp_action_list, hyp_cookie)
+ return hid_io_hyp_uninit;
+}
+
+/* not truncated */
Index: src_plugins/io_hyp/parser.c
===================================================================
--- src_plugins/io_hyp/parser.c (nonexistent)
+++ src_plugins/io_hyp/parser.c (revision 7964)
@@ -0,0 +1,2433 @@
+/*
+ * read hyperlynx files
+ * Copyright 2016 Koen De Vleeschauwer.
+ *
+ * This file is part of pcb-rnd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+/*
+ * ~/.indent.pro:
+ * --line-length128 -brs -br -nce --tab-size2 -ut -npsl -npcs -hnl
+ * ~/.vimrc:
+ * set tabstop=2
+ */
+
+#include "parser.h"
+#include "hyp_l.h"
+#include "hyp_y.h"
+#include "error.h"
+#include "pcb-printf.h"
+#include "obj_all.h"
+#include "flag_str.h"
+#include "polygon.h"
+#include "board.h"
+#include "layer.h"
+#include "data.h"
+#include "search.h"
+#include "compat_misc.h"
+
+/*
+ * the board is shared between all routines.
+ */
+
+pcb_data_t *hyp_dest;
+
+/*
+ * board outline is a linked list of arcs and line segments.
+ */
+
+typedef struct outline_s {
+ pcb_coord_t x1;
+ pcb_coord_t y1;
+ pcb_coord_t x2;
+ pcb_coord_t y2;
+ pcb_coord_t xc;
+ pcb_coord_t yc;
+ pcb_coord_t r;
+ pcb_bool_t is_arc; /* arc or line */
+ pcb_bool_t used; /* already included in outline */
+ struct outline_s *next;
+} outline_t;
+
+outline_t *outline_head;
+outline_t *outline_tail;
+
+void hyp_set_origin(); /* set origin so all coordinates are positive */
+void hyp_perimeter(); /* add board outline to pcb */
+void hyp_create_polygons(); /* add all created polygons to pcb */
+void hyp_create_silkscreen(); /* add silkscreen outlines to all devices on board */
+void hyp_resize_board(); /* resize board to fit outline */
+unsigned int hyp_layer_flag(char *); /* set "solder side" flag if on bottom layer */
+
+/* layer creation */
+int layer_count;
+pcb_layer_id_t top_layer_id, bottom_layer_id;
+void hyp_reset_layers(); /* reset layer stack to minimun */
+pcb_layer_id_t hyp_create_layer(char *lname); /* create new copper layer at bottom of stack */
+
+int hyp_debug; /* logging on/off switch */
+
+/* Physical constants */
+double inches; /* inches to m */
+double copper_imperial_weight; /* metal thickness in ounces/ft2 */
+double copper_metric_weight; /* metal thickness in grams/cm2 */
+double copper_bulk_resistivity; /* metal resistivity in ohm meter */
+double copper_temperature_coefficient; /* temperature coefficient of bulk resistivity */
+double fr4_epsilon_r; /* dielectric constant of substrate */
+double fr4_loss_tangent; /* loss tangent of substrate */
+double conformal_epsilon_r; /* dielectric constant of conformal coating */
+
+/* Hyperlynx UNIT and OPTIONS */
+double unit; /* conversion factor: pcb length units to meters */
+double metal_thickness_unit; /* conversion factor: metal thickness to meters */
+
+pcb_bool use_die_for_metal; /* use dielectric constant and loss tangent of dielectric for metal layers */
+
+pcb_coord_t board_clearance; /* distance between PLANE polygon and copper of different nets; -1 if not set */
+
+/* stackup */
+pcb_bool layer_is_plane[PCB_MAX_LAYER]; /* whether layer is signal or plane layer */
+pcb_coord_t layer_clearance[PCB_MAX_LAYER]; /* separation between fill copper and signals on layer */
+
+/* net */
+char *net_name; /* name of current copper */
+pcb_coord_t net_clearance; /* distance between PLANE polygon and net copper */
+
+/* devices */
+
+typedef struct device_s {
+ char *ref;
+ char *name; /* optional */
+ char *value; /* optional */
+ char *layer_name;
+ struct device_s *next;
+} device_t;
+
+device_t *device_head;
+
+/* padstack */
+
+typedef struct padstack_s {
+ char *name;
+ pcb_coord_t thickness;
+ pcb_coord_t clearance;
+ pcb_coord_t mask;
+ pcb_coord_t drill_hole;
+ pcb_flag_t flags; /* round, rectangular or octagon */
+ struct padstack_s *next;
+} padstack_t;
+
+padstack_t *padstack_head;
+padstack_t *current_padstack;
+
+ /* pads */
+pcb_element_t *component_side_pads;
+pcb_element_t *solder_side_pads;
+
+ /* polygons */
+
+ /* linked list to store correspondence between hyperlynx polygon id's and pcb polygons. */
+typedef struct hyp_polygon_s {
+ int hyp_poly_id; /* hyperlynx polygon/polyline id */
+ pcb_polygon_t *polygon;
+ pcb_layer_t *layer;
+ pcb_bool_t is_polygon; /* whether polygon or polyline */
+ struct hyp_polygon_s *next;
+} hyp_polygon_t;
+
+hyp_polygon_t *polygon_head = NULL;
+
+/* keep track of current polygon */
+
+pcb_polygon_t *current_polygon = NULL;
+
+/* current polyline layer, position, width and clearance */
+pcb_layer_t *current_polyline_layer = NULL;
+pcb_coord_t current_polyline_xpos = 0;
+pcb_coord_t current_polyline_ypos = 0;
+pcb_coord_t current_polyline_width = 0;
+pcb_coord_t current_polyline_clearance = 0;
+
+/* State machine for polygon parsing:
+ * HYP_POLYIDLE idle
+ * HYP_POLYGON parsing a polygon
+ * HYP_POLYLINE parsing a polyline (sequence of lines and arcs)
+ * HYP_POLYGON_HOLE parsing a hole in a polygon
+ * HYP_POLYLINE_HOLE parsing a hole in a polyline
+ */
+
+enum poly_state_e { HYP_POLYIDLE, HYP_POLYGON, HYP_POLYLINE, HYP_POLYGON_HOLE, HYP_POLYLINE_HOLE };
+enum poly_state_e poly_state = HYP_POLYIDLE;
+
+/* origin. Chosen so all coordinates are positive. */
+pcb_coord_t origin_x;
+pcb_coord_t origin_y;
+
+/*
+ * Conversion from hyperlynx to pcb_coord_t
+ */
+
+/* meter to pcb_coord_t */
+
+pcb_coord_t inline m2coord(double m)
+{
+ return ((pcb_coord_t) PCB_MM_TO_COORD(1000.0 * m));
+}
+
+/* xy coordinates to pcb_coord_t, without offset */
+
+pcb_coord_t inline xy2coord(double f)
+{
+ return (m2coord(unit * f));
+}
+
+
+/* x coordinates to pcb_coord_t, with offset */
+
+pcb_coord_t inline x2coord(double f)
+{
+ return (m2coord(unit * f) - origin_x);
+}
+
+/* y coordinates to pcb_coord_t, with offset */
+
+pcb_coord_t inline y2coord(double f)
+{
+ return (origin_y - m2coord(unit * f));
+}
+
+/* z coordinates to pcb_coord_t. No offset needed. */
+
+pcb_coord_t inline z2coord(double f)
+{
+ return (m2coord(metal_thickness_unit * f));
+}
+
+/*
+ * initialize physical constants
+ */
+
+void hyp_init(void)
+{
+ int n;
+
+ unit = 1;
+ metal_thickness_unit = 1;
+ use_die_for_metal = pcb_false;
+
+ inches = 0.0254; /* inches to m */
+ copper_imperial_weight = 1.341; /* metal thickness in ounces/ft2. 1 oz/ft2 copper = 1.341 mil */
+ copper_metric_weight = 0.1116; /* metal thickness in grams/cm2. 1 gr/cm2 copper = 0.1116 cm */
+ copper_bulk_resistivity = 1.724e-8;
+ copper_temperature_coefficient = 0.00393;
+ fr4_epsilon_r = 4.3;
+ fr4_loss_tangent = 0.020;
+ conformal_epsilon_r = 3.3; /* dielectric constant of conformal layer */
+ board_clearance = -1; /* distance between PLANE polygon and copper of different nets; -1 if not set */
+
+ /* empty board outline */
+ outline_head = NULL;
+ outline_tail = NULL;
+
+ /* clear layer info */
+ for (n = 1; n < PCB_MAX_LAYER; n++) {
+ layer_is_plane[n] = pcb_false; /* signal layer */
+ layer_clearance[n] = -1; /* no separation between fill copper and signals on layer */
+ }
+ layer_count = 0;
+ top_layer_id = -1;
+ bottom_layer_id = -1;
+
+ /* clear padstack */
+ padstack_head = NULL;
+ current_padstack = NULL;
+
+ /* clear devices */
+ device_head = NULL;
+
+ /* clear pads */
+ component_side_pads = NULL;
+ solder_side_pads = NULL;
+
+ /* clear polygon data */
+ polygon_head = NULL;
+ current_polygon = NULL;
+ poly_state = HYP_POLYIDLE;
+
+ /* clear polyline data */
+ current_polyline_layer = NULL;
+ current_polyline_xpos = 0;
+ current_polyline_ypos = 0;
+ current_polyline_width = 0;
+ current_polyline_clearance = 0;
+
+ /* set origin */
+ origin_x = 0;
+ origin_y = 0;
+
+ return;
+}
+
+/*
+ * called by pcb-rnd to load hyperlynx file
+ */
+
+int hyp_parse(pcb_data_t * dest, const char *fname, int debug)
+{
+ int retval;
+
+ /* set debug levels */
+ hyyset_debug(debug > 2); /* switch flex logging on */
+ hyydebug = (debug > 1); /* switch bison logging on */
+ hyp_debug = (debug > 0); /* switch hyperlynx logging on */
+
+ hyp_init();
+
+ hyp_reset_layers();
+
+ /* set shared board */
+ hyp_dest = dest;
+
+ /* parse hyperlynx file */
+ hyyin = fopen(fname, "r");
+ if (hyyin == NULL)
+ return (1);
+ retval = hyyparse();
+ fclose(hyyin);
+
+ /* finish setting up polygons */
+ hyp_create_polygons();
+
+ /* create device outlines */
+ hyp_create_silkscreen();
+
+ /* add board outline last */
+ hyp_perimeter();
+
+ /* clear */
+ hyp_dest = NULL;
+
+ return (retval);
+}
+
+/* print error message */
+void hyp_error(const char *msg)
+{
+ pcb_message(PCB_MSG_DEBUG, "line %d: %s at '%s'\n", hyylineno, msg, hyytext);
+}
+
+/*
+ * find padstack by name
+ */
+
+padstack_t *hyp_padstack_by_name(char *padstack_name)
+{
+ padstack_t *i;
+ for (i = padstack_head; i != NULL; i = i->next)
+ if (strcmp(i->name, padstack_name) == 0)
+ return i;
+ return NULL;
+}
+
+/*
+ * find hyperlynx device by name
+ */
+
+device_t *hyp_device_by_name(char *device_name)
+{
+ device_t *i;
+ for (i = device_head; i != NULL; i = i->next)
+ if (strcmp(i->ref, device_name) == 0)
+ return i;
+ return NULL;
+}
+
+/*
+ * create pcb element by name
+ * parameters: name, (x, y) coordinates of element text.
+ */
+
+pcb_element_t *hyp_create_element_by_name(char *element_name, pcb_coord_t x, pcb_coord_t y)
+{
+ pcb_element_t *elem;
+ pcb_flag_t flags;
+ pcb_uint8_t text_direction = 0;
+ int text_scale = 100;
+
+ flags = pcb_no_flags();
+ /* does the device already exist? */
+ elem = pcb_search_elem_by_name(hyp_dest, element_name);
+ if (elem == NULL) {
+ /* device needs to be created. Search in DEVICE records. */
+ device_t *dev = hyp_device_by_name(element_name);
+ if (dev != NULL) {
+ /* device on component or solder side? */
+ flags = pcb_flag_add(flags, hyp_layer_flag(dev->layer_name));
+ /* create */
+ if (hyp_debug)
+ pcb_printf("creating device \"%s\".\n", dev->ref);
+ elem =
+ pcb_element_new(hyp_dest, NULL, pcb_font(PCB, 0, 1), flags, dev->name, dev->ref, dev->value, x, y, text_direction,
+ text_scale, flags, pcb_false);
+ }
+ else {
+ /* no device with this name exists, and no such device has been listed in a DEVICE record. Let's create the device anyhow so we can continue. Assume device is on component side. */
+ pcb_printf("device \"%s\" not specified in DEVICE record. continuing.\n", element_name);
+ elem =
+ pcb_element_new(hyp_dest, NULL, pcb_font(PCB, 0, 1), flags, element_name, element_name, NULL, x, y,
+ text_direction, text_scale, flags, pcb_false);
+ }
+ }
+
+ return elem;
+}
+
+/*
+ * add segment to board outline
+ */
+
+void hyp_perimeter_segment_add(outline_t * s, pcb_bool_t forward)
+{
+ pcb_layer_id_t outline_id;
+ pcb_layer_t *outline_layer;
+
+ /* get outline layer */
+ outline_id = pcb_layer_by_name("outline");
+ if (outline_id < 0) {
+ pcb_printf("no outline layer.\n");
+ return;
+ }
+ outline_layer = pcb_get_layer(outline_id);
+ if (outline_layer == NULL) {
+ pcb_printf("get outline layer failed.\n");
+ return;
+ }
+
+ /* mark segment as used, so we don't use it twice */
+ s->used = pcb_true;
+
+ /* debugging */
+ if (hyp_debug) {
+ if (forward)
+ pcb_printf("outline: fwd %s from (%ml, %ml) to (%ml, %ml)\n", s->is_arc ? "arc" : "line", s->x1, s->y1, s->x2, s->y2);
+ else
+ pcb_printf("outline: bwd %s from (%ml, %ml) to (%ml, %ml)\n", s->is_arc ? "arc" : "line", s->x2, s->y2, s->x1, s->y1); /* add segment back to front */
+ }
+
+ if (s->is_arc) {
+ /* counterclockwise arc from (x1, y1) to (x2, y2) */
+ hyp_arc_new(outline_layer, s->x1, s->y1, s->x2, s->y2, s->xc, s->yc, s->r, s->r, pcb_false, 1, 0, pcb_no_flags());
+ }
+ else
+ /* line from (x1, y1) to (x2, y2) */
+ pcb_line_new(outline_layer, s->x1, s->y1, s->x2, s->y2, 1, 0, pcb_no_flags());
+
+ return;
+}
+
+/*
+ * Check whether point (end_x, end_y) is connected to point (begin_x, begin_y) via un-used segment s and other un-used segments.
+ */
+
+pcb_bool_t hyp_segment_connected(pcb_coord_t begin_x, pcb_coord_t begin_y, pcb_coord_t end_x, pcb_coord_t end_y, outline_t * s)
+{
+ outline_t *i;
+ pcb_bool_t connected;
+
+ connected = (begin_x == end_x) && (begin_y == end_y); /* trivial case */
+
+ if (!connected) {
+ /* recursive descent */
+ s->used = pcb_true;
+
+ for (i = outline_head; i != NULL; i = i->next) {
+ if (i->used)
+ continue;
+ if ((i->x1 == begin_x) && (i->y1 == begin_y)) {
+ connected = ((i->x2 == end_x) && (i->y2 == end_y)) || hyp_segment_connected(i->x2, i->y2, end_x, end_y, i);
+ if (connected)
+ break;
+ }
+ /* try back-to-front */
+ if ((i->x2 == begin_x) && (i->y2 == begin_y)) {
+ connected = ((i->x1 == end_x) && (i->y1 == end_y)) || hyp_segment_connected(i->x1, i->y1, end_x, end_y, i);
+ if (connected)
+ break;
+ }
+ }
+
+ s->used = pcb_false;
+ }
+
+ return connected;
+}
+
+/*
+ * Sets (origin_x, origin_y)
+ * Choose origin so that all coordinates are posive.
+ */
+
+void hyp_set_origin()
+{
+ outline_t *i;
+
+ /* safe initial value */
+ if (outline_head != NULL) {
+ origin_x = outline_head->x1;
+ origin_y = outline_head->y1;
+ }
+ else {
+ origin_x = 0;
+ origin_y = 0;
+ }
+
+ /* choose upper left corner of outline */
+ for (i = outline_head; i != NULL; i = i->next) {
+ /* set origin so all coordinates are positive */
+ if (i->x1 < origin_x)
+ origin_x = i->x1;
+ if (i->x2 < origin_x)
+ origin_x = i->x2;
+ if (i->y1 > origin_y)
+ origin_y = i->y1;
+ if (i->y2 > origin_y)
+ origin_y = i->y2;
+ if (i->is_arc) {
+ if (i->xc - i->r < origin_x)
+ origin_x = i->xc - i->r;
+ if (i->yc + i->r > origin_y)
+ origin_y = i->yc + i->r;
+ }
+ }
+}
+
+/*
+ * resize board to fit pcb outline.
+ */
+
+void hyp_resize_board()
+{
+ pcb_coord_t x_max, x_min, y_max, y_min;
+ pcb_coord_t width, height;
+ pcb_coord_t slack = PCB_MM_TO_COORD(1);
+ outline_t *i;
+
+ if (PCB == NULL)
+ return;
+ if (outline_head == NULL)
+ return;
+
+ x_min = x_max = outline_head->x1;
+ y_min = y_max = outline_head->y1;
+
+ for (i = outline_head; i != NULL; i = i->next) {
+
+ x_max = max(x_max, i->x1);
+ x_max = max(x_max, i->x2);
+ y_max = max(y_max, i->y1);
+ y_max = max(y_max, i->y2);
+
+ x_min = min(x_min, i->x1);
+ x_min = min(x_min, i->x2);
+ y_min = min(y_min, i->y1);
+ y_min = min(y_min, i->y2);
+
+ if (i->is_arc) {
+ x_max = max(x_max, i->xc + i->r);
+ y_max = max(y_max, i->yc + i->r);
+
+ x_min = min(x_min, i->xc - i->r);
+ y_min = min(y_min, i->yc - i->r);
+ }
+ }
+
+ width = max(PCB->MaxWidth, x_max - x_min + slack);
+ height = max(PCB->MaxHeight, y_max - y_min + slack);
+
+ /* resize if board too small */
+ if ((width > PCB->MaxWidth) || (height > PCB->MaxHeight))
+ pcb_board_resize(width, height);
+
+ return;
+
+}
+
+/*
+ * Draw board perimeter.
+ * The first segment is part of the first polygon.
+ * The first polygon of the board perimeter is positive, the rest are holes.
+ * Segments do not necessarily occur in order.
+ */
+
+void hyp_perimeter()
+{
+ pcb_bool_t warn_not_closed;
+ pcb_bool_t segment_found;
+ pcb_bool_t polygon_closed;
+ pcb_coord_t begin_x, begin_y, last_x, last_y;
+ outline_t *i;
+ outline_t *j;
+
+ warn_not_closed = pcb_false;
+
+ /* iterate over perimeter segments and adjust origin */
+ for (i = outline_head; i != NULL; i = i->next) {
+ /* set origin so all coordinates are positive */
+ i->x1 = i->x1 - origin_x;
+ i->y1 = origin_y - i->y1;
+ i->x2 = i->x2 - origin_x;
+ i->y2 = origin_y - i->y2;
+ if (i->is_arc) {
+ i->xc = i->xc - origin_x;
+ i->yc = origin_y - i->yc;
+ }
+ }
+
+ /* iterate over perimeter polygons */
+ while (pcb_true) {
+
+ /* find first free segment */
+ for (i = outline_head; i != NULL; i = i->next)
+ if (i->used == pcb_false)
+ break;
+
+ /* exit if no segments found */
+ if (i == NULL)
+ break;
+
+ /* first point of polygon (begin_x, begin_y) */
+ begin_x = i->x1;
+ begin_y = i->y1;
+
+ /* last point of polygon (last_x, last_y) */
+ last_x = i->x2;
+ last_y = i->y2;
+
+ /* add segment */
+ hyp_perimeter_segment_add(i, pcb_true);
+
+ /* add polygon segments until the polygon is closed */
+ polygon_closed = pcb_false;
+ while (!polygon_closed) {
+
+#undef XXX
+#ifdef XXX
+ pcb_printf("perimeter: last_x = %ml last_y = %ml\n", last_x, last_y);
+ for (i = outline_head; i != NULL; i = i->next)
+ if (!i->used)
+ pcb_printf("perimeter segments available: %s from (%ml, %ml) to (%ml, %ml)\n", i->is_arc ? "arc " : "line", i->x1,
+ i->y1, i->x2, i->y2);
+#endif
+
+ /* find segment to add to current polygon */
+ segment_found = pcb_false;
+
+ /* XXX prefer closed polygon over open polyline */
+
+ for (i = outline_head; i != NULL; i = i->next) {
+ if (i->used)
+ continue;
+
+ if ((last_x == i->x1) && (last_y == i->y1)) {
+ if (!hyp_segment_connected(i->x2, i->y2, begin_x, begin_y, i))
+ continue; /* XXX Checkme */
+ /* first point of segment is last point of current edge: add segment to edge */
+ segment_found = pcb_true;
+ hyp_perimeter_segment_add(i, pcb_true);
+ last_x = i->x2;
+ last_y = i->y2;
+ }
+ else if ((last_x == i->x2) && (last_y == i->y2)) {
+ if (!hyp_segment_connected(i->x1, i->y1, begin_x, begin_y, i))
+ continue; /* XXX Checkme */
+ /* last point of segment is last point of current edge: add segment to edge back to front */
+ segment_found = pcb_true;
+ /* add segment back to front */
+ hyp_perimeter_segment_add(i, pcb_false);
+ last_x = i->x1;
+ last_y = i->y1;
+ }
+ if (segment_found)
+ break;
+ }
+ polygon_closed = (begin_x == last_x) && (begin_y == last_y);
+ if (!polygon_closed && !segment_found)
+ break; /* can't find anything suitable */
+ }
+ if (polygon_closed) {
+ if (hyp_debug)
+ pcb_printf("outline: closed\n");
+ }
+ else {
+ if (hyp_debug)
+ pcb_printf("outline: open\n");
+ warn_not_closed = pcb_true;
+ }
+ }
+
+ /* free segment memory */
+ for (i = outline_head; i != NULL; i = j) {
+ j = i->next;
+ free(i);
+ }
+ outline_head = outline_tail = NULL;
+
+ if (warn_not_closed)
+ pcb_message(PCB_MSG_DEBUG, "warning: board outline not closed\n");
+
+ return;
+}
+
+/*
+ * silkscreen a simple box around an element
+ */
+
+/* XXX check if all this can be done without looking inside element. easiest solution would be to put this in obj_elem.c */
+void hyp_element_silkscreen_new(pcb_data_t * Data, pcb_element_t * Element, pcb_font_t * Font)
+{
+ pcb_coord_t x1, x2, y1, y2;
+
+ /* get bounding box of device */
+ x1 = Element->BoundingBox.X1;
+ x2 = Element->BoundingBox.X2;
+ y1 = Element->BoundingBox.Y1;
+ y2 = Element->BoundingBox.Y2;
+
+ /* draw rectangle around device on silkscreen */
+ pcb_element_line_new(Element, x1, y1, x1, y2, 1);
+ pcb_element_line_new(Element, x1, y2, x2, y2, 1);
+ pcb_element_line_new(Element, x2, y2, x2, y1, 1);
+ pcb_element_line_new(Element, x2, y1, x1, y1, 1);
+
+ /* put part no. bottom left */
+ PCB_ELEM_TEXT_REFDES(Element).X = x1;
+ PCB_ELEM_TEXT_REFDES(Element).Y = y2;
+
+ /* put description top left */
+ PCB_ELEM_TEXT_DESCRIPTION(Element).X = x1;
+ PCB_ELEM_TEXT_DESCRIPTION(Element).Y = y1;
+
+ /* put value bottom right */
+ PCB_ELEM_TEXT_VALUE(Element).X = x2;
+ PCB_ELEM_TEXT_VALUE(Element).Y = y2;
+
+ /* update */
+ pcb_element_bbox(Data, Element, Font);
+
+ return;
+}
+
+/*
+ * create device outlines and clean up device reference text.
+ * call after all devices have been created.
+ */
+
+void hyp_create_silkscreen()
+{
+ device_t *i;
+ pcb_element_t *elem;
+
+ for (i = device_head; i != NULL; i = i->next) {
+ elem = pcb_search_elem_by_name(hyp_dest, i->ref);
+ if (elem != NULL)
+ hyp_element_silkscreen_new(hyp_dest, elem, pcb_font(PCB, 0, 1));
+ }
+
+ return;
+}
+
+/*
+ * reset pcb layer stack
+ */
+
+void hyp_reset_layers()
+{
+
+ pcb_layer_id_t id = -1;
+ pcb_layergrp_id_t gid = -1;
+ pcb_layer_group_t *grp = NULL;
+
+ pcb_layergrp_inhibit_inc();
+
+ pcb_layers_reset();
+
+ pcb_layer_group_setup_default(&PCB->LayerGroups);
+
+ /* set up dual layer board: top and bottom copper and silk */
+
+ id = -1;
+ if (pcb_layergrp_list(PCB, PCB_LYT_SILK | PCB_LYT_TOP, &gid, 1) == 1)
+ id = pcb_layer_create(gid, pcb_strdup("top silk"));
+ if (id < 0)
+ pcb_printf("failed to create top silk\n");
+
+ id = -1;
+ if (pcb_layergrp_list(PCB, PCB_LYT_SILK | PCB_LYT_BOTTOM, &gid, 1) == 1)
+ id = pcb_layer_create(gid, pcb_strdup("bottom silk"));
+ if (id < 0)
+ pcb_printf("failed to create bottom silk\n");
+
+ top_layer_id = -1;
+ if (pcb_layergrp_list(PCB, PCB_LYT_COPPER | PCB_LYT_TOP, &gid, 1) == 1)
+ top_layer_id = pcb_layer_create(gid, NULL);
+ if (top_layer_id < 0)
+ pcb_printf("failed to create top copper\n");
+
+ bottom_layer_id = -1;
+ if (pcb_layergrp_list(PCB, PCB_LYT_COPPER | PCB_LYT_BOTTOM, &gid, 1) == 1)
+ bottom_layer_id = pcb_layer_create(gid, NULL);
+ if (bottom_layer_id < 0)
+ pcb_printf("failed to create bottom copper\n");
+
+ /* create outline layer */
+
+ id = -1;
+ grp = pcb_get_grp_new_intern(PCB, -1);
+ if (grp != NULL) {
+ id = pcb_layer_create(grp - PCB->LayerGroups.grp, "outline");
+ pcb_layergrp_fix_turn_to_outline(grp);
+ }
+ if (id < 0)
+ pcb_printf("failed to create outline\n");
+
+ pcb_layergrp_inhibit_dec();
+
+ return;
+}
+
+/*
+ * Returns the pcb_layer_id of layer "lname".
+ * If layer lname does not exist, a new copper layer with name "lname" is created.
+ * If the layer name is NULL, a new copper layer with a new, unused layer name is created.
+ */
+
+pcb_layer_id_t hyp_create_layer(char *lname)
+{
+ pcb_layer_id_t layer_id;
+ pcb_layergrp_id_t gid;
+ pcb_layer_group_t *grp;
+ char new_layer_name[PCB_MAX_LAYER];
+ int n;
+
+ layer_id = -1;
+ if (lname != NULL) {
+ /* we have a layer name. check whether layer already exists */
+ layer_id = pcb_layer_by_name(lname);
+ if (layer_id >= 0)
+ return layer_id; /* found. return existing layer. */
+ }
+ else {
+ /* no layer name given. find unused layer name in range 1..PCB_MAX_LAYER */
+ for (n = 1; n < PCB_MAX_LAYER; n++) {
+ pcb_sprintf(new_layer_name, "%i", n);
+ if (pcb_layer_by_name(new_layer_name) < 0) {
+ lname = new_layer_name;
+ break;
+ }
+ }
+ if (lname == NULL)
+ return bottom_layer_id; /* no unused layer name available */
+ }
+
+ /* new layer */
+
+ layer_count++;
+ switch (layer_count) {
+ case 1:
+ /* rename top copper and return */
+ pcb_layer_rename(top_layer_id, lname);
+ return top_layer_id;
+ break;
+
+ case 2:
+ /* rename bottom copper and return */
+ pcb_layer_rename(bottom_layer_id, lname);
+ return bottom_layer_id;
+ break;
+
+ default:
+
+ /* create new bottom layer */
+ pcb_layergrp_list(PCB, PCB_LYT_COPPER | PCB_LYT_BOTTOM, &gid, 1);
+ layer_id = pcb_layer_create(gid, lname);
+
+ /* check if new bottom layer valid */
+ if (layer_id < 0) {
+ /* layer creation failed. return old bottom layer. */
+ if (hyp_debug)
+ pcb_printf("running out of layers\n");
+ return bottom_layer_id;
+ }
+
+ /* move old bottom layer to internal */
+ grp = pcb_get_grp_new_intern(PCB, -1);
+ pcb_layer_move_to_group(PCB, bottom_layer_id, grp - PCB->LayerGroups.grp);
+
+ /* created layer becomes new bottom layer */
+ bottom_layer_id = layer_id;
+ return bottom_layer_id;
+ }
+
+ return bottom_layer_id;
+}
+
+/*
+ * convert hyperlynx layer name to pcb layer
+ */
+
+pcb_layer_t *hyp_get_layer(parse_param * h)
+{
+ return pcb_get_layer(hyp_create_layer(h->layer_name));
+}
+
+/*
+ * True if solder side
+ */
+
+pcb_bool_t hyp_is_bottom_layer(char *layer_name)
+{
+ return ((layer_name != NULL) && (pcb_layer_flags(pcb_layer_by_name(layer_name)) & PCB_LYT_BOTTOM));
+}
+
+/*
+ * return PCB_FLAG_ONSOLDER if layer_name is name of bottom layer
+ */
+
+unsigned int hyp_layer_flag(char *layer_name)
+{
+ if ((layer_name != NULL) && (pcb_layer_flags(pcb_layer_by_name(layer_name)) & PCB_LYT_BOTTOM))
+ return PCB_FLAG_ONSOLDER;
+ else
+ return PCB_FLAG_NO;
+}
+
+/*
+ * create all polygons
+ */
+
+void hyp_create_polygons()
+{
+ hyp_polygon_t *i;
+
+ /* loop over all created polygons and close them */
+ for (i = polygon_head; i != NULL; i = i->next)
+ if ((i->is_polygon) && (i->polygon != NULL) && (i->layer != NULL)) {
+ pcb_add_polygon_on_layer(i->layer, i->polygon);
+ pcb_poly_init_clip(hyp_dest, i->layer, i->polygon);
+ }
+ return;
+}
+
+/*
+ * calculate hyperlynx-style clearance
+ *
+ * use plane_separation of, in order:
+ * - this copper
+ * - the net this copper belongs to
+ * - the layer this copper is on
+ * - the board
+ * if neither copper, net, layer nor board have plane_separation set, do not set clearance.
+ */
+
+pcb_coord_t hyp_clearance(parse_param * h)
+{
+ pcb_coord_t clearance;
+ pcb_layer_id_t layr_id;
+
+ if (h->layer_name_set)
+ layr_id = hyp_create_layer(h->layer_name);
+ clearance = -1;
+
+ if (h->plane_separation_set)
+ clearance = xy2coord(h->plane_separation);
+ else if (net_clearance >= 0)
+ clearance = net_clearance;
+ else if (h->layer_name_set && (layer_clearance[layr_id] >= 0))
+ clearance = layer_clearance[layr_id];
+ else if (board_clearance >= 0)
+ clearance = board_clearance;
+ else
+ clearance = 0;
+
+ return clearance;
+}
+
+/*
+ * Draw arc from (x1, y1) to (x2, y2) with center (xc, yc) and radius r.
+ * Direction of arc is clockwise or counter-clockwise, depending upon value of pcb_bool_t Clockwise.
+ */
+
+pcb_arc_t *hyp_arc_new(pcb_layer_t * Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t XC,
+ pcb_coord_t YC, pcb_coord_t Width, pcb_coord_t Height, pcb_bool_t Clockwise, pcb_coord_t Thickness,
+ pcb_coord_t Clearance, pcb_flag_t Flags)
+{
+ pcb_angle_t start_angle;
+ pcb_angle_t end_angle;
+ pcb_angle_t delta;
+ pcb_arc_t *new_arc;
+
+ if (Width < 1) {
+ start_angle = 0.0;
+ end_angle = 360.0;
+ }
+ else {
+ /* note: y-axis points down */
+ start_angle = 180 + 180 * atan2(YC - Y1, X1 - XC) / M_PI;
+ end_angle = 180 + 180 * atan2(YC - Y2, X2 - XC) / M_PI;
+ }
+ start_angle = pcb_normalize_angle(start_angle);
+ end_angle = pcb_normalize_angle(end_angle);
+
+ if (Clockwise)
+ while (start_angle < end_angle)
+ start_angle += 360;
+ else
+ while (end_angle <= start_angle)
+ end_angle += 360;
+
+ delta = end_angle - start_angle;
+
+#undef XXX
+#ifdef XXX
+ if (hyp_debug)
+ pcb_printf("hyp_arc: start_angle: %f end_angle: %f delta: %f\n", start_angle, end_angle, delta);
+#endif
+
+ new_arc = pcb_arc_new(Layer, XC, YC, Width, Height, start_angle, delta, Thickness, Clearance, Flags);
+
+#ifdef XXX
+ /* XXX remove debugging code */
+ if (hyp_debug) {
+ pcb_coord_t x1, y1, x2, y2;
+ pcb_arc_get_end(new_arc, 1, &x1, &y1);
+ pcb_arc_get_end(new_arc, 0, &x2, &y2);
+ pcb_printf("hyp_arc: start_point: (%ml, %ml) end_point: (%ml, %ml)\n", x1, y1, x2, y2);
+ }
+#endif
+
+ return new_arc;
+}
+
+/*
+ * Draw an arc from (x1, y1) to (x2, y2) with center (xc, yc) and radius r using a polygonal approximation.
+ * Arc may be clockwise or counterclockwise. Note pcb-rnd y-axis points downward.
+ */
+
+void hyp_arc2poly(pcb_coord_t x1, pcb_coord_t y1, pcb_coord_t x2, pcb_coord_t y2, pcb_coord_t xc, pcb_coord_t yc,
+ pcb_coord_t r, pcb_bool_t clockwise)
+{
+ pcb_coord_t arc_precision = PCB_MM_TO_COORD(0.254); /* mm */
+ int min_circle_segments = 8; /* 8 seems minimal, 16 seems more than sufficient. */
+ int segments;
+ int poly_points = 0;
+ int i;
+
+ double alpha = atan2(y1 - yc, x1 - xc);
+ double beta = atan2(y2 - yc, x2 - xc);
+
+ if (clockwise) {
+ /* draw arc clockwise from (x1,y1) to (x2,y2) */
+ if (beta < alpha)
+ beta = beta + 2 * M_PI;
+ }
+ else {
+ /* draw arc counterclockwise from (x1,y1) to (x2,y2) */
+ if (alpha < beta)
+ alpha = alpha + 2 * M_PI;
+ /* draw a circle if starting and end points are the same */
+ if ((x1 == x2) && (y1 == y2))
+ beta = alpha + 2 * M_PI;
+ }
+
+ /* Calculate number of segments needed for a full circle. */
+ segments = min_circle_segments;
+ if (arc_precision > 0) {
+ /* Increase number of segments until difference between circular arc and polygonal approximation is less than max_arc_error */
+ double arc_error;
+ do {
+ arc_error = r * (1 - cos(M_PI / segments));
+ if (arc_error > arc_precision)
+ segments += 4;
+ }
+ while (arc_error > arc_precision);
+ }
+ else if (arc_precision < 0)
+ pcb_printf("error: negative arc precision\n");
+
+ /* A full circle is drawn using 'segments' segments; a 90 degree arc using segments/4. */
+ poly_points = pcb_round(segments * abs(beta - alpha) / (2 * M_PI));
+
+ /* Sanity checks */
+ if (poly_points < 1)
+ poly_points = 1;
+
+ /* first point */
+ pcb_poly_point_new(current_polygon, x1, y1);
+
+ /* intermediate points */
+ for (i = 1; i < poly_points; i++) {
+ double angle = alpha + (beta - alpha) * i / poly_points;
+ pcb_coord_t x = xc + r * cos(angle);
+ pcb_coord_t y = yc + r * sin(angle);
+ pcb_poly_point_new(current_polygon, x, y);
+ }
+
+ /* last point */
+ pcb_poly_point_new(current_polygon, x2, y2);
+
+ return;
+}
+
+
+/* exec_* routines are called by parser to interpret hyperlynx file */
+
+/*
+ * 'BOARD_FILE' record.
+ */
+
+pcb_bool exec_board_file(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("board:\n");
+
+ return 0;
+}
+
+/*
+ * 'VERSION' record.
+ * Specifies version number.
+ */
+
+pcb_bool exec_version(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("version: vers = %f\n", h->vers);
+
+ if (h->vers < 1.0)
+ pcb_message(PCB_MSG_DEBUG, "warning: version 1.x deprecated\n");
+
+ return 0;
+}
+
+/*
+ * 'DATA_MODE' record.
+ * If DATA_MODE is DETAILED, model can be used for power and signal simulation.
+ * If DATA_MODE is SIMPLIFIED, model can be used for signal simulation only.
+ */
+
+pcb_bool exec_data_mode(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("data_mode: detailed = %i\n", h->detailed);
+
+ return 0;
+}
+
+/*
+ * 'UNITS' record.
+ * Specifies measurement system (english/metric) for the rest of the file.
+ */
+
+pcb_bool exec_units(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("units: unit_system_english = %d metal_thickness_weight = %d\n", h->unit_system_english,
+ h->metal_thickness_weight);
+
+ /* convert everything to meter */
+
+ if (h->unit_system_english) {
+ unit = inches; /* lengths in inches. 1 in = 2.54 cm = 0.0254 m */
+ if (h->metal_thickness_weight)
+ metal_thickness_unit = copper_imperial_weight * unit; /* metal thickness in ounces/ft2. 1 oz/ft2 copper = 1.341 mil */
+ else
+ metal_thickness_unit = unit; /* metal thickness in inches */
+ }
+ else {
+ unit = 0.01; /* lengths in centimeters. 1 cm = 0.01 m */
+ if (h->metal_thickness_weight)
+ metal_thickness_unit = copper_metric_weight * unit; /* metal thickness in grams/cm2. 1 gr/cm2 copper = 0.1116 cm */
+ else
+ metal_thickness_unit = unit; /* metal thickness in centimeters */
+ }
+
+ if (hyp_debug)
+ pcb_printf("units: unit = %f metal_thickness_unit = %f\n", unit, metal_thickness_unit);
+
+ return 0;
+}
+
+/*
+ * 'PLANE_SEP' record.
+ * Defines default trace to plane clearance.
+ */
+
+pcb_bool exec_plane_sep(parse_param * h)
+{
+ board_clearance = xy2coord(h->default_plane_separation);
+
+ if (hyp_debug)
+ pcb_printf("plane_sep: default_plane_separation = %ml\n", board_clearance);
+
+ return 0;
+}
+
+/*
+ * 'PERIMETER_SEGMENT' subrecord of 'BOARD' record.
+ * Draws linear board outline segment from (x1, y1) to (x2, y2).
+ */
+
+pcb_bool exec_perimeter_segment(parse_param * h)
+{
+ outline_t *peri_seg;
+
+ peri_seg = malloc(sizeof(outline_t));
+
+ /* convert coordinates */
+ peri_seg->x1 = xy2coord(h->x1);
+ peri_seg->y1 = xy2coord(h->y1);
+ peri_seg->x2 = xy2coord(h->x2);
+ peri_seg->y2 = xy2coord(h->y2);
+ peri_seg->xc = 0;
+ peri_seg->yc = 0;
+ peri_seg->r = 0;
+ peri_seg->is_arc = pcb_false;
+ peri_seg->used = pcb_false;
+ peri_seg->next = NULL;
+
+ if (hyp_debug)
+ pcb_printf("perimeter_segment: x1 = %ml y1 = %ml x2 = %ml y2 = %ml\n", peri_seg->x1, peri_seg->y1, peri_seg->x2,
+ peri_seg->y2);
+
+ /* append at end of doubly linked list */
+ if (outline_tail == NULL) {
+ outline_head = peri_seg;
+ outline_tail = peri_seg;
+ }
+ else {
+ outline_tail->next = peri_seg;
+ outline_tail = peri_seg;
+ }
+
+ /* set origin so all coordinates are positive */
+ hyp_set_origin();
+
+ /* resize board if too small to draw outline */
+ hyp_resize_board();
+
+ return 0;
+}
+
+/*
+ * 'PERIMETER_ARC' subrecord of 'BOARD' record.
+ * Draws arc segment of board outline.
+ * Arc drawn counterclockwise from (x1, y1) to (x2, y2) with center (xc, yc) and radius r.
+ */
+
+pcb_bool exec_perimeter_arc(parse_param * h)
+{
+ outline_t *peri_arc;
+
+ peri_arc = malloc(sizeof(outline_t));
+
+ peri_arc->x1 = xy2coord(h->x1);
+ peri_arc->y1 = xy2coord(h->y1);
+ peri_arc->x2 = xy2coord(h->x2);
+ peri_arc->y2 = xy2coord(h->y2);
+ peri_arc->xc = xy2coord(h->xc);
+ peri_arc->yc = xy2coord(h->yc);
+ peri_arc->r = xy2coord(h->r);
+ peri_arc->is_arc = pcb_true;
+ peri_arc->used = pcb_false;
+ peri_arc->next = NULL;
+
+ if (hyp_debug)
+ pcb_printf("perimeter_arc: x1 = %ml y1 = %ml x2 = %ml y2 = %ml xc = %ml yc = %ml r = %ml\n", peri_arc->x1, peri_arc->y1,
+ peri_arc->x2, peri_arc->y2, peri_arc->xc, peri_arc->yc, peri_arc->r);
+
+ /* append at end of doubly linked list */
+ if (outline_tail == NULL) {
+ outline_head = peri_arc;
+ outline_tail = peri_arc;
+ }
+ else {
+ outline_tail->next = peri_arc;
+ outline_tail = peri_arc;
+ }
+
+ /* set origin so all coordinates are positive */
+ hyp_set_origin();
+
+ return 0;
+}
+
+/*
+ * 'A' attribute subrecord of 'BOARD' record.
+ * Defines board attributes as name/value pairs.
+ */
+
+pcb_bool exec_board_attribute(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("board_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value);
+
+ return 0;
+}
+
+/*
+ * STACKUP section
+ */
+
+/*
+ * Debug output for layers
+ */
+
+void hyp_debug_layer(parse_param * h)
+{
+ if (hyp_debug) {
+ if (h->thickness_set)
+ pcb_printf(" thickness = %ml", z2coord(h->thickness));
+ if (h->plating_thickness_set)
+ pcb_printf(" plating_thickness = %ml", z2coord(h->plating_thickness));
+ if (h->bulk_resistivity_set)
+ pcb_printf(" bulk_resistivity = %f", h->bulk_resistivity);
+ if (h->temperature_coefficient_set)
+ pcb_printf(" temperature_coefficient = %f", h->temperature_coefficient);
+ if (h->epsilon_r_set)
+ pcb_printf(" epsilon_r = %f", h->epsilon_r);
+ if (h->loss_tangent_set)
+ pcb_printf(" loss_tangent = %f", h->loss_tangent);
+ if (h->conformal_set)
+ pcb_printf(" conformal = %i", h->conformal);
+ if (h->prepreg_set)
+ pcb_printf(" prepreg = %i", h->prepreg);
+ if (h->layer_name_set)
+ pcb_printf(" layer_name = \"%s\"", h->layer_name);
+ if (h->material_name_set)
+ pcb_printf(" material_name = \"%s\"", h->material_name);
+ if (h->plane_separation_set)
+ pcb_printf(" plane_separation = %ml", xy2coord(h->plane_separation));
+ pcb_printf("\n");
+ }
+
+ return;
+}
+
+/*
+ * 'OPTIONS' subrecord of 'STACKUP' record.
+ * Defines dielectric constant and loss tangent of metal layers.
+ */
+
+pcb_bool exec_options(parse_param * h)
+{
+ /* Use dielectric for metal? */
+ if (hyp_debug)
+ pcb_printf("options: use_die_for_metal = %f\n", h->use_die_for_metal);
+ if (h->use_die_for_metal)
+ use_die_for_metal = pcb_true;
+ return 0;
+}
+
+/*
+ * SIGNAL subrecord of STACKUP record.
+ * signal layer.
+ */
+
+pcb_bool exec_signal(parse_param * h)
+{
+ pcb_layer_id_t signal_layer_id;
+ signal_layer_id = hyp_create_layer(h->layer_name);
+
+ layer_is_plane[signal_layer_id] = pcb_false;
+ if (h->plane_separation_set)
+ layer_clearance[signal_layer_id] = xy2coord(h->plane_separation);
+
+ if (hyp_debug)
+ pcb_printf("signal layer: \"%s\"", pcb_layer_name(signal_layer_id));
+ hyp_debug_layer(h);
+
+ return 0;
+}
+
+/*
+ * DIELECTRIC subrecord of STACKUP record.
+ * dielectric layer
+ */
+
+pcb_bool exec_dielectric(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("dielectric layer: ");
+ hyp_debug_layer(h);
+
+ return 0;
+}
+
+/*
+ * PLANE subrecord of STACKUP record.
+ * plane layer - a layer which is flooded with copper.
+ */
+
+pcb_bool exec_plane(parse_param * h)
+{
+ pcb_layer_id_t plane_layer_id;
+ plane_layer_id = hyp_create_layer(h->layer_name);
+
+ layer_is_plane[plane_layer_id] = pcb_true;
+ if (h->plane_separation_set)
+ layer_clearance[plane_layer_id] = xy2coord(h->plane_separation);
+
+ /* XXX need to flood layer with copper */
+
+ if (hyp_debug)
+ pcb_printf("plane layer: \"%s\"", pcb_layer_name(plane_layer_id));
+ hyp_debug_layer(h);
+
+ return 0;
+}
+
+/*
+ * DEVICE record.
+ */
+
+pcb_bool exec_devices(parse_param * h)
+{
+ device_t *new_device;
+ char value[128];
+
+ if (hyp_debug) {
+ pcb_printf("device: device_type = \"%s\" ref = \"%s\"", h->device_type, h->ref);
+ if (h->name_set)
+ pcb_printf(" name = \"%s\"", h->name);
+ if (h->value_float_set)
+ pcb_printf(" value_float = %f", h->value_float);
+ if (h->value_string_set)
+ pcb_printf(" value_string = \"%s\"", h->value_string);
+ if (h->layer_name_set)
+ pcb_printf(" layer_name = \"%s\"", h->layer_name);
+ if (h->package_set)
+ pcb_printf(" package = \"%s\"", h->package);
+ pcb_printf("\n");
+ }
+
+ /* add device to list */
+ new_device = malloc(sizeof(device_t));
+
+ new_device->ref = pcb_strdup(h->ref);
+
+ new_device->name = NULL;
+ if (h->name_set)
+ new_device->name = pcb_strdup(h->name);
+
+
+ new_device->value = NULL;
+ if (h->value_string_set)
+ new_device->value = pcb_strdup(h->value_string);
+ else if (h->value_float_set) {
+ /* convert double to string */
+ pcb_snprintf(value, sizeof(value), "%f", h->value_float);
+ new_device->value = pcb_strdup(value);
+ }
+
+ new_device->layer_name = NULL;
+ if (h->layer_name_set)
+ new_device->layer_name = pcb_strdup(h->layer_name);
+
+ new_device->next = device_head;
+ device_head = new_device;
+
+ return 0;
+}
+
+/*
+ * SUPPLY record.
+ * marks nets as power supply.
+ */
+
+pcb_bool exec_supplies(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("supplies: name = \"%s\" value_float = %f voltage_specified = %i conversion = %i\n", h->name, h->value_float,
+ h->voltage_specified, h->conversion);
+
+ return 0;
+}
+
+/*
+ * PADSTACK record
+ */
+
+pcb_bool exec_padstack_element(parse_param * h)
+{
+ /*
+ * Layer names with special meaning, used in padstack definition:
+ * MDEF: defines copper pad on all metal layers
+ * ADEF: defines anti-pad (clearance) on all power planes.
+ */
+
+ if (hyp_debug) {
+ pcb_printf("padstack_element:");
+ if (h->padstack_name_set)
+ pcb_printf(" padstack_name = \"%s\"", h->padstack_name);
+ if (h->drill_size_set)
+ pcb_printf(" drill_size = %ml", xy2coord(h->drill_size));
+ pcb_printf(" layer_name = \"%s\"", h->layer_name);
+ pcb_printf(" pad_shape = %f", h->pad_shape);
+ if (h->pad_shape == 0)
+ pcb_printf(" oval");
+ else if (h->pad_shape == 1)
+ pcb_printf(" rectangular");
+ else if (h->pad_shape == 2)
+ pcb_printf(" oblong");
+ else
+ pcb_printf(" ?");
+ pcb_printf(" pad_sx = %ml", xy2coord(h->pad_sx));
+ pcb_printf(" pad_sy = %ml", xy2coord(h->pad_sy));
+ pcb_printf(" pad_angle = %f", h->pad_angle);
+ if (h->pad_type_set & (h->pad_type == PAD_TYPE_THERMAL_RELIEF)) {
+ pcb_printf(" thermal_clear_shape = %f", h->thermal_clear_shape);
+ if (h->thermal_clear_shape == 0)
+ pcb_printf(" oval");
+ else if (h->thermal_clear_shape == 1)
+ pcb_printf(" rectangular");
+ else if (h->thermal_clear_shape == 2)
+ pcb_printf(" oblong");
+ else
+ pcb_printf(" ?");
+ pcb_printf(" pad_sx = %ml", xy2coord(h->pad_sx));
+ pcb_printf(" pad_sy = %ml", xy2coord(h->pad_sy));
+ pcb_printf(" thermal_clear_sx = %ml", xy2coord(h->thermal_clear_sx));
+ pcb_printf(" thermal_clear_sy = %ml", xy2coord(h->thermal_clear_sy));
+ pcb_printf(" thermal_clear_angle = %f", h->thermal_clear_angle);
+ }
+ if (h->pad_type_set) {
+ pcb_printf(" pad_type = ");
+ switch (h->pad_type) {
+ case PAD_TYPE_METAL:
+ pcb_printf("metal");
+ break;
+ case PAD_TYPE_ANTIPAD:
+ pcb_printf("antipad");
+ break;
+ case PAD_TYPE_THERMAL_RELIEF:
+ pcb_printf("thermal_relief");
+ break;
+ default:
+ pcb_printf("error");
+ }
+ }
+ pcb_printf("\n");
+ }
+
+
+ /* XXX fixme. This reduces the padstack to a pcb_via_new call; a very basic approximation of what a padstack is. */
+
+ if (h->padstack_name_set) {
+ current_padstack = malloc(sizeof(padstack_t));
+ if (current_padstack == NULL)
+ return 1;
+ current_padstack->name = pcb_strdup(h->padstack_name);
+
+ if (h->pad_sx < h->pad_sy)
+ current_padstack->thickness = xy2coord(h->pad_sx);
+ else
+ current_padstack->thickness = xy2coord(h->pad_sy);
+
+ current_padstack->clearance = 0;
+ current_padstack->mask = current_padstack->thickness;
+ current_padstack->drill_hole = xy2coord(h->drill_size);
+ if (h->pad_shape == 1)
+ current_padstack->flags = pcb_flag_make(PCB_FLAG_SQUARE); /* rectangular */
+ else if (h->pad_shape == 2)
+ current_padstack->flags = pcb_flag_make(PCB_FLAG_OCTAGON); /* oblong */
+ else
+ current_padstack->flags = pcb_no_flags(); /* round */
+ }
+
+ if ((current_padstack != NULL) && h->pad_type_set & (h->pad_type == PAD_TYPE_THERMAL_RELIEF)) {
+ current_padstack->clearance =
+ (xy2coord(h->thermal_clear_sx) + xy2coord(h->thermal_clear_sy)) * 0.5 - current_padstack->thickness;
+ if (current_padstack->clearance < 0)
+ current_padstack->clearance = 0;
+ }
+
+ return 0;
+}
+
+
+pcb_bool exec_padstack_end(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("padstack_end\n");
+
+ /* add current padstack to list of padstacks */
+ if (current_padstack != NULL) {
+ current_padstack->next = padstack_head;
+ padstack_head = current_padstack;
+ current_padstack = NULL;
+ }
+
+ return 0;
+}
+
+/*
+ * NET record.
+ */
+
+pcb_bool exec_net(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("net: net_name = \"%s\"\n", h->net_name);
+
+ net_name = pcb_strdup(h->net_name);
+ net_clearance = -1;
+
+ return 0;
+}
+
+/*
+ * PS subrecord of NET record. Plane separation.
+ */
+
+pcb_bool exec_net_plane_separation(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("net_plane_separation: plane_separation = %ml\n", xy2coord(h->plane_separation));
+
+ net_clearance = xy2coord(h->plane_separation);
+
+ return 0;
+}
+
+/*
+ * A subrecord of NET record. Attribute.
+ */
+
+pcb_bool exec_net_attribute(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("net_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value);
+
+ return 0;
+}
+
+/*
+ * SEG subrecord of NET record. line segment.
+ */
+
+pcb_bool exec_seg(parse_param * h)
+{
+ if (hyp_debug) {
+ pcb_printf("seg: x1 = %ml y1 = %ml x2 = %ml y2 = %ml ", x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2));
+ pcb_printf(" width = %ml layer_name = \"%s\"", xy2coord(h->width), h->layer_name);
+ if (h->plane_separation_set)
+ pcb_printf(" plane_separation = %ml ", xy2coord(h->plane_separation));
+ if (h->left_plane_separation_set)
+ pcb_printf(" left_plane_separation = %ml ", xy2coord(h->left_plane_separation));
+ pcb_printf("\n");
+ }
+
+ pcb_line_new(hyp_get_layer(h), x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2), xy2coord(h->width),
+ hyp_clearance(h), pcb_no_flags());
+
+ return 0;
+}
+
+/*
+ * ARC subrecord of NET record. arc segment, drawn clockwise.
+ */
+
+pcb_bool exec_arc(parse_param * h)
+{
+
+ if (hyp_debug) {
+ pcb_printf("arc: x1 = %ml y1 = %ml x2 = %ml y2 = %ml", x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2));
+ pcb_printf(" xc = %ml yc = %ml r = %ml", x2coord(h->xc), y2coord(h->yc), xy2coord(h->r));
+ pcb_printf(" width = %ml layer_name = \"%s\"", xy2coord(h->width), h->layer_name);
+ if (h->plane_separation_set)
+ pcb_printf(" plane_separation = %ml", xy2coord(h->plane_separation));
+ if (h->left_plane_separation_set)
+ pcb_printf(" left_plane_separation = %ml", xy2coord(h->left_plane_separation));
+ pcb_printf("\n");
+ }
+
+ hyp_arc_new(hyp_get_layer(h), x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2), x2coord(h->xc),
+ y2coord(h->yc), xy2coord(h->r), xy2coord(h->r), pcb_true, xy2coord(h->width), hyp_clearance(h), pcb_no_flags());
+
+ return 0;
+}
+
+/*
+ * VIA subrecord of NET record.
+ * Draws via using padstack definition.
+ */
+
+pcb_bool exec_via(parse_param * h)
+{
+ padstack_t *padstack;
+
+ /* detect old-style v1.0 via */
+ if (!h->padstack_name_set)
+ return exec_via_v1(h);
+
+ if (hyp_debug) {
+ pcb_printf("via: x = %ml y = %ml", x2coord(h->x), y2coord(h->y));
+ if (h->padstack_name_set)
+ pcb_printf(" padstack_name = \"%s\"", h->padstack_name);
+ pcb_printf("\n");
+ }
+
+ padstack = hyp_padstack_by_name(h->padstack_name);
+ if (padstack == NULL) {
+ pcb_printf("via: padstack \"%s\" not found. skipping.\n", h->padstack_name);
+ return 0;
+ }
+
+ /* XXX buried and blind vias not implemented yet */
+
+ pcb_via_new(hyp_dest, x2coord(h->x), y2coord(h->y), padstack->thickness, padstack->clearance, padstack->mask,
+ padstack->drill_hole, NULL, padstack->flags);
+
+ return 0;
+}
+
+/*
+ * VIA subrecord of NET record.
+ * Draws deprecated v1.x via. Does not use padstack.
+ */
+
+pcb_bool exec_via_v1(parse_param * h)
+{
+ pcb_coord_t thickness;
+ pcb_coord_t clearance;
+ pcb_coord_t mask;
+ pcb_coord_t drill_hole = 0;
+ char *shape = NULL;
+ pcb_flag_t flags;
+
+ if (hyp_debug) {
+ pcb_printf("old_via: x = %ml y = %ml", x2coord(h->x), y2coord(h->y));
+ if (h->drill_size_set)
+ pcb_printf(" drill_size = %ml", xy2coord(h->drill_size));
+ if (h->layer1_name_set)
+ pcb_printf(" layer1_name = \"%s\"", h->layer1_name);
+ if (h->layer2_name_set)
+ pcb_printf(" layer2_name = \"%s\"", h->layer2_name);
+ if (h->via_pad_shape_set)
+ pcb_printf(" via_pad_shape = \"%s\"", h->via_pad_shape);
+ if (h->via_pad_sx_set)
+ pcb_printf(" via_pad_sx = \"%ml\"", xy2coord(h->via_pad_sx));
+ if (h->via_pad_sy_set)
+ pcb_printf(" via_pad_sy = \"%ml\"", xy2coord(h->via_pad_sy));
+ if (h->via_pad_angle_set)
+ pcb_printf(" via_pad_angle = \"%f\"", h->via_pad_angle);
+ if (h->via_pad1_shape_set)
+ pcb_printf(" via_pad1_shape = \"%s\"", h->via_pad1_shape);
+ if (h->via_pad1_sx_set)
+ pcb_printf(" via_pad1_sx = \"%ml\"", xy2coord(h->via_pad1_sx));
+ if (h->via_pad1_sy_set)
+ pcb_printf(" via_pad1_sy = \"%ml\"", xy2coord(h->via_pad1_sy));
+ if (h->via_pad1_angle_set)
+ pcb_printf(" via_pad1_angle = \"%f\"", h->via_pad1_angle);
+ if (h->via_pad2_shape_set)
+ pcb_printf(" via_pad2_shape = \"%s\"", h->via_pad2_shape);
+ if (h->via_pad2_sx_set)
+ pcb_printf(" via_pad2_sx = \"%ml\"", xy2coord(h->via_pad2_sx));
+ if (h->via_pad2_sy_set)
+ pcb_printf(" via_pad1_sy = \"%ml\"", xy2coord(h->via_pad2_sy));
+ if (h->via_pad2_angle_set)
+ pcb_printf(" via_pad2_angle = \"%f\"", h->via_pad2_angle);
+ pcb_printf("\n");
+ }
+
+ if (h->via_pad_sx_set && h->via_pad_sy_set)
+ mask = thickness = (xy2coord(h->via_pad_sx) + xy2coord(h->via_pad_sy)) * 0.5;
+ else if (h->via_pad1_sx_set && h->via_pad1_sy_set)
+ mask = thickness = (xy2coord(h->via_pad1_sx) + xy2coord(h->via_pad1_sy)) * 0.5;
+ else if (h->via_pad2_sx_set && h->via_pad2_sy_set)
+ mask = thickness = (xy2coord(h->via_pad2_sx) + xy2coord(h->via_pad2_sy)) * 0.5;
+ else
+ mask = thickness = 0;
+
+ clearance = 2 * hyp_clearance(h);
+
+ if (h->drill_size_set)
+ drill_hole = xy2coord(h->drill_size);
+ else
+ drill_hole = 0;
+
+ if (h->via_pad_shape_set)
+ shape = h->via_pad_shape;
+ else if (h->via_pad1_shape_set)
+ shape = h->via_pad1_shape;
+ else if (h->via_pad2_shape_set)
+ shape = h->via_pad2_shape;
+ else
+ shape = NULL;
+
+ if ((shape != NULL) && (strcmp(shape, "RECT") == 0))
+ flags = pcb_flag_make(PCB_FLAG_SQUARE); /* rectangular */
+ else if ((shape != NULL) && (strcmp(shape, "OBLONG") == 0))
+ flags = pcb_flag_make(PCB_FLAG_OCTAGON); /* oblong */
+ else
+ flags = pcb_no_flags(); /* round */
+
+ /* XXX buried and blind vias not implemented yet */
+
+ pcb_via_new(hyp_dest, x2coord(h->x), y2coord(h->y), thickness, clearance, mask, drill_hole, NULL, flags);
+
+ return 0;
+}
+
+/*
+ * PIN subrecord of NET record.
+ * Draws PIN using padstack definiton.
+ */
+
+pcb_bool exec_pin(parse_param * h)
+{
+ pcb_element_t *device;
+ padstack_t *padstack;
+ char *device_name = NULL;
+ char *pin_name = NULL;
+ char *dot = NULL;
+ char *pin_net_name = NULL;
+
+ if (hyp_debug) {
+ pcb_printf("pin: x = %ml y = %ml", x2coord(h->x), y2coord(h->y));
+ pcb_printf(" pin_reference = \"%s\"", h->pin_reference);
+ if (h->padstack_name_set)
+ pcb_printf(" padstack_name = \"%s\"", h->padstack_name);
+ if (h->pin_function_set)
+ pcb_printf(" pin_function = %i", h->pin_function);
+ pcb_printf("\n");
+ }
+
+ if (!h->padstack_name_set) {
+ if (hyp_debug)
+ pcb_printf("pin: padstack not set. skipping pin \"%s\"\n", h->pin_reference);
+ return 0;
+ }
+
+ if (net_name != NULL)
+ pin_net_name = pcb_strdup(net_name);
+ else
+ pin_net_name = pcb_strdup("?");
+
+ /* h->pin_reference has format 'device_name.pin_name' */
+ device_name = pcb_strdup(h->pin_reference);
+ pin_name = pcb_strdup("?");
+ dot = strrchr(device_name, '.');
+ if (dot != NULL) {
+ *dot = '\0';
+ pin_name = pcb_strdup(dot + 1);
+ }
+
+ if (hyp_debug)
+ pcb_printf("pin: device_name = \"%s\" pin_name = \"%s\"\n", device_name, pin_name);
+
+ /* find device by name */
+ device = hyp_create_element_by_name(device_name, x2coord(h->x), y2coord(h->y));
+
+ if (device == NULL) {
+ pcb_printf("pin: device \"%s\" not found. skipping pin \"%s\"\n", device_name, h->pin_reference);
+ return 0;
+ }
+
+ /* find padstack */
+ padstack = hyp_padstack_by_name(h->padstack_name);
+ if (padstack == NULL) {
+ pcb_printf("pin: padstack \"%s\" not found. skipping pin \"%s\"\n", h->padstack_name, h->pin_reference);
+ return 0;
+ }
+
+ /* what if padstack = single layer & no drill ? SMD XXX */
+
+ /* add new pin */
+ pcb_element_pin_new(device, x2coord(h->x), y2coord(h->y), padstack->thickness, padstack->clearance, padstack->mask,
+ padstack->drill_hole, pin_net_name, pin_name, padstack->flags);
+
+ /* update */
+ pcb_element_bbox(hyp_dest, device, pcb_font(PCB, 0, 1));
+
+ return 0;
+}
+
+/*
+ * PAD subrecord of NET record.
+ * Draws deprecated v1.x pad.
+ */
+
+pcb_bool exec_pad(parse_param * h)
+{
+ pcb_coord_t x1, y1, x2, y2;
+ pcb_coord_t thickness;
+ pcb_coord_t clearance;
+ pcb_coord_t mask;
+ pcb_element_t *device;
+ pcb_flag_t flags;
+
+ if (hyp_debug) {
+ pcb_printf("pad: x = %ml y = %ml", x2coord(h->x), y2coord(h->y));
+ if (h->layer_name_set)
+ pcb_printf(" layer_name = \"%s\"", h->layer_name);
+ if (h->via_pad_shape_set)
+ pcb_printf(" via_pad_shape = \"%s\"", h->via_pad_shape);
+ if (h->via_pad_sx_set)
+ pcb_printf(" via_pad_sx = \"%ml\"", xy2coord(h->via_pad_sx));
+ if (h->via_pad_sy_set)
+ pcb_printf(" via_pad_sy = \"%ml\"", xy2coord(h->via_pad_sy));
+ if (h->via_pad_angle_set)
+ pcb_printf(" via_pad_angle = \"%f\"", h->via_pad_angle);
+ pcb_printf("\n");
+ }
+
+ /* if necessary, create an element to connect the pad to */
+ if (h->layer_name_set && hyp_is_bottom_layer(h->layer_name)) {
+ solder_side_pads =
+ pcb_element_new(hyp_dest, NULL, pcb_font(PCB, 0, 1), pcb_flag_make(PCB_FLAG_ONSOLDER), NULL, NULL, NULL, 0, 0, 0, 500,
+ pcb_flag_make(PCB_FLAG_ONSOLDER), pcb_false);
+ device = solder_side_pads;
+ }
+ else {
+ component_side_pads =
+ pcb_element_new(hyp_dest, NULL, pcb_font(PCB, 0, 1), pcb_no_flags(), NULL, NULL, NULL, 0, 0, 0, 500, pcb_no_flags(),
+ pcb_false);
+ device = component_side_pads;
+ }
+
+ if (device == NULL) {
+ pcb_printf("pad: can't create device. skipping pad.\n");
+ return 0;
+ }
+
+ /* pad shape */
+ flags = pcb_no_flags(); /* round */
+
+ if (h->via_pad_shape_set && (h->via_pad_shape != NULL) && (strcmp(h->via_pad_shape, "RECT") == 0))
+ flags = pcb_flag_add(flags, PCB_FLAG_SQUARE);
+
+ if (h->layer_name_set)
+ flags = pcb_flag_add(flags, hyp_layer_flag(h->layer_name));
+
+ if (h->via_pad_sx_set && h->via_pad_sy_set)
+ mask = thickness = (xy2coord(h->via_pad_sx) + xy2coord(h->via_pad_sy)) * 0.5;
+
+ clearance = 2 * hyp_clearance(h); /* XXX hyp_layer_clearance */
+
+ /* create */
+ x1 = x2coord(h->x);
+ y1 = y2coord(h->y);
+
+ x2 = x1;
+ y2 = y1;
+ thickness = 0;
+
+ if (h->via_pad_sx_set && h->via_pad_sy_set) {
+ if (h->via_pad_sy > h->via_pad_sx) {
+ thickness = xy2coord(h->via_pad_sx);
+ x2 = x2coord(h->x);
+ y2 = y2coord(h->y) + xy2coord(h->via_pad_sy) - xy2coord(h->via_pad_sx);
+ }
+ else if (h->via_pad_sx > h->via_pad_sy) {
+ thickness = xy2coord(h->via_pad_sy);
+ x2 = x2coord(h->x) + xy2coord(h->via_pad_sx) - xy2coord(h->via_pad_sy);
+ y2 = y2coord(h->y);
+ }
+ else {
+ thickness = xy2coord(h->via_pad_sx);
+ x2 = x2coord(h->x);
+ y2 = y2coord(h->y);
+ }
+ }
+
+ /* XXX ought to rotate pad along h->via_pad_angle, if h->via_pad_angle_set */
+
+ mask = thickness;
+
+ pcb_element_pad_new(device, x1, y1, x2, y2, thickness, clearance, mask, net_name, NULL, flags);
+
+ /* update */
+ pcb_element_bbox(hyp_dest, device, pcb_font(PCB, 0, 1));
+
+ return 0;
+}
+
+/*
+ * USEG subrecord of NET record.
+ * unrouted segment.
+ */
+
+pcb_bool exec_useg(parse_param * h)
+{
+ pcb_layergrp_id_t layer1_grp_id, layer2_grp_id;
+
+ if (hyp_debug) {
+ pcb_printf("useg: x1 = %ml y1 = %ml layer1_name = \"%s\"", x2coord(h->x1), y2coord(h->y1), h->layer1_name);
+ pcb_printf(" x2 = %ml y2 = %ml layer2_name = \"%s\"", x2coord(h->x2), y2coord(h->y2), h->layer2_name);
+ if (h->zlayer_name_set)
+ pcb_printf(" zlayer_name = \"%s\" width = %ml length = %ml", h->zlayer_name, xy2coord(h->width), xy2coord(h->length));
+ if (h->impedance_set)
+ pcb_printf(" impedance = %f delay = %f ", h->impedance, h->delay);
+ if (h->resistance_set)
+ pcb_printf(" resistance = %f ", h->resistance);
+ pcb_printf("\n");
+ }
+
+ /* XXX fixme. I want to put an unrouted segment between two layers, not two layer groups. */
+ /* lookup layer group begin and end layer are on */
+ layer1_grp_id = pcb_layer_get_group(PCB, hyp_create_layer(h->layer1_name));
+ layer2_grp_id = pcb_layer_get_group(PCB, hyp_create_layer(h->layer2_name));
+
+ if ((layer1_grp_id == -1) || (layer2_grp_id == -1)) {
+ if (hyp_debug)
+ pcb_printf("useg: skipping unrouted segment\n");
+ return 0;
+ }
+
+ pcb_rat_new(hyp_dest, x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2), layer1_grp_id, layer2_grp_id,
+ xy2coord(h->width), pcb_no_flags());
+
+ return 0;
+}
+
+/*
+ * POLYGON subrecord of NET record.
+ * draws copper polygon.
+ */
+
+/* XXX still need to implement different types (POUR, COPPER, PLANE) */
+
+pcb_bool exec_polygon_begin(parse_param * h)
+{
+ pcb_layer_t *current_layer;
+ hyp_polygon_t *new_poly;
+ pcb_flag_t flags;
+
+ if (hyp_debug) {
+ pcb_printf("polygon begin:");
+ if (h->layer_name_set)
+ pcb_printf(" layer_name = \"%s\"", h->layer_name);
+ if (h->width_set)
+ pcb_printf(" width = %ml", xy2coord(h->width));
+ if (h->polygon_type_set) {
+ pcb_printf(" polygon_type = ", h->polygon_type, " ");
+ switch (h->polygon_type) {
+ case POLYGON_TYPE_PLANE:
+ pcb_printf("POLYGON_TYPE_PLANE");
+ break;
+ case POLYGON_TYPE_POUR:
+ pcb_printf("POLYGON_TYPE_POUR");
+ break;
+ case POLYGON_TYPE_COPPER:
+ pcb_printf("POLYGON_TYPE_COPPER");
+ break;
+ default:
+ pcb_printf("Error");
+ break;
+ }
+ }
+ if (h->id_set)
+ pcb_printf(" id = %i", h->id);
+ pcb_printf(" x = %ml y = %ml\n", xy2coord(h->x), xy2coord(h->y));
+ }
+
+ if (!h->layer_name_set) {
+ hyp_error("expected polygon layer L = ");
+ return pcb_true;
+ }
+
+ if (!h->id_set) {
+ hyp_error("expected polygon id ID = ");
+ return pcb_true;
+ }
+
+ /* handle different polygon types: plane, pour, and copper *//* XXX fixme */
+ flags = pcb_no_flags();
+ switch (h->polygon_type) {
+ case POLYGON_TYPE_PLANE:
+ flags = pcb_flag_add(flags, PCB_FLAG_CLEARPOLY);
+ break;
+ case POLYGON_TYPE_POUR:
+ break;
+ case POLYGON_TYPE_COPPER:
+ break;
+ default:
+ break;
+ }
+
+ /* create empty pcb polygon */
+ current_layer = hyp_get_layer(h);
+ current_polygon = pcb_poly_new(current_layer, flags);
+
+ /* add first vertex */
+ if (current_polygon != NULL)
+ pcb_poly_point_new(current_polygon, x2coord(h->x), y2coord(h->y));
+
+ /* bookkeeping */
+ if ((poly_state != HYP_POLYIDLE) && hyp_debug)
+ pcb_printf("polygon: unexpected polygon. continuing.\n");
+ poly_state = HYP_POLYGON;
+
+ new_poly = malloc(sizeof(hyp_polygon_t));
+ new_poly->hyp_poly_id = h->id; /* hyperlynx polygon/polyline id */
+ new_poly->polygon = current_polygon;
+ new_poly->layer = current_layer;
+ new_poly->is_polygon = pcb_true;
+
+ new_poly->next = polygon_head;
+ polygon_head = new_poly;
+
+ return 0;
+}
+
+pcb_bool exec_polygon_end(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("polygon end:\n");
+
+ /* bookkeeping */
+ if ((poly_state != HYP_POLYGON) && hyp_debug)
+ pcb_printf("polygon: unexpected polygon end. continuing.\n");
+ poly_state = HYP_POLYIDLE;
+ current_polygon = NULL;
+
+ return 0;
+}
+
+/*
+ * POLYVOID subrecord of NET record.
+ * same as POLYGON, but instead of creating copper, creates a hole in copper.
+ */
+
+pcb_bool exec_polyvoid_begin(parse_param * h)
+{
+ hyp_polygon_t *i;
+
+ if (hyp_debug) {
+ pcb_printf("polyvoid begin:");
+ if (h->id_set)
+ pcb_printf(" id = %i", h->id);
+ pcb_printf(" x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y));
+ }
+
+ if (!h->id_set) {
+ hyp_error("expected polygon id ID = ");
+ return pcb_true;
+ }
+
+ /* look up polygon with this id */
+ current_polygon = NULL;
+ for (i = polygon_head; i != NULL; i = i->next)
+ if (h->id == i->hyp_poly_id) {
+ if (i->is_polygon) {
+ current_polygon = i->polygon;
+ break;
+ }
+ else
+ pcb_printf("polyvoid: polyvoid hole in polyline not implemented.\n");
+ }
+
+ if (i == NULL) {
+ poly_state = HYP_POLYIDLE;
+ pcb_printf("polyvoid: polygon id %i not found\n", h->id);
+ return 0;
+ }
+
+ if (current_polygon != NULL) {
+ /* create hole in polygon */
+ pcb_poly_hole_new(current_polygon);
+ /* add first vertex of hole */
+ pcb_poly_point_new(current_polygon, x2coord(h->x), y2coord(h->y));
+ }
+
+ /* bookkeeping */
+ if ((poly_state != HYP_POLYIDLE) && hyp_debug)
+ pcb_printf("polyvoid: unexpected polyvoid. continuing.\n");
+ if ((i != NULL) && (i->is_polygon))
+ poly_state = HYP_POLYGON_HOLE;
+ else
+ poly_state = HYP_POLYLINE_HOLE;
+
+ return 0;
+}
+
+pcb_bool exec_polyvoid_end(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("polyvoid end:\n");
+
+ /* bookkeeping */
+ if ((poly_state != HYP_POLYGON_HOLE) && (poly_state != HYP_POLYLINE_HOLE) && hyp_debug)
+ pcb_printf("polyvoid: unexpected polyvoid end. continuing.\n");
+ poly_state = HYP_POLYIDLE;
+
+ return 0;
+}
+
+/*
+ * POLYLINE subrecord of NET record.
+ */
+
+pcb_bool exec_polyline_begin(parse_param * h)
+{
+ hyp_polygon_t *new_poly;
+
+ if (hyp_debug) {
+ pcb_printf("polyline begin:");
+ if (h->layer_name_set)
+ pcb_printf(" layer_name = \"%s\"", h->layer_name);
+ if (h->width_set)
+ pcb_printf(" width = %ml", xy2coord(h->width));
+ if (h->polygon_type_set) {
+ pcb_printf(" polygon_type = ", h->polygon_type, " ");
+ switch (h->polygon_type) {
+ case POLYGON_TYPE_PLANE:
+ pcb_printf("POLYGON_TYPE_PLANE");
+ break;
+ case POLYGON_TYPE_POUR:
+ pcb_printf("POLYGON_TYPE_POUR");
+ break;
+ case POLYGON_TYPE_COPPER:
+ pcb_printf("POLYGON_TYPE_COPPER");
+ break;
+ default:
+ pcb_printf("Error");
+ break;
+ }
+ }
+ if (h->id_set)
+ pcb_printf(" id = %i", h->id);
+ pcb_printf(" x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y));
+ }
+
+ if (!h->layer_name_set) {
+ hyp_error("expected polygon layer L = ");
+ return pcb_true;
+ }
+
+ if (!h->width_set) {
+ hyp_error("expected polygon width W = ");
+ return pcb_true;
+ }
+
+ if (!h->id_set) {
+ hyp_error("expected polygon id ID = ");
+ return pcb_true;
+ }
+
+ /* create polyline */
+ current_polygon = NULL;
+ current_polyline_layer = hyp_get_layer(h);
+ current_polyline_width = xy2coord(h->width);
+ current_polyline_clearance = hyp_clearance(h);
+ current_polyline_xpos = x2coord(h->x);
+ current_polyline_ypos = y2coord(h->y);
+
+ /* bookkeeping */
+ if ((poly_state != HYP_POLYIDLE) && hyp_debug)
+ pcb_printf("polyline: unexpected polyline. continuing.\n");
+ poly_state = HYP_POLYLINE;
+
+ /* we need to store the id of the polyline, in case a matching polyvoid occurs. */
+ new_poly = malloc(sizeof(hyp_polygon_t));
+ new_poly->hyp_poly_id = h->id; /* hyperlynx polygon/polyline id */
+ new_poly->polygon = NULL;
+ new_poly->layer = current_polyline_layer;
+ new_poly->is_polygon = pcb_false;
+
+ new_poly->next = polygon_head;
+ polygon_head = new_poly;
+
+ return 0;
+}
+
+pcb_bool exec_polyline_end(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("polyline end:\n");
+
+ /* bookkeeping */
+ if ((poly_state != HYP_POLYLINE) && hyp_debug)
+ pcb_printf("polyline: unexpected polyline end. continuing.\n");
+
+ poly_state = HYP_POLYIDLE;
+ current_polygon = NULL;
+ current_polyline_layer = NULL;
+ current_polyline_width = 0;
+ current_polyline_clearance = 0;
+ current_polyline_xpos = 0;
+ current_polyline_ypos = 0;
+
+ return 0;
+}
+
+/*
+ * LINE subrecord of NET record.
+ */
+
+pcb_bool exec_line(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("line: x = %ml y = %ml\n", x2coord(h->x), y2coord(h->y));
+
+ switch (poly_state) {
+ case HYP_POLYIDLE:
+ if (hyp_debug)
+ pcb_printf("line: unexpected. continuing.\n");
+ break;
+ case HYP_POLYGON:
+ case HYP_POLYGON_HOLE:
+ /* add new vertex to polygon */
+ if (current_polygon != NULL)
+ pcb_poly_point_new(current_polygon, x2coord(h->x), y2coord(h->y));
+ break;
+ case HYP_POLYLINE:
+ /* add new point to polyline */
+ if (current_polyline_layer != NULL) {
+ pcb_line_new(current_polyline_layer, current_polyline_xpos, current_polyline_ypos, x2coord(h->x), y2coord(h->y),
+ current_polyline_width, current_polyline_clearance, pcb_no_flags());
+ /* move on */
+ current_polyline_xpos = x2coord(h->x);
+ current_polyline_ypos = y2coord(h->y);
+ }
+ break;
+ case HYP_POLYLINE_HOLE:
+ /* hole in polyline not implemented */
+ break;
+ default:
+ if (hyp_debug)
+ pcb_printf("line: error\n");
+ }
+
+ return 0;
+}
+
+/*
+ * CURVE subrecord of NET record.
+ * Clockwise from (x1, y1) to (x2, y2).
+ */
+
+pcb_bool exec_curve(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("curve: x1 = %ml y1 = %ml x2 = %ml y2 = %ml xc = %ml yc = %ml r = %ml\n", x2coord(h->x1), y2coord(h->y1),
+ x2coord(h->x2), y2coord(h->y2), x2coord(h->xc), y2coord(h->yc), xy2coord(h->r));
+
+ switch (poly_state) {
+ case HYP_POLYIDLE:
+ if (hyp_debug)
+ pcb_printf("curve: unexpected. continuing.\n");
+ break;
+ case HYP_POLYGON:
+ case HYP_POLYGON_HOLE:
+ if (current_polygon != NULL) {
+ /* polygon contains line segments, not arc segments. convert arc segment to line segments. */
+ hyp_arc2poly(x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2), x2coord(h->xc), y2coord(h->yc),
+ xy2coord(h->r), pcb_false);
+ }
+ break;
+ case HYP_POLYLINE:
+ if (current_polyline_layer != NULL) {
+ /* clockwise arc from (x1, y2) to (x2, y2) */
+ hyp_arc_new(current_polyline_layer, x2coord(h->x1), y2coord(h->y1), x2coord(h->x2), y2coord(h->y2), x2coord(h->xc),
+ y2coord(h->yc), xy2coord(h->r), xy2coord(h->r), pcb_false, current_polyline_width,
+ current_polyline_clearance, pcb_no_flags());
+
+ /* move on */
+ if ((current_polyline_xpos == x2coord(h->x1)) && (current_polyline_ypos == y2coord(h->y1))) {
+ current_polyline_xpos = x2coord(h->x2);
+ current_polyline_ypos = y2coord(h->y2);
+ }
+ else if ((current_polyline_xpos == x2coord(h->x2)) && (current_polyline_ypos == y2coord(h->y2))) {
+ current_polyline_xpos = x2coord(h->x1);
+ current_polyline_ypos = y2coord(h->y1);
+ }
+ }
+ break;
+ case HYP_POLYLINE_HOLE:
+ /* not implemented */
+ break;
+ default:
+ if (hyp_debug)
+ pcb_printf("curve: error\n");
+ }
+
+ return 0;
+}
+
+/*
+ * NET_CLASS record
+ */
+
+pcb_bool exec_net_class(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("net_class: net_class_name = \"%s\"\n", h->net_class_name);
+
+ return 0;
+}
+
+/*
+ * N net membership subrecord of NET_CLASS record
+ */
+
+pcb_bool exec_net_class_element(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("net_class_element: net_name = \"%s\"\n", h->net_name);
+
+ return 0;
+}
+
+/*
+ * A attribute subrecord of NET_CLASS record
+ */
+
+
+pcb_bool exec_net_class_attribute(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("netclass_attribute: name = \"%s\" value = \"%s\"\n", h->name, h->value);
+
+ return 0;
+}
+
+/*
+ * KEY record
+ */
+
+pcb_bool exec_key(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("key: key = \"%s\"\n", h->key);
+
+ return 0;
+}
+
+/*
+ * END record
+ */
+
+pcb_bool exec_end(parse_param * h)
+{
+ if (hyp_debug)
+ pcb_printf("end:\n");
+
+ return 0;
+}
+
+/* not truncated */
Index: src_plugins/io_hyp/parser.h
===================================================================
--- src_plugins/io_hyp/parser.h (nonexistent)
+++ src_plugins/io_hyp/parser.h (revision 7964)
@@ -0,0 +1,251 @@
+/*
+ * read hyperlynx files
+ * Copyright 2012 Koen De Vleeschauwer.
+ *
+ * This file is part of pcb-rnd.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#ifndef PARSER_H
+#define PARSER_H
+
+#include
+#include "pcb_bool.h"
+#include "board.h"
+
+ /*
+ * Parameters passed on by the parser.
+ * All variables added here are initialized in new_record().
+ */
+
+typedef enum { PAD_TYPE_METAL, PAD_TYPE_ANTIPAD, PAD_TYPE_THERMAL_RELIEF } pad_type_enum;
+
+typedef enum { PIN_SIM_IN, PIN_SIM_OUT, PIN_SIM_BOTH } pin_function_enum;
+
+typedef enum { POLYGON_TYPE_POUR, POLYGON_TYPE_PLANE, POLYGON_TYPE_COPPER, POLYGON_TYPE_PAD,
+ POLYGON_TYPE_ANTIPAD
+} polygon_type_enum;
+
+typedef struct {
+ double vers; /* version of the hyp file format */
+ pcb_bool detailed; /* data detailed enough for power integrity */
+ pcb_bool unit_system_english; /* english or metric units */
+ pcb_bool metal_thickness_weight; /* copper by weight or by length */
+ double default_plane_separation; /* trace to plane separation */
+
+ /* stackup record */
+ pcb_bool use_die_for_metal; /* dielectric constant and loss tangent of dielectric for metal layers */
+ double bulk_resistivity;
+ pcb_bool conformal;
+ double epsilon_r;
+ char *layer_name;
+ double loss_tangent;
+ char *material_name;
+ double plane_separation;
+ double plating_thickness;
+ pcb_bool prepreg;
+ double temperature_coefficient; /* temperature coefficient of resistivity */
+ double thickness; /* layer thickness */
+
+ /* stackup record flags */
+ pcb_bool bulk_resistivity_set;
+ pcb_bool conformal_set;
+ pcb_bool epsilon_r_set;
+ pcb_bool layer_name_set;
+ pcb_bool loss_tangent_set;
+ pcb_bool material_name_set;
+ pcb_bool plane_separation_set;
+ pcb_bool plating_thickness_set;
+ pcb_bool prepreg_set;
+ pcb_bool temperature_coefficient_set;
+ pcb_bool thickness_set;
+
+ /* device record */
+ char *device_type;
+ char *ref;
+ double value_float;
+ char *value_string;
+ char *package;
+
+ /* device record flags */
+ pcb_bool name_set;
+ pcb_bool value_float_set;
+ pcb_bool value_string_set;
+ pcb_bool package_set;
+
+ /* supplies record */
+ pcb_bool voltage_specified;
+ pcb_bool conversion;
+
+ /* padstack record */
+ char *padstack_name;
+ double drill_size;
+ double pad_shape;
+ double pad_sx;
+ double pad_sy;
+ double pad_angle;
+ double thermal_clear_shape;
+ double thermal_clear_sx;
+ double thermal_clear_sy;
+ double thermal_clear_angle;
+ pad_type_enum pad_type;
+
+ /* padstack record flags */
+ pcb_bool padstack_name_set;
+ pcb_bool drill_size_set;
+ pcb_bool pad_type_set;
+
+ /* net record */
+ double width;
+ double left_plane_separation;
+ pcb_bool width_set;
+ pcb_bool left_plane_separation_set;
+
+ /* via subrecord of net */
+ char *layer1_name;
+ pcb_bool layer1_name_set;
+ char *layer2_name;
+ pcb_bool layer2_name_set;
+ char *via_pad_shape;
+ pcb_bool via_pad_shape_set;
+ double via_pad_sx;
+ pcb_bool via_pad_sx_set;
+ double via_pad_sy;
+ pcb_bool via_pad_sy_set;
+ double via_pad_angle;
+ pcb_bool via_pad_angle_set;
+ char *via_pad1_shape;
+ pcb_bool via_pad1_shape_set;
+ double via_pad1_sx;
+ pcb_bool via_pad1_sx_set;
+ double via_pad1_sy;
+ pcb_bool via_pad1_sy_set;
+ double via_pad1_angle;
+ pcb_bool via_pad1_angle_set;
+ char *via_pad2_shape;
+ pcb_bool via_pad2_shape_set;
+ double via_pad2_sx;
+ pcb_bool via_pad2_sx_set;
+ double via_pad2_sy;
+ pcb_bool via_pad2_sy_set;
+ double via_pad2_angle;
+ pcb_bool via_pad2_angle_set;
+
+ /* pin subrecord of net */
+ char *pin_reference;
+ pcb_bool pin_reference_set;
+ pin_function_enum pin_function;
+ pcb_bool pin_function_set;
+
+ /* useg subrecord of net */
+ char *zlayer_name;
+ pcb_bool zlayer_name_set;
+ double length;
+ double impedance;
+ pcb_bool impedance_set;
+ double delay;
+ double resistance;
+ pcb_bool resistance_set;
+
+ /* polygon subrecord of net */
+ int id;
+ pcb_bool id_set;
+ polygon_type_enum polygon_type;
+ pcb_bool polygon_type_set;
+
+ /* net class record */
+ char *net_class_name;
+ char *net_name;
+
+ /* key record */
+ char *key;
+
+ /* Attributes */
+ char *name; /* attribute name */
+ char *value; /* attribute value */
+
+ /* point, line and arc coordinates */
+ double x; /* coordinates point */
+ double y; /* coordinates point */
+ double x1; /* coordinates point 1 */
+ double y1; /* coordinates point 1 */
+ double x2; /* coordinates point 2 */
+ double y2; /* coordinates point 2 */
+ double xc; /* coordinates arc */
+ double yc; /* coordinates arc */
+ double r; /* coordinates arc */
+} parse_param;
+
+ /* exec_* routines are called by parser to interpret hyperlynx file */
+pcb_bool exec_board_file(parse_param * h);
+pcb_bool exec_version(parse_param * h);
+pcb_bool exec_data_mode(parse_param * h);
+pcb_bool exec_units(parse_param * h);
+pcb_bool exec_plane_sep(parse_param * h);
+pcb_bool exec_perimeter_segment(parse_param * h);
+pcb_bool exec_perimeter_arc(parse_param * h);
+pcb_bool exec_board_attribute(parse_param * h);
+
+pcb_bool exec_options(parse_param * h);
+pcb_bool exec_signal(parse_param * h);
+pcb_bool exec_dielectric(parse_param * h);
+pcb_bool exec_plane(parse_param * h);
+
+pcb_bool exec_devices(parse_param * h);
+
+pcb_bool exec_supplies(parse_param * h);
+
+pcb_bool exec_padstack_element(parse_param * h);
+pcb_bool exec_padstack_end(parse_param * h);
+
+pcb_bool exec_net(parse_param * h);
+pcb_bool exec_net_plane_separation(parse_param * h);
+pcb_bool exec_net_attribute(parse_param * h);
+pcb_bool exec_seg(parse_param * h);
+pcb_bool exec_arc(parse_param * h);
+pcb_bool exec_via(parse_param * h);
+pcb_bool exec_via_v1(parse_param * h); /* Old style via format */
+pcb_bool exec_pin(parse_param * h);
+pcb_bool exec_pad(parse_param * h);
+pcb_bool exec_useg(parse_param * h);
+
+pcb_bool exec_polygon_begin(parse_param * h);
+pcb_bool exec_polygon_end(parse_param * h);
+pcb_bool exec_polyvoid_begin(parse_param * h);
+pcb_bool exec_polyvoid_end(parse_param * h);
+pcb_bool exec_polyline_begin(parse_param * h);
+pcb_bool exec_polyline_end(parse_param * h);
+pcb_bool exec_line(parse_param * h);
+pcb_bool exec_curve(parse_param * h);
+
+pcb_bool exec_net_class(parse_param * h);
+pcb_bool exec_net_class_element(parse_param * h);
+pcb_bool exec_net_class_attribute(parse_param * h);
+
+pcb_bool exec_end(parse_param * h);
+pcb_bool exec_key(parse_param * h);
+
+ /* called by pcb-rnd to load hyperlynx file */
+pcb_bool hyp_parse(pcb_data_t * dest, const char *fname, int debug);
+void hyp_error(const char *msg);
+
+ /* create arc, hyperlynx-style */
+pcb_arc_t *hyp_arc_new(pcb_layer_t * Layer, pcb_coord_t X1, pcb_coord_t Y1, pcb_coord_t X2, pcb_coord_t Y2, pcb_coord_t XC,
+ pcb_coord_t YC, pcb_coord_t Width, pcb_coord_t Height, pcb_bool_t Clockwise, pcb_coord_t Thickness,
+ pcb_coord_t Clearance, pcb_flag_t Flags);
+
+#endif
+
+ /* not truncated */
Index: src_plugins/io_hyp/tests/gensamp
===================================================================
--- src_plugins/io_hyp/tests/gensamp (nonexistent)
+++ src_plugins/io_hyp/tests/gensamp (revision 7964)
@@ -0,0 +1,306 @@
+#!/usr/bin/python
+"""
+ Generate sample hyperlynx file
+ Copyright 2017 Koen De Vleeschauwer.
+
+ This file is part of pcb-rnd.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+"""
+
+from math import pi, sin, cos
+
+print "{VERSION=2.0}"
+print "{UNITS=METRIC LENGTH}"
+print "{BOARD"
+print " (PERIMETER_SEGMENT X1=1.0 Y1=0.0 X2=19.0 Y2=0.0)"
+print " (PERIMETER_SEGMENT X1=20.0 Y1=1.0 X2=20.0 Y2=9.0)"
+print " (PERIMETER_SEGMENT X1=19.0 Y1=10.0 X2=1.0 Y2=10.0)"
+print " (PERIMETER_SEGMENT X1=0.0 Y1=9.0 X2=0.0 Y2=1.0)"
+print " (PERIMETER_ARC X1=0.0 Y1=1.0 X2=1.0 Y2=0.0 XC=1.0 YC=1.0 R=1.0)"
+print " (PERIMETER_ARC X1=1.0 Y1=10.0 X2=0.0 Y2=9.0 XC=1.0 YC=9.0 R=1.0)"
+print " (PERIMETER_ARC X1=20.0 Y1=9.0 X2=19.0 Y2=10.0 XC=19.0 YC=9.0 R=1.0)"
+print " (PERIMETER_ARC X1=19.0 Y1=0.0 X2=20.0 Y2=1.0 XC=19.0 YC=1.0 R=1.0)"
+print ""
+print " (PERIMETER_SEGMENT X1=2.0 Y1=1.0 X2=3.0 Y2=1.0)"
+print " (PERIMETER_SEGMENT X1=3.0 Y1=9.0 X2=2.0 Y2=9.0)"
+print " (PERIMETER_ARC X1=2.0 Y1=9.0 X2=1.0 Y2=8.0 XC=2.0 YC=8.0 R=1.0)"
+print " (PERIMETER_SEGMENT X1=1.0 Y1=8.0 X2=1.0 Y2=2.0)"
+print " (PERIMETER_ARC X1=1.0 Y1=2.0 X2=2.0 Y2=1.0 XC=2.0 YC=2.0 R=1.0)"
+print " (PERIMETER_SEGMENT X1=4.0 Y1=2.0 X2=4.0 Y2=8.0)"
+print " (PERIMETER_ARC X1=3.0 Y1=1.0 X2=4.0 Y2=2.0 XC=3.0 YC=2.0 R=1.0)"
+print " (PERIMETER_ARC X1=4.0 Y1=8.0 X2=3.0 Y2=9.0 XC=3.0 YC=8.0 R=1.0)"
+
+print " (PERIMETER_ARC X1=5.5 Y1=5.0 X2=5.5 Y2=5.0 XC=5.0 YC=5.0 R=0.5)"
+
+print " (PERIMETER_ARC X1=5.5 Y1=6.0 X2=4.5 Y2=6.0 XC=5.0 YC=6.0 R=0.5)"
+print " (PERIMETER_SEGMENT X1=4.5 Y1=6.0 X2=5.5 Y2=6.0)"
+
+print " (PERIMETER_ARC X1=4.5 Y1=7.5 X2=5.5 Y2=7.5 XC=5.0 YC=7.5 R=0.5)"
+print " (PERIMETER_SEGMENT X1=4.5 Y1=7.5 X2=5.5 Y2=7.5)"
+
+print " (PERIMETER_ARC X1=5.5 Y1=8.5 X2=5.0 Y2=8.0 XC=5.0 YC=8.5 R=0.5)"
+print " (PERIMETER_SEGMENT X1=5.0 Y1=8.0 X2=5.5 Y2=8.5)"
+
+print "}"
+
+print "{PLANE_SEP=0.05}"
+
+print "{STACKUP"
+print " (SIGNAL T=0.000700 L=component)"
+print " (DIELECTRIC T=0.002000 C=4.000000)"
+print " (PLANE T=0.000700 L=solder PS=0.508)"
+print "}"
+print "{DEVICES"
+print " (? REF=U1 NAME=BC548 L=component)"
+print "}"
+
+#
+# PADSTACK. MDEF is shorthand for "all copper layers"
+#
+
+print "{PADSTACK=roundpad, 0.2"
+print " (MDEF, 0, 0.5, 0.5, 0)"
+print "}"
+print "{PADSTACK=squarepad, 0.2"
+print " (MDEF, 1, 0.5, 0.5, 0)"
+print "}"
+print "{PADSTACK=oblongpad, 0.2"
+print " (MDEF, 2, 0.5, 0.5, 0)"
+print "}"
+print "{PADSTACK=nodrill,"
+print " (MDEF, 0, 0.5, 0.5, 0)"
+print "}"
+print "{PADSTACK=0802pad,"
+print " (component, 1, 0.2, 0.12, 0)"
+print "}"
+
+#
+# SEG line segments
+#
+
+x0 = 6
+y0 = 3
+r1 = 0.5
+r2 = 2
+max = 12
+
+print "{NET=segtst"
+
+for x in range (0, max):
+ alpha = x * 2 * pi / max
+ x1 = x0 + r1 * cos (alpha)
+ y1 = y0 + r1 * sin (alpha)
+ r = r1 + (r2 - r1) * (x + 1) / max
+ x2 = x0 + r * cos (alpha)
+ y2 = y0 + r * sin (alpha)
+ w = (x + 1) * 0.1 / max
+ print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=%f L=component)" % ( x1, y1, x2, y2, w)
+
+print "}"
+
+#
+# ARC arc segments
+#
+
+max = 8
+x0 = 9
+y0 = 1
+r = 0.1
+w = r / 4
+
+print "{NET=arctst"
+
+for a in range (0, max):
+ for b in range (0, max):
+ alpha = 2 * pi * a / max
+ beta = 2 * pi * b / max
+ xc = x0 + 4 * r * a
+ yc = y0 + 4 * r * b
+ x1 = xc + r * cos (alpha)
+ y1 = yc + r * sin (alpha)
+ x2 = xc + r * cos (beta)
+ y2 = yc + r * sin (beta)
+ print " (ARC X1=%f Y1=%f X2=%f Y2=%f XC=%f YC=%f R=%f W=%f L=component)" % ( x1, y1, x2, y2, xc, yc, r, w)
+
+print "}"
+
+#
+# VIA
+#
+
+print "{NET=viatst"
+print " (VIA X=13 Y=1 P=roundpad)"
+print " (VIA X=13 Y=2 P=squarepad)"
+print " (VIA X=13 Y=3 P=oblongpad)"
+print " (VIA X=13 Y=4 P=nodrill)"
+print " (SEG X1=13 Y1=1 X2=13 Y2=2 W=0.1 L=component)"
+print " (SEG X1=13 Y1=2 X2=13 Y2=3 W=0.1 L=component)"
+print " (SEG X1=13 Y1=3 X2=13 Y2=4 W=0.1 L=component)"
+print "}"
+
+#
+# old-style VIA, compatibility only.
+#
+
+print "{NET=oldviatst"
+print " (VIA X=14 Y=1 D=0.2 L1=component S1=ROUND S1X=0.5 S1Y=0.5)"
+print " (VIA X=14 Y=2 D=0.2 L1=component L2=solder S1=RECT S1X=0.5 S1Y=0.5)"
+print " (VIA X=14 Y=3 D=0.2 L1=component L2=solder S1=OBLONG S1X=0.5 S1Y=0.5)"
+print " (VIA X=14 Y=4 D=0.0 L1=component L2=solder S1=ROUND S1X=0.5 S1Y=0.5)"
+print " (SEG X1=14 Y1=1 X2=14 Y2=2 W=0.1 L=component)"
+print " (SEG X1=14 Y1=2 X2=14 Y2=3 W=0.1 L=component)"
+print " (SEG X1=14 Y1=3 X2=14 Y2=4 W=0.1 L=component)"
+print "}"
+
+print "{NET=pintst"
+# a through-hole transistor
+print " (PIN X=15 Y=1 R=U1.1 P=roundpad)"
+print " (PIN X=15 Y=2 R=U1.2 P=squarepad)"
+print " (PIN X=15 Y=3 R=U1.3 P=oblongpad)"
+print "}"
+
+print "{NET=padtst"
+print " (PAD X=16 Y=1 L=component S=ROUND SX=0.5 SY=0.5)"
+print " (PAD X=16 Y=2 L=component S=RECT SX=0.5 SY=0.5)"
+print " (PAD X=16 Y=3 L=component S=OBLONG SX=0.5 SY=0.5)"
+print " (PAD X=17 Y=1 L=solder S=ROUND SX=0.5 SY=0.5)"
+print " (PAD X=17 Y=2 L=solder S=RECT SX=0.5 SY=0.5)"
+print " (PAD X=17 Y=3 L=solder S=OBLONG SX=0.5 SY=0.5)"
+print "}"
+
+print "{NET=usegtst"
+print " (USEG X1=18 Y1=1 L1=component X2=19 Y2=1 L2=component ZL=component ZW=0.1 ZLEN=2 )"
+print " (USEG X1=18 Y1=2 L1=component X2=19 Y2=2 L2=component Z=50 D=1e-12 R=5 )"
+print " (USEG X1=18 Y1=3 L1=component X2=19 Y2=3 L2=solder ZL=component ZW=0.1 ZLEN=2 )"
+print " (USEG X1=18 Y1=4 L1=component X2=19 Y2=4 L2=solder Z=50 D=1e-12 R=5 )"
+print "}"
+
+x0 = 6.0
+y0 = 5.0
+l = 2.0
+h = 0.5
+r = h/2.0
+w = h/4.0
+
+print "{NET=polylinetst"
+print " {POLYGON L=component W=0.05 ID=1 X=%f Y=%f" % (x0-w, y0-w)
+print " (LINE X=%f Y=%f)" % (x0+w, y0-w)
+print " (LINE X=%f Y=%f)" % (x0+w, y0+w)
+print " (LINE X=%f Y=%f)" % (x0-w, y0+w)
+print " (LINE X=%f Y=%f)" % (x0-w, y0-w)
+print " }"
+print " {POLYLINE L=component W=0.1 ID=1 X=%f Y=%f" % (x0, y0)
+for a in range (0, 8, 2):
+ print " (LINE X=%f Y=%f)" % ( x0+l, y0+a*h)
+ print " (CURVE X1=%f Y1=%f X2=%f Y2=%f XC=%f YC=%f R=%f)" % ( x0+l, y0+a*h, x0+l, y0+(a+1)*h, x0+l, y0+(a+0.5)*h, r)
+ print " (LINE X=%f Y=%f)" % ( x0, y0+(a+1)*h)
+ print " (CURVE X1=%f Y1=%f X2=%f Y2=%f XC=%f YC=%f R=%f)" % ( x0, y0+(a+2)*h, x0, y0+(a+1)*h, x0, y0+(a+1.5)*h, r)
+
+print " }"
+print "}"
+
+x0 = 9.5
+y0 = 5.5
+r = 0.5
+
+print "{NET=curvetst"
+print " {POLYGON L=component W=0.05 ID=2 X=%f Y=%f" % (x0+r, y0)
+print " (CURVE X1=%f Y1=%f X2=%f Y2=%f XC=%f YC=%f R=%f )" % (x0+r, y0, x0+r, y0, x0, y0, r)
+print " }"
+print " {POLYVOID ID=2 X=%f Y=%f" % (x0-r/2, y0)
+print " (CURVE X1=%f Y1=%f X2=%f Y2=%f XC=%f YC=%f R=%f )" % (x0-r/2, y0, x0+r/2, y0, x0, y0, r/2)
+print " (LINE X=%f Y=%f)" % (x0-r/2, y0)
+print " }"
+print "}"
+
+x0 = 9.0
+y0 = 6.5
+w = 0.5
+
+print "{NET=linetst"
+print " {POLYGON L=component W=0.05 ID=3 X=%f Y=%f" % (x0, y0)
+print " (LINE X=%f Y=%f)" % (x0+2*w, y0)
+print " (LINE X=%f Y=%f)" % (x0+2*w, y0+w)
+print " (LINE X=%f Y=%f)" % (x0+w, y0+w)
+print " (LINE X=%f Y=%f)" % (x0+w, y0+2*w)
+print " (LINE X=%f Y=%f)" % (x0, y0+2*w)
+print " (LINE X=%f Y=%f)" % (x0, y0)
+print " }"
+
+x0 = 9.125
+y0 = 6.625
+w = 0.25
+
+print " {POLYVOID ID=3 X=%f Y=%f" % (x0, y0)
+print " (LINE X=%f Y=%f)" % (x0+2*w, y0)
+print " (LINE X=%f Y=%f)" % (x0+2*w, y0+w)
+print " (LINE X=%f Y=%f)" % (x0+w, y0+w)
+print " (LINE X=%f Y=%f)" % (x0+w, y0+2*w)
+print " (LINE X=%f Y=%f)" % (x0, y0+2*w)
+print " (LINE X=%f Y=%f)" % (x0, y0)
+print " }"
+
+print "}"
+
+x0 = 11.5
+y0 = 5.0
+w = 1.0
+h = 0.5
+s = 1.0
+
+def mkpolygon (typ, id, x0, y0, w, h):
+ print " {POLYGON L=component T=%s W=0.1 ID=%i X=%f Y=%f" % (typ, id, x0, y0)
+ print " (LINE X=%f Y=%f)" % (x0+w, y0)
+ print " (LINE X=%f Y=%f)" % (x0+w, y0+h)
+ print " (LINE X=%f Y=%f)" % (x0, y0+h)
+ print " (LINE X=%f Y=%f)" % (x0, y0)
+ print " }"
+ return
+
+
+x1 = 11.0
+x2 = x0 + w / 4.0
+print "{NET=poly_clearance_tst PS=0.05"
+print " (VIA X=%f Y=%f P=0802pad)" % (x2, y0+h/2.0)
+print " (VIA X=%f Y=%f P=0802pad)" % (x2, y0+h/2.0+s)
+print " (VIA X=%f Y=%f P=0802pad)" % (x2, y0+h/2.0+2*s)
+print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0, x2, y0+h/2.0)
+print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0+s, x2, y0+h/2.0+s)
+print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0+2*s, x2, y0+h/2.0+2*s)
+print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0, x1, y0+h/2.0+s)
+print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0+s, x1, y0+h/2.0+2*s)
+
+mkpolygon("POUR", 4, x0, y0, w, h)
+mkpolygon("COPPER", 5, x0, y0 + s, w, h)
+mkpolygon("PLANE", 6, x0, y0 + 2 * s, w, h)
+
+print "}"
+
+x1 = 13.0
+x2 = x0 + w * 3.0 / 4.0
+print "{NET=poly_clearance_tst2 PS=0.05"
+print " (VIA X=%f Y=%f P=0802pad)" % (x2, y0+h/2.0)
+print " (VIA X=%f Y=%f P=0802pad)" % (x2, y0+h/2.0+s)
+print " (VIA X=%f Y=%f P=0802pad)" % (x2, y0+h/2.0+2*s)
+print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0, x2, y0+h/2.0)
+print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0+s, x2, y0+h/2.0+s)
+print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0+2*s, x2, y0+h/2.0+2*s)
+print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0, x1, y0+h/2.0+s)
+print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0+s, x1, y0+h/2.0+2*s)
+print "}"
+
+print "{END}"
+
+# not truncated
Property changes on: src_plugins/io_hyp/tests/gensamp
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: src_plugins/io_hyp/tests/samp.hyp
===================================================================
--- src_plugins/io_hyp/tests/samp.hyp (nonexistent)
+++ src_plugins/io_hyp/tests/samp.hyp (revision 7964)
@@ -0,0 +1,261 @@
+{VERSION=2.0}
+{UNITS=METRIC LENGTH}
+{BOARD
+ (PERIMETER_SEGMENT X1=1.0 Y1=0.0 X2=19.0 Y2=0.0)
+ (PERIMETER_SEGMENT X1=20.0 Y1=1.0 X2=20.0 Y2=9.0)
+ (PERIMETER_SEGMENT X1=19.0 Y1=10.0 X2=1.0 Y2=10.0)
+ (PERIMETER_SEGMENT X1=0.0 Y1=9.0 X2=0.0 Y2=1.0)
+ (PERIMETER_ARC X1=0.0 Y1=1.0 X2=1.0 Y2=0.0 XC=1.0 YC=1.0 R=1.0)
+ (PERIMETER_ARC X1=1.0 Y1=10.0 X2=0.0 Y2=9.0 XC=1.0 YC=9.0 R=1.0)
+ (PERIMETER_ARC X1=20.0 Y1=9.0 X2=19.0 Y2=10.0 XC=19.0 YC=9.0 R=1.0)
+ (PERIMETER_ARC X1=19.0 Y1=0.0 X2=20.0 Y2=1.0 XC=19.0 YC=1.0 R=1.0)
+
+ (PERIMETER_SEGMENT X1=2.0 Y1=1.0 X2=3.0 Y2=1.0)
+ (PERIMETER_SEGMENT X1=3.0 Y1=9.0 X2=2.0 Y2=9.0)
+ (PERIMETER_ARC X1=2.0 Y1=9.0 X2=1.0 Y2=8.0 XC=2.0 YC=8.0 R=1.0)
+ (PERIMETER_SEGMENT X1=1.0 Y1=8.0 X2=1.0 Y2=2.0)
+ (PERIMETER_ARC X1=1.0 Y1=2.0 X2=2.0 Y2=1.0 XC=2.0 YC=2.0 R=1.0)
+ (PERIMETER_SEGMENT X1=4.0 Y1=2.0 X2=4.0 Y2=8.0)
+ (PERIMETER_ARC X1=3.0 Y1=1.0 X2=4.0 Y2=2.0 XC=3.0 YC=2.0 R=1.0)
+ (PERIMETER_ARC X1=4.0 Y1=8.0 X2=3.0 Y2=9.0 XC=3.0 YC=8.0 R=1.0)
+ (PERIMETER_ARC X1=5.5 Y1=5.0 X2=5.5 Y2=5.0 XC=5.0 YC=5.0 R=0.5)
+ (PERIMETER_ARC X1=5.5 Y1=6.0 X2=4.5 Y2=6.0 XC=5.0 YC=6.0 R=0.5)
+ (PERIMETER_SEGMENT X1=4.5 Y1=6.0 X2=5.5 Y2=6.0)
+ (PERIMETER_ARC X1=4.5 Y1=7.5 X2=5.5 Y2=7.5 XC=5.0 YC=7.5 R=0.5)
+ (PERIMETER_SEGMENT X1=4.5 Y1=7.5 X2=5.5 Y2=7.5)
+ (PERIMETER_ARC X1=5.5 Y1=8.5 X2=5.0 Y2=8.0 XC=5.0 YC=8.5 R=0.5)
+ (PERIMETER_SEGMENT X1=5.0 Y1=8.0 X2=5.5 Y2=8.5)
+}
+{PLANE_SEP=0.05}
+{STACKUP
+ (SIGNAL T=0.000700 L=component)
+ (DIELECTRIC T=0.002000 C=4.000000)
+ (PLANE T=0.000700 L=solder PS=0.508)
+}
+{DEVICES
+ (? REF=U1 NAME=BC548 L=component)
+}
+{PADSTACK=roundpad, 0.2
+ (MDEF, 0, 0.5, 0.5, 0)
+}
+{PADSTACK=squarepad, 0.2
+ (MDEF, 1, 0.5, 0.5, 0)
+}
+{PADSTACK=oblongpad, 0.2
+ (MDEF, 2, 0.5, 0.5, 0)
+}
+{PADSTACK=nodrill,
+ (MDEF, 0, 0.5, 0.5, 0)
+}
+{PADSTACK=0802pad,
+ (component, 1, 0.2, 0.12, 0)
+}
+{NET=segtst
+ (SEG X1=6.500000 Y1=3.000000 X2=6.625000 Y2=3.000000 W=0.008333 L=component)
+ (SEG X1=6.433013 Y1=3.250000 X2=6.649519 Y2=3.375000 W=0.016667 L=component)
+ (SEG X1=6.250000 Y1=3.433013 X2=6.437500 Y2=3.757772 W=0.025000 L=component)
+ (SEG X1=6.000000 Y1=3.500000 X2=6.000000 Y2=4.000000 W=0.033333 L=component)
+ (SEG X1=5.750000 Y1=3.433013 X2=5.437500 Y2=3.974279 W=0.041667 L=component)
+ (SEG X1=5.566987 Y1=3.250000 X2=4.917468 Y2=3.625000 W=0.050000 L=component)
+ (SEG X1=5.500000 Y1=3.000000 X2=4.625000 Y2=3.000000 W=0.058333 L=component)
+ (SEG X1=5.566987 Y1=2.750000 X2=4.700962 Y2=2.250000 W=0.066667 L=component)
+ (SEG X1=5.750000 Y1=2.566987 X2=5.187500 Y2=1.592709 W=0.075000 L=component)
+ (SEG X1=6.000000 Y1=2.500000 X2=6.000000 Y2=1.250000 W=0.083333 L=component)
+ (SEG X1=6.250000 Y1=2.566987 X2=6.937500 Y2=1.376202 W=0.091667 L=component)
+ (SEG X1=6.433013 Y1=2.750000 X2=7.732051 Y2=2.000000 W=0.100000 L=component)
+}
+{NET=arctst
+ (ARC X1=9.100000 Y1=1.000000 X2=9.100000 Y2=1.000000 XC=9.000000 YC=1.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.100000 Y1=1.400000 X2=9.070711 Y2=1.470711 XC=9.000000 YC=1.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.100000 Y1=1.800000 X2=9.000000 Y2=1.900000 XC=9.000000 YC=1.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.100000 Y1=2.200000 X2=8.929289 Y2=2.270711 XC=9.000000 YC=2.200000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.100000 Y1=2.600000 X2=8.900000 Y2=2.600000 XC=9.000000 YC=2.600000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.100000 Y1=3.000000 X2=8.929289 Y2=2.929289 XC=9.000000 YC=3.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.100000 Y1=3.400000 X2=9.000000 Y2=3.300000 XC=9.000000 YC=3.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.100000 Y1=3.800000 X2=9.070711 Y2=3.729289 XC=9.000000 YC=3.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.470711 Y1=1.070711 X2=9.500000 Y2=1.000000 XC=9.400000 YC=1.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.470711 Y1=1.470711 X2=9.470711 Y2=1.470711 XC=9.400000 YC=1.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.470711 Y1=1.870711 X2=9.400000 Y2=1.900000 XC=9.400000 YC=1.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.470711 Y1=2.270711 X2=9.329289 Y2=2.270711 XC=9.400000 YC=2.200000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.470711 Y1=2.670711 X2=9.300000 Y2=2.600000 XC=9.400000 YC=2.600000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.470711 Y1=3.070711 X2=9.329289 Y2=2.929289 XC=9.400000 YC=3.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.470711 Y1=3.470711 X2=9.400000 Y2=3.300000 XC=9.400000 YC=3.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.470711 Y1=3.870711 X2=9.470711 Y2=3.729289 XC=9.400000 YC=3.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.800000 Y1=1.100000 X2=9.900000 Y2=1.000000 XC=9.800000 YC=1.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.800000 Y1=1.500000 X2=9.870711 Y2=1.470711 XC=9.800000 YC=1.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.800000 Y1=1.900000 X2=9.800000 Y2=1.900000 XC=9.800000 YC=1.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.800000 Y1=2.300000 X2=9.729289 Y2=2.270711 XC=9.800000 YC=2.200000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.800000 Y1=2.700000 X2=9.700000 Y2=2.600000 XC=9.800000 YC=2.600000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.800000 Y1=3.100000 X2=9.729289 Y2=2.929289 XC=9.800000 YC=3.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.800000 Y1=3.500000 X2=9.800000 Y2=3.300000 XC=9.800000 YC=3.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=9.800000 Y1=3.900000 X2=9.870711 Y2=3.729289 XC=9.800000 YC=3.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.129289 Y1=1.070711 X2=10.300000 Y2=1.000000 XC=10.200000 YC=1.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.129289 Y1=1.470711 X2=10.270711 Y2=1.470711 XC=10.200000 YC=1.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.129289 Y1=1.870711 X2=10.200000 Y2=1.900000 XC=10.200000 YC=1.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.129289 Y1=2.270711 X2=10.129289 Y2=2.270711 XC=10.200000 YC=2.200000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.129289 Y1=2.670711 X2=10.100000 Y2=2.600000 XC=10.200000 YC=2.600000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.129289 Y1=3.070711 X2=10.129289 Y2=2.929289 XC=10.200000 YC=3.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.129289 Y1=3.470711 X2=10.200000 Y2=3.300000 XC=10.200000 YC=3.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.129289 Y1=3.870711 X2=10.270711 Y2=3.729289 XC=10.200000 YC=3.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.500000 Y1=1.000000 X2=10.700000 Y2=1.000000 XC=10.600000 YC=1.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.500000 Y1=1.400000 X2=10.670711 Y2=1.470711 XC=10.600000 YC=1.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.500000 Y1=1.800000 X2=10.600000 Y2=1.900000 XC=10.600000 YC=1.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.500000 Y1=2.200000 X2=10.529289 Y2=2.270711 XC=10.600000 YC=2.200000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.500000 Y1=2.600000 X2=10.500000 Y2=2.600000 XC=10.600000 YC=2.600000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.500000 Y1=3.000000 X2=10.529289 Y2=2.929289 XC=10.600000 YC=3.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.500000 Y1=3.400000 X2=10.600000 Y2=3.300000 XC=10.600000 YC=3.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.500000 Y1=3.800000 X2=10.670711 Y2=3.729289 XC=10.600000 YC=3.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.929289 Y1=0.929289 X2=11.100000 Y2=1.000000 XC=11.000000 YC=1.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.929289 Y1=1.329289 X2=11.070711 Y2=1.470711 XC=11.000000 YC=1.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.929289 Y1=1.729289 X2=11.000000 Y2=1.900000 XC=11.000000 YC=1.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.929289 Y1=2.129289 X2=10.929289 Y2=2.270711 XC=11.000000 YC=2.200000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.929289 Y1=2.529289 X2=10.900000 Y2=2.600000 XC=11.000000 YC=2.600000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.929289 Y1=2.929289 X2=10.929289 Y2=2.929289 XC=11.000000 YC=3.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.929289 Y1=3.329289 X2=11.000000 Y2=3.300000 XC=11.000000 YC=3.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=10.929289 Y1=3.729289 X2=11.070711 Y2=3.729289 XC=11.000000 YC=3.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.400000 Y1=0.900000 X2=11.500000 Y2=1.000000 XC=11.400000 YC=1.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.400000 Y1=1.300000 X2=11.470711 Y2=1.470711 XC=11.400000 YC=1.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.400000 Y1=1.700000 X2=11.400000 Y2=1.900000 XC=11.400000 YC=1.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.400000 Y1=2.100000 X2=11.329289 Y2=2.270711 XC=11.400000 YC=2.200000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.400000 Y1=2.500000 X2=11.300000 Y2=2.600000 XC=11.400000 YC=2.600000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.400000 Y1=2.900000 X2=11.329289 Y2=2.929289 XC=11.400000 YC=3.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.400000 Y1=3.300000 X2=11.400000 Y2=3.300000 XC=11.400000 YC=3.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.400000 Y1=3.700000 X2=11.470711 Y2=3.729289 XC=11.400000 YC=3.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.870711 Y1=0.929289 X2=11.900000 Y2=1.000000 XC=11.800000 YC=1.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.870711 Y1=1.329289 X2=11.870711 Y2=1.470711 XC=11.800000 YC=1.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.870711 Y1=1.729289 X2=11.800000 Y2=1.900000 XC=11.800000 YC=1.800000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.870711 Y1=2.129289 X2=11.729289 Y2=2.270711 XC=11.800000 YC=2.200000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.870711 Y1=2.529289 X2=11.700000 Y2=2.600000 XC=11.800000 YC=2.600000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.870711 Y1=2.929289 X2=11.729289 Y2=2.929289 XC=11.800000 YC=3.000000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.870711 Y1=3.329289 X2=11.800000 Y2=3.300000 XC=11.800000 YC=3.400000 R=0.100000 W=0.025000 L=component)
+ (ARC X1=11.870711 Y1=3.729289 X2=11.870711 Y2=3.729289 XC=11.800000 YC=3.800000 R=0.100000 W=0.025000 L=component)
+}
+{NET=viatst
+ (VIA X=13 Y=1 P=roundpad)
+ (VIA X=13 Y=2 P=squarepad)
+ (VIA X=13 Y=3 P=oblongpad)
+ (VIA X=13 Y=4 P=nodrill)
+ (SEG X1=13 Y1=1 X2=13 Y2=2 W=0.1 L=component)
+ (SEG X1=13 Y1=2 X2=13 Y2=3 W=0.1 L=component)
+ (SEG X1=13 Y1=3 X2=13 Y2=4 W=0.1 L=component)
+}
+{NET=oldviatst
+ (VIA X=14 Y=1 D=0.2 L1=component S1=ROUND S1X=0.5 S1Y=0.5)
+ (VIA X=14 Y=2 D=0.2 L1=component L2=solder S1=RECT S1X=0.5 S1Y=0.5)
+ (VIA X=14 Y=3 D=0.2 L1=component L2=solder S1=OBLONG S1X=0.5 S1Y=0.5)
+ (VIA X=14 Y=4 D=0.0 L1=component L2=solder S1=ROUND S1X=0.5 S1Y=0.5)
+ (SEG X1=14 Y1=1 X2=14 Y2=2 W=0.1 L=component)
+ (SEG X1=14 Y1=2 X2=14 Y2=3 W=0.1 L=component)
+ (SEG X1=14 Y1=3 X2=14 Y2=4 W=0.1 L=component)
+}
+{NET=pintst
+ (PIN X=15 Y=1 R=U1.1 P=roundpad)
+ (PIN X=15 Y=2 R=U1.2 P=squarepad)
+ (PIN X=15 Y=3 R=U1.3 P=oblongpad)
+}
+{NET=padtst
+ (PAD X=16 Y=1 L=component S=ROUND SX=0.5 SY=0.5)
+ (PAD X=16 Y=2 L=component S=RECT SX=0.5 SY=0.5)
+ (PAD X=16 Y=3 L=component S=OBLONG SX=0.5 SY=0.5)
+ (PAD X=17 Y=1 L=solder S=ROUND SX=0.5 SY=0.5)
+ (PAD X=17 Y=2 L=solder S=RECT SX=0.5 SY=0.5)
+ (PAD X=17 Y=3 L=solder S=OBLONG SX=0.5 SY=0.5)
+}
+{NET=usegtst
+ (USEG X1=18 Y1=1 L1=component X2=19 Y2=1 L2=component ZL=component ZW=0.1 ZLEN=2 )
+ (USEG X1=18 Y1=2 L1=component X2=19 Y2=2 L2=component Z=50 D=1e-12 R=5 )
+ (USEG X1=18 Y1=3 L1=component X2=19 Y2=3 L2=solder ZL=component ZW=0.1 ZLEN=2 )
+ (USEG X1=18 Y1=4 L1=component X2=19 Y2=4 L2=solder Z=50 D=1e-12 R=5 )
+}
+{NET=polylinetst
+ {POLYGON L=component W=0.05 ID=1 X=5.875000 Y=4.875000
+ (LINE X=6.125000 Y=4.875000)
+ (LINE X=6.125000 Y=5.125000)
+ (LINE X=5.875000 Y=5.125000)
+ (LINE X=5.875000 Y=4.875000)
+ }
+ {POLYLINE L=component W=0.1 ID=1 X=6.000000 Y=5.000000
+ (LINE X=8.000000 Y=5.000000)
+ (CURVE X1=8.000000 Y1=5.000000 X2=8.000000 Y2=5.500000 XC=8.000000 YC=5.250000 R=0.250000)
+ (LINE X=6.000000 Y=5.500000)
+ (CURVE X1=6.000000 Y1=6.000000 X2=6.000000 Y2=5.500000 XC=6.000000 YC=5.750000 R=0.250000)
+ (LINE X=8.000000 Y=6.000000)
+ (CURVE X1=8.000000 Y1=6.000000 X2=8.000000 Y2=6.500000 XC=8.000000 YC=6.250000 R=0.250000)
+ (LINE X=6.000000 Y=6.500000)
+ (CURVE X1=6.000000 Y1=7.000000 X2=6.000000 Y2=6.500000 XC=6.000000 YC=6.750000 R=0.250000)
+ (LINE X=8.000000 Y=7.000000)
+ (CURVE X1=8.000000 Y1=7.000000 X2=8.000000 Y2=7.500000 XC=8.000000 YC=7.250000 R=0.250000)
+ (LINE X=6.000000 Y=7.500000)
+ (CURVE X1=6.000000 Y1=8.000000 X2=6.000000 Y2=7.500000 XC=6.000000 YC=7.750000 R=0.250000)
+ (LINE X=8.000000 Y=8.000000)
+ (CURVE X1=8.000000 Y1=8.000000 X2=8.000000 Y2=8.500000 XC=8.000000 YC=8.250000 R=0.250000)
+ (LINE X=6.000000 Y=8.500000)
+ (CURVE X1=6.000000 Y1=9.000000 X2=6.000000 Y2=8.500000 XC=6.000000 YC=8.750000 R=0.250000)
+ }
+}
+{NET=curvetst
+ {POLYGON L=component W=0.05 ID=2 X=10.000000 Y=5.500000
+ (CURVE X1=10.000000 Y1=5.500000 X2=10.000000 Y2=5.500000 XC=9.500000 YC=5.500000 R=0.500000 )
+ }
+ {POLYVOID ID=2 X=9.250000 Y=5.500000
+ (CURVE X1=9.250000 Y1=5.500000 X2=9.750000 Y2=5.500000 XC=9.500000 YC=5.500000 R=0.250000 )
+ (LINE X=9.250000 Y=5.500000)
+ }
+}
+{NET=linetst
+ {POLYGON L=component W=0.05 ID=3 X=9.000000 Y=6.500000
+ (LINE X=10.000000 Y=6.500000)
+ (LINE X=10.000000 Y=7.000000)
+ (LINE X=9.500000 Y=7.000000)
+ (LINE X=9.500000 Y=7.500000)
+ (LINE X=9.000000 Y=7.500000)
+ (LINE X=9.000000 Y=6.500000)
+ }
+ {POLYVOID ID=3 X=9.125000 Y=6.625000
+ (LINE X=9.625000 Y=6.625000)
+ (LINE X=9.625000 Y=6.875000)
+ (LINE X=9.375000 Y=6.875000)
+ (LINE X=9.375000 Y=7.125000)
+ (LINE X=9.125000 Y=7.125000)
+ (LINE X=9.125000 Y=6.625000)
+ }
+}
+{NET=poly_clearance_tst PS=0.05
+ (VIA X=11.750000 Y=5.250000 P=0802pad)
+ (VIA X=11.750000 Y=6.250000 P=0802pad)
+ (VIA X=11.750000 Y=7.250000 P=0802pad)
+ (SEG X1=11.000000 Y1=5.250000 X2=11.750000 Y2=5.250000 W=0.04 L=component)
+ (SEG X1=11.000000 Y1=6.250000 X2=11.750000 Y2=6.250000 W=0.04 L=component)
+ (SEG X1=11.000000 Y1=7.250000 X2=11.750000 Y2=7.250000 W=0.04 L=component)
+ (SEG X1=11.000000 Y1=5.250000 X2=11.000000 Y2=6.250000 W=0.04 L=component)
+ (SEG X1=11.000000 Y1=6.250000 X2=11.000000 Y2=7.250000 W=0.04 L=component)
+ {POLYGON L=component T=POUR W=0.1 ID=4 X=11.500000 Y=5.000000
+ (LINE X=12.500000 Y=5.000000)
+ (LINE X=12.500000 Y=5.500000)
+ (LINE X=11.500000 Y=5.500000)
+ (LINE X=11.500000 Y=5.000000)
+ }
+ {POLYGON L=component T=COPPER W=0.1 ID=5 X=11.500000 Y=6.000000
+ (LINE X=12.500000 Y=6.000000)
+ (LINE X=12.500000 Y=6.500000)
+ (LINE X=11.500000 Y=6.500000)
+ (LINE X=11.500000 Y=6.000000)
+ }
+ {POLYGON L=component T=PLANE W=0.1 ID=6 X=11.500000 Y=7.000000
+ (LINE X=12.500000 Y=7.000000)
+ (LINE X=12.500000 Y=7.500000)
+ (LINE X=11.500000 Y=7.500000)
+ (LINE X=11.500000 Y=7.000000)
+ }
+}
+{NET=poly_clearance_tst2 PS=0.05
+ (VIA X=12.250000 Y=5.250000 P=0802pad)
+ (VIA X=12.250000 Y=6.250000 P=0802pad)
+ (VIA X=12.250000 Y=7.250000 P=0802pad)
+ (SEG X1=13.000000 Y1=5.250000 X2=12.250000 Y2=5.250000 W=0.04 L=component)
+ (SEG X1=13.000000 Y1=6.250000 X2=12.250000 Y2=6.250000 W=0.04 L=component)
+ (SEG X1=13.000000 Y1=7.250000 X2=12.250000 Y2=7.250000 W=0.04 L=component)
+ (SEG X1=13.000000 Y1=5.250000 X2=13.000000 Y2=6.250000 W=0.04 L=component)
+ (SEG X1=13.000000 Y1=6.250000 X2=13.000000 Y2=7.250000 W=0.04 L=component)
+}
+{END}
Index: src_plugins/plugins_io.tmpasm
===================================================================
--- src_plugins/plugins_io.tmpasm (revision 7963)
+++ src_plugins/plugins_io.tmpasm (revision 7964)
@@ -4,7 +4,6 @@
include {../src_plugins/import_netlist/Plug.tmpasm}
include {../src_plugins/import_sch/Plug.tmpasm}
include {../src_plugins/import_dsn/Plug.tmpasm}
-include {../src_plugins/import_hyp/Plug.tmpasm}
include {../src_plugins/import_mucs/Plug.tmpasm}
include {../src_plugins/import_ltspice/Plug.tmpasm}
include {../src_plugins/import_tinycad/Plug.tmpasm}
@@ -41,4 +40,5 @@
include {../src_plugins/io_kicad_legacy/Plug.tmpasm}
include {../src_plugins/io_kicad/Plug.tmpasm}
include {../src_plugins/io_eagle/Plug.tmpasm}
+include {../src_plugins/io_hyp/Plug.tmpasm}
include {../src_plugins/io_tedax/Plug.tmpasm}