Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 27088) +++ trunk/src/draw.c (revision 27089) @@ -174,12 +174,12 @@ if (plated && pcb_layer_gui_set_vlayer(PCB, PCB_VLY_PLATED_DRILL, 0, &info->xform_exporter)) { pcb_draw_pstk_holes(info, gid, PCB_PHOLE_PLATED); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } if (unplated && pcb_layer_gui_set_vlayer(PCB, PCB_VLY_UNPLATED_DRILL, 0, &info->xform_exporter)) { pcb_draw_pstk_holes(info, gid, PCB_PHOLE_UNPLATED); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } } @@ -191,22 +191,22 @@ if (pcb_layer_gui_set_vlayer(PCB, PCB_VLY_TOP_ASSY, 0, &info->xform_exporter)) { pcb_draw_assembly(info, PCB_LYT_TOP); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } if (pcb_layer_gui_set_vlayer(PCB, PCB_VLY_BOTTOM_ASSY, 0, &info->xform_exporter)) { pcb_draw_assembly(info, PCB_LYT_BOTTOM); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } if (pcb_layer_gui_set_vlayer(PCB, PCB_VLY_FAB, 0, &info->xform_exporter)) { pcb_stub_draw_fab(info, pcb_draw_out.fgGC, &hid_exp); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } if (pcb_layer_gui_set_vlayer(PCB, PCB_VLY_CSECT, 0, &info->xform_exporter)) { pcb_stub_draw_csect(pcb_draw_out.fgGC, &hid_exp); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } } @@ -240,7 +240,7 @@ } if (have_canvas) pcb_gui->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } } @@ -278,7 +278,7 @@ pcb_gui->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, drawn_area); pcb_draw_rats(drawn_area); pcb_gui->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, drawn_area); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } } @@ -367,7 +367,7 @@ pcb_gui->set_drawing_mode(pcb_gui, PCB_HID_COMP_RESET, pcb_draw_out.direct, info->drawn_area); pcb_gui->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); pcb_gui->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } /* Draw far side doc and silks */ @@ -398,7 +398,7 @@ } pcb_draw_layer_grp(info, group, is_current); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } } @@ -416,13 +416,13 @@ gid = pcb_layergrp_get_top_mask(); if ((gid >= 0) && (pcb_layer_gui_set_glayer(PCB, gid, 0, &info->xform_exporter))) { pcb_draw_mask(info, PCB_COMPONENT_SIDE); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } gid = pcb_layergrp_get_bottom_mask(); if ((gid >= 0) && (pcb_layer_gui_set_glayer(PCB, gid, 0, &info->xform_exporter))) { pcb_draw_mask(info, PCB_SOLDER_SIDE); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } /* Draw doc and silks */ @@ -448,7 +448,7 @@ paste_empty = pcb_layergrp_is_empty(PCB, gid); if ((gid >= 0) && (pcb_layer_gui_set_glayer(PCB, gid, paste_empty, &info->xform_exporter))) { pcb_draw_paste(info, PCB_COMPONENT_SIDE); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } gid = pcb_layergrp_get_bottom_paste(); @@ -456,7 +456,7 @@ paste_empty = pcb_layergrp_is_empty(PCB, gid); if ((gid >= 0) && (pcb_layer_gui_set_glayer(PCB, gid, paste_empty, &info->xform_exporter))) { pcb_draw_paste(info, PCB_SOLDER_SIDE); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } pcb_draw_boundary_mech(info); @@ -963,7 +963,7 @@ vtp0_truncate(&delayed_labels, 0); vtp0_truncate(&delayed_objs, 0); - pcb_gui = pcb_draw_out.hid = hid; + pcb_render = pcb_gui = pcb_draw_out.hid = hid; pcb_draw_out.fgGC = pcb_hid_make_gc(); pcb_draw_out.padGC = pcb_hid_make_gc(); pcb_draw_out.backpadGC = pcb_hid_make_gc(); @@ -1005,7 +1005,7 @@ vtp0_truncate(&delayed_objs, 0); memcpy(&pcb_draw_out, save, sizeof(pcb_output_t)); - pcb_gui = pcb_draw_out.hid; + pcb_render = pcb_gui = pcb_draw_out.hid; } void pcbhl_expose_main(pcb_hid_t * hid, const pcb_hid_expose_ctx_t *ctx, pcb_xform_t *xform_caller) @@ -1045,7 +1045,7 @@ pcb_gui->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, 1, &e->view); e->expose_cb(pcb_draw_out.fgGC, e); pcb_gui->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, 1, &e->view); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); expose_end(&save); } Index: trunk/src/draw_ly_spec.c =================================================================== --- trunk/src/draw_ly_spec.c (revision 27088) +++ trunk/src/draw_ly_spec.c (revision 27089) @@ -174,7 +174,7 @@ comp_finish(&cctx); } if (setgrp) - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } } @@ -255,7 +255,7 @@ pcb_draw_layer(info, ly); } pcb_gui->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } } @@ -273,7 +273,7 @@ pcb_gui->draw_rect(pcb_draw_out.fgGC, 0, 0, PCB->hidlib.size_x, PCB->hidlib.size_y); pcb_gui->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } /* draw slots */ @@ -288,7 +288,7 @@ pcb_gui->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); pcb_draw_pstk_slots(info, uslot->meta.real.grp, PCB_PHOLE_UNPLATED | PCB_PHOLE_BB); pcb_gui->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } } if ((pslot != NULL) && (pslot->meta.real.vis)) { @@ -297,7 +297,7 @@ pcb_gui->set_drawing_mode(pcb_gui, PCB_HID_COMP_POSITIVE, pcb_draw_out.direct, info->drawn_area); pcb_draw_pstk_slots(info, pslot->meta.real.grp, PCB_PHOLE_PLATED | PCB_PHOLE_BB); pcb_gui->set_drawing_mode(pcb_gui, PCB_HID_COMP_FLUSH, pcb_draw_out.direct, info->drawn_area); - pcb_gui->end_layer(pcb_gui); + pcb_render->end_layer(pcb_gui); } } } Index: trunk/src/hid.h =================================================================== --- trunk/src/hid.h (revision 27088) +++ trunk/src/hid.h (revision 27089) @@ -564,9 +564,15 @@ typedef void (*pcb_hid_expose_t)(pcb_hid_t *hid, const pcb_hid_expose_ctx_t *ctx); /* This is initially set to a "no-gui" GUI, and later reset by - main. hid_expose_callback also temporarily set it for drawing. */ + main. It is used for on-screen GUI calls, such as dialog boxes */ extern pcb_hid_t *pcb_gui; +/* This is initially set to a "no-gui" GUI, and later reset by + main. hid_expose_callback also temporarily set it for drawing. Normally + matches pcb_gui, but is temporarily changed while exporting. It is used + for drawing calls, mainly by draw*.c */ +extern pcb_hid_t *pcb_render; + /* This is either NULL or points to the current HID that is being called to do the exporting. The GUI HIDs set and unset this var.*/ extern pcb_hid_t *pcb_exporter; Index: trunk/src/hid_init.c =================================================================== --- trunk/src/hid_init.c (revision 27088) +++ trunk/src/hid_init.c (revision 27089) @@ -63,6 +63,7 @@ int pcb_hid_num_hids = 0; pcb_hid_t *pcb_gui = NULL; +pcb_hid_t *pcb_render = NULL; pcb_hid_t *pcb_exporter = NULL; int pcb_pixel_slop = 1; @@ -74,7 +75,7 @@ char *tmp; /* Setup a "nogui" default HID */ - pcb_gui = pcb_hid_nogui_get_hid(); + pcb_render = pcb_gui = pcb_hid_nogui_get_hid(); TODO("make this configurable - add to conf_board_ignores avoid plugin injection") tmp = pcb_concat(pcbhl_conf.rc.path.exec_prefix, PCB_DIR_SEPARATOR_S, "lib", PCB_DIR_SEPARATOR_S, "pcb-rnd", PCB_DIR_SEPARATOR_S, "plugins", PCB_DIR_SEPARATOR_S, HOST, NULL); @@ -382,7 +383,7 @@ apg = pcb_conf_list_next_str(apg, &g, &n); if (apg == NULL) goto ran_out_of_hids; - pcb_gui = pcb_hid_find_gui(g); + pcb_render = pcb_gui = pcb_hid_find_gui(g); } while(pcb_gui == NULL); } return 0; @@ -504,10 +505,10 @@ /* Export pcb from command line if requested. */ switch(ga->do_what) { - case DO_PRINT: pcb_exporter = pcb_gui = pcb_hid_find_printer(); break; - case DO_EXPORT: pcb_exporter = pcb_gui = pcb_hid_find_exporter(ga->hid_name); break; + case DO_PRINT: pcb_render = pcb_exporter = pcb_gui = pcb_hid_find_printer(); break; + case DO_EXPORT: pcb_render = pcb_exporter = pcb_gui = pcb_hid_find_exporter(ga->hid_name); break; case DO_GUI: - pcb_gui = pcb_hid_find_gui(ga->hid_name); + pcb_render = pcb_gui = pcb_hid_find_gui(ga->hid_name); if (pcb_gui == NULL) { pcb_message(PCB_MSG_ERROR, "Can't find the gui (%s) requested.\n", ga->hid_name); return 1; @@ -517,9 +518,9 @@ const char *g; pcb_conf_listitem_t *i; - pcb_gui = NULL; + pcb_render = pcb_gui = NULL; conf_loop_list_str(&pcbhl_conf.rc.preferred_gui, i, g, ga->autopick_gui) { - pcb_gui = pcb_hid_find_gui(g); + pcb_render = pcb_gui = pcb_hid_find_gui(g); if (pcb_gui != NULL) break; } @@ -527,7 +528,7 @@ /* try anything */ if (pcb_gui == NULL) { pcb_message(PCB_MSG_WARNING, "Warning: can't find any of the preferred GUIs, falling back to anything available...\nYou may want to check if the plugin is loaded, try --dump-plugins and --dump-plugindirs\n"); - pcb_gui = pcb_hid_find_gui(NULL); + pcb_render = pcb_gui = pcb_hid_find_gui(NULL); } } } Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 27088) +++ trunk/src/layer.c (revision 27089) @@ -1131,11 +1131,11 @@ *xform = NULL; TODO("layer: need to pass the flags of the group, not the flags of the layer once we have a group for each layer") - if (pcb_gui->set_layer_group != NULL) { + if (pcb_render->set_layer_group != NULL) { pcb_layergrp_id_t grp; pcb_layer_id_t lid = v->new_id; grp = pcb_layer_get_group(pcb, lid); - return pcb_gui->set_layer_group(pcb_gui, grp, v->purpose, v->purpi, lid, v->type, is_empty, xform); + return pcb_render->set_layer_group(pcb_gui, grp, v->purpose, v->purpi, lid, v->type, is_empty, xform); } /* if the GUI doesn't have a set_layer, assume it wants to draw all layers */ @@ -1151,8 +1151,8 @@ if (xform != NULL) *xform = NULL; - if (pcb_gui->set_layer_group != NULL) - return pcb_gui->set_layer_group(pcb_gui, -1, NULL, -1, pcb_layer_id(first->parent.data, first), PCB_LYT_VIRTUAL | PCB_LYT_UI, is_empty, xform); + if (pcb_render->set_layer_group != NULL) + return pcb_render->set_layer_group(pcb_gui, -1, NULL, -1, pcb_layer_id(first->parent.data, first), PCB_LYT_VIRTUAL | PCB_LYT_UI, is_empty, xform); /* if the GUI doesn't have a set_layer, assume it wants to draw all layers */ return 1; Index: trunk/src/layer_grp.c =================================================================== --- trunk/src/layer_grp.c (revision 27088) +++ trunk/src/layer_grp.c (revision 27089) @@ -686,8 +686,8 @@ if (xform != NULL) *xform = NULL; - if (pcb_gui->set_layer_group != NULL) - return pcb_gui->set_layer_group(pcb_gui, gid, grp->purpose, grp->purpi, grp->lid[0], grp->ltype, is_empty, xform); + if (pcb_render->set_layer_group != NULL) + return pcb_render->set_layer_group(pcb_gui, gid, grp->purpose, grp->purpi, grp->lid[0], grp->ltype, is_empty, xform); /* if the GUI doesn't have a set_layer, assume it wants to draw all layers */ return 1; Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 27088) +++ trunk/src/main.c (revision 27089) @@ -291,7 +291,7 @@ pcb_strflg_uninit_layerlist(); gui_support_plugins(0); - pcb_gui = NULL; + pcb_render = pcb_gui = NULL; pcb_hidlib_uninit(); /* plugin unload */ if (PCB != NULL) { Index: trunk/src_plugins/io_hyp/hyp_l.c =================================================================== --- trunk/src_plugins/io_hyp/hyp_l.c (revision 27088) +++ trunk/src_plugins/io_hyp/hyp_l.c (revision 27089) @@ -7,16 +7,21 @@ /* 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_scan_buffer hyy_scan_buffer +#define yy_scan_string hyy_scan_string +#define yy_scan_bytes hyy_scan_bytes #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 yypush_buffer_state hyypush_buffer_state +#define yypop_buffer_state hyypop_buffer_state +#define yyensure_buffer_stack hyyensure_buffer_stack +#define yy_flex_debug hyy_flex_debug #define yyin hyyin #define yyleng hyyleng #define yylex hyylex @@ -35,8 +40,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -45,11 +50,244 @@ /* %endif */ /* %if-c-only */ - +#ifdef yy_create_buffer +#define hyy_create_buffer_ALREADY_DEFINED +#else +#define yy_create_buffer hyy_create_buffer +#endif + +#ifdef yy_delete_buffer +#define hyy_delete_buffer_ALREADY_DEFINED +#else +#define yy_delete_buffer hyy_delete_buffer +#endif + +#ifdef yy_scan_buffer +#define hyy_scan_buffer_ALREADY_DEFINED +#else +#define yy_scan_buffer hyy_scan_buffer +#endif + +#ifdef yy_scan_string +#define hyy_scan_string_ALREADY_DEFINED +#else +#define yy_scan_string hyy_scan_string +#endif + +#ifdef yy_scan_bytes +#define hyy_scan_bytes_ALREADY_DEFINED +#else +#define yy_scan_bytes hyy_scan_bytes +#endif + +#ifdef yy_init_buffer +#define hyy_init_buffer_ALREADY_DEFINED +#else +#define yy_init_buffer hyy_init_buffer +#endif + +#ifdef yy_flush_buffer +#define hyy_flush_buffer_ALREADY_DEFINED +#else +#define yy_flush_buffer hyy_flush_buffer +#endif + +#ifdef yy_load_buffer_state +#define hyy_load_buffer_state_ALREADY_DEFINED +#else +#define yy_load_buffer_state hyy_load_buffer_state +#endif + +#ifdef yy_switch_to_buffer +#define hyy_switch_to_buffer_ALREADY_DEFINED +#else +#define yy_switch_to_buffer hyy_switch_to_buffer +#endif + +#ifdef yypush_buffer_state +#define hyypush_buffer_state_ALREADY_DEFINED +#else +#define yypush_buffer_state hyypush_buffer_state +#endif + +#ifdef yypop_buffer_state +#define hyypop_buffer_state_ALREADY_DEFINED +#else +#define yypop_buffer_state hyypop_buffer_state +#endif + +#ifdef yyensure_buffer_stack +#define hyyensure_buffer_stack_ALREADY_DEFINED +#else +#define yyensure_buffer_stack hyyensure_buffer_stack +#endif + +#ifdef yylex +#define hyylex_ALREADY_DEFINED +#else +#define yylex hyylex +#endif + +#ifdef yyrestart +#define hyyrestart_ALREADY_DEFINED +#else +#define yyrestart hyyrestart +#endif + +#ifdef yylex_init +#define hyylex_init_ALREADY_DEFINED +#else +#define yylex_init hyylex_init +#endif + +#ifdef yylex_init_extra +#define hyylex_init_extra_ALREADY_DEFINED +#else +#define yylex_init_extra hyylex_init_extra +#endif + +#ifdef yylex_destroy +#define hyylex_destroy_ALREADY_DEFINED +#else +#define yylex_destroy hyylex_destroy +#endif + +#ifdef yyget_debug +#define hyyget_debug_ALREADY_DEFINED +#else +#define yyget_debug hyyget_debug +#endif + +#ifdef yyset_debug +#define hyyset_debug_ALREADY_DEFINED +#else +#define yyset_debug hyyset_debug +#endif + +#ifdef yyget_extra +#define hyyget_extra_ALREADY_DEFINED +#else +#define yyget_extra hyyget_extra +#endif + +#ifdef yyset_extra +#define hyyset_extra_ALREADY_DEFINED +#else +#define yyset_extra hyyset_extra +#endif + +#ifdef yyget_in +#define hyyget_in_ALREADY_DEFINED +#else +#define yyget_in hyyget_in +#endif + +#ifdef yyset_in +#define hyyset_in_ALREADY_DEFINED +#else +#define yyset_in hyyset_in +#endif + +#ifdef yyget_out +#define hyyget_out_ALREADY_DEFINED +#else +#define yyget_out hyyget_out +#endif + +#ifdef yyset_out +#define hyyset_out_ALREADY_DEFINED +#else +#define yyset_out hyyset_out +#endif + +#ifdef yyget_leng +#define hyyget_leng_ALREADY_DEFINED +#else +#define yyget_leng hyyget_leng +#endif + +#ifdef yyget_text +#define hyyget_text_ALREADY_DEFINED +#else +#define yyget_text hyyget_text +#endif + +#ifdef yyget_lineno +#define hyyget_lineno_ALREADY_DEFINED +#else +#define yyget_lineno hyyget_lineno +#endif + +#ifdef yyset_lineno +#define hyyset_lineno_ALREADY_DEFINED +#else +#define yyset_lineno hyyset_lineno +#endif + +#ifdef yywrap +#define hyywrap_ALREADY_DEFINED +#else +#define yywrap hyywrap +#endif + /* %endif */ +#ifdef yyalloc +#define hyyalloc_ALREADY_DEFINED +#else +#define yyalloc hyyalloc +#endif + +#ifdef yyrealloc +#define hyyrealloc_ALREADY_DEFINED +#else +#define yyrealloc hyyrealloc +#endif + +#ifdef yyfree +#define hyyfree_ALREADY_DEFINED +#else +#define yyfree hyyfree +#endif + /* %if-c-only */ +#ifdef yytext +#define hyytext_ALREADY_DEFINED +#else +#define yytext hyytext +#endif + +#ifdef yyleng +#define hyyleng_ALREADY_DEFINED +#else +#define yyleng hyyleng +#endif + +#ifdef yyin +#define hyyin_ALREADY_DEFINED +#else +#define yyin hyyin +#endif + +#ifdef yyout +#define hyyout_ALREADY_DEFINED +#else +#define yyout hyyout +#endif + +#ifdef yy_flex_debug +#define hyy_flex_debug_ALREADY_DEFINED +#else +#define yy_flex_debug hyy_flex_debug +#endif + +#ifdef yylineno +#define hyylineno_ALREADY_DEFINED +#else +#define yylineno hyylineno +#endif + /* %endif */ /* First, we deal with platform-specific or compiler-specific issues. */ @@ -127,6 +365,10 @@ #define UINT32_MAX (4294967295U) #endif +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + #endif /* ! C99 */ #endif /* ! FLEXINT_H */ @@ -133,44 +375,29 @@ /* %endif */ +/* begin standard C++ headers. */ /* %if-c++-only */ /* %endif */ -#ifdef __cplusplus +/* TODO: this is always defined, so inline it */ +#define yyconst const -/* 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 +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #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. +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* %ok-for-header */ /* %if-reentrant */ @@ -185,7 +412,6 @@ * 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. @@ -192,13 +418,10 @@ */ #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_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -223,13 +446,18 @@ 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 int hyyleng; +extern int yyleng; /* %endif */ /* %if-c-only */ /* %if-not-reentrant */ -extern FILE *hyyin, *hyyout; +extern FILE *yyin, *yyout; /* %endif */ /* %endif */ @@ -236,43 +464,44 @@ #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. + * existing scanners that call yyless() from OUTSIDE yylex. * 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 + * a 5% performance hit in a non-yylineno 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;\ + for ( yyl = n; yyl < yyleng; ++yyl )\ + if ( yytext[yyl] == '\n' )\ + --yylineno;\ }while(0) + #define YY_LINENO_REWIND_TO(dst) \ + do {\ + const char *p;\ + for ( p = yy_cp-1; p >= (dst); --p)\ + if ( *p == '\n' )\ + --yylineno;\ + }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. */ \ + /* Undo effects of setting up yytext. */ \ 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 */ \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) - #define unput(c) yyunput( c, (yytext_ptr) ) -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -290,7 +519,7 @@ /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -318,7 +547,7 @@ 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. */ @@ -335,8 +564,8 @@ * 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. + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 @@ -345,13 +574,12 @@ /* %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. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* %endif */ /* %ok-for-header */ @@ -366,7 +594,6 @@ #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. */ @@ -376,19 +603,18 @@ /* %if-not-reentrant */ /* %not-for-header */ - -/* yy_hold_char holds the character lost when hyytext is formed. */ +/* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int hyyleng; +int yyleng; /* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; +static char *yy_c_buf_p = NULL; 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 ... +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; /* %ok-for-header */ @@ -395,96 +621,94 @@ /* %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 ); +void yyrestart ( FILE *input_file ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); +void yy_delete_buffer ( YY_BUFFER_STATE b ); +void yy_flush_buffer ( YY_BUFFER_STATE b ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); +void yypop_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 ); +static void yyensure_buffer_stack ( void ); +static void yy_load_buffer_state ( void ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) -#define YY_FLUSH_BUFFER hyy_flush_buffer(YY_CURRENT_BUFFER ) +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); -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,int len ); - /* %endif */ -void *hyyalloc (yy_size_t ); -void *hyyrealloc (void *,yy_size_t ); -void hyyfree (void * ); +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); -#define yy_new_buffer hyy_create_buffer - +#define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ - hyyensure_buffer_stack (); \ + yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ - hyy_create_buffer(hyyin,YY_BUF_SIZE ); \ + yy_create_buffer( yyin, 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 (); \ + yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ - hyy_create_buffer(hyyin,YY_BUF_SIZE ); \ + yy_create_buffer( yyin, 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 */ +/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ /* Begin user sect3 */ -#define hyywrap(n) 1 +#define hyywrap() (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define FLEX_DEBUG +typedef flex_uint8_t YY_CHAR; -typedef unsigned char YY_CHAR; +FILE *yyin = NULL, *yyout = NULL; -FILE *hyyin = (FILE *) 0, *hyyout = (FILE *) 0; - typedef int yy_state_type; -extern int hyylineno; +extern int yylineno; +int yylineno = 1; -int hyylineno = 1; +extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif +#define yytext_ptr yytext -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[] ); +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 yynoreturn yy_fatal_error ( const char* msg ); /* %endif */ /* Done after the current pattern has been matched and before the - * corresponding action - sets up hyytext. + * corresponding action - sets up yytext. */ #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); \ +/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\ + yyleng = (int) (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 \ */\ +/* %% [3.0] code to copy yytext_ptr to yytext[] 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 138 #define YY_END_OF_BUFFER 139 @@ -495,7 +719,7 @@ flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_acclist[861] = +static const flex_int16_t yy_acclist[861] = { 0, 1, 1, 139, 135, 137, 138, 4, 137, 138, 5, 138, 5, 137, 138, 137, 138, 131, 137, 138, 132, @@ -593,7 +817,7 @@ 128, 35, 135, 135, 128, 128, 128, 89, 128, 128 } ; -static yyconst flex_int16_t yy_accept[771] = +static const flex_int16_t yy_accept[771] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 4, 7, 10, 12, 15, 17, 20, @@ -681,7 +905,7 @@ 855, 856, 856, 857, 858, 858, 859, 860, 861, 861 } ; -static yyconst flex_int32_t yy_ec[256] = +static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, @@ -713,7 +937,7 @@ 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[58] = +static const YY_CHAR yy_meta[58] = { 0, 1, 2, 3, 4, 5, 4, 4, 4, 1, 1, 1, 1, 6, 6, 6, 7, 1, 8, 8, 8, @@ -723,7 +947,7 @@ 8, 8, 8, 8, 8, 4, 9 } ; -static yyconst flex_int16_t yy_base[876] = +static const flex_int16_t yy_base[876] = { 0, 0, 1927, 56, 112, 168, 224, 56, 63, 280, 336, 392, 448, 1935, 0, 77, 77, 80, 1928, 0, 4391, @@ -823,7 +1047,7 @@ 4351, 4358, 4365, 4373, 4381 } ; -static yyconst flex_int16_t yy_def[876] = +static const flex_int16_t yy_def[876] = { 0, 769, 1, 770, 770, 771, 771, 6, 6, 772, 772, 773, 773, 769, 774, 769, 769, 769, 775, 776, 769, @@ -923,7 +1147,7 @@ 769, 769, 769, 769, 769 } ; -static yyconst flex_int16_t yy_nxt[4449] = +static const flex_int16_t yy_nxt[4449] = { 0, 14, 15, 16, 17, 15, 18, 19, 20, 14, 21, 22, 23, 24, 24, 24, 25, 14, 26, 27, 28, @@ -1416,7 +1640,7 @@ 769, 769, 769, 769, 769, 769, 769, 769 } ; -static yyconst flex_int16_t yy_chk[4449] = +static const flex_int16_t yy_chk[4449] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1910,7 +2134,7 @@ } ; /* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[139] = +static const flex_int32_t yy_rule_can_match_eol[139] = { 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, @@ -1920,26 +2144,26 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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; +extern int yy_flex_debug; +int yy_flex_debug = 1; -static yyconst flex_int16_t yy_rule_linenum[138] = +static const flex_int16_t yy_rule_linenum[138] = { 0, - 143, 148, 155, 157, 159, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 222, 223, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 240, 242, 243, 244, 245, 246, 247, 248, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 144, 149, 156, 158, 160, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, - 271, 272, 273, 274, 275, 279, 280, 285, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 301, 302, 303, 307, 312, 327, 329, 361, 363, - 365, 368, 370, 372, 375, 391, 396 + 272, 273, 274, 275, 276, 280, 281, 286, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 308, 313, 328, 330, 362, 364, + 366, 369, 371, 373, 376, 392, 397 } ; static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; @@ -1947,7 +2171,7 @@ static int yy_lp; #define REJECT \ { \ -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ \ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \ yy_cp = (yy_full_match); /* restore poss. backed-over text */ \ ++(yy_lp); \ goto find_rule; \ @@ -1956,7 +2180,7 @@ #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET -char *hyytext; +char *yytext; #line 1 "hyp_l.l" /* * read hyperlynx files @@ -1994,54 +2218,56 @@ /* 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. -* -*/ +#line 2222 "hyp_l.c" +#line 46 "hyp_l.l" + /* + * 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 sequence of characters, excluding whitespace and reserved characters. -* also allow strings such as "(Net0)" . -*/ -/* a string enclosed in double quotes " */ + /* 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 sequence of characters, excluding whitespace and reserved characters. + * also allow strings such as "(Net0)" . + */ + /* a string enclosed in double quotes " */ /* an unquoted string with spaces */ /* all variables used in assignments */ /* an unquoted string with spaces is terminated by the next assignment or the end of line */ /* an empty string is terminated by the next assignment, a ')' or a '}' */ -#line 2045 "hyp_l.c" +#line 2271 "hyp_l.c" #define INITIAL 0 #define STATE_STRING 1 @@ -2070,7 +2296,7 @@ /* %if-reentrant */ /* %if-c-only */ -static int yy_init_globals (void ); +static int yy_init_globals ( void ); /* %endif */ /* %if-reentrant */ @@ -2080,31 +2306,31 @@ /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int hyylex_destroy (void ); +int yylex_destroy ( void ); -int hyyget_debug (void ); +int yyget_debug ( void ); -void hyyset_debug (int debug_flag ); +void yyset_debug ( int debug_flag ); -YY_EXTRA_TYPE hyyget_extra (void ); +YY_EXTRA_TYPE yyget_extra ( void ); -void hyyset_extra (YY_EXTRA_TYPE user_defined ); +void yyset_extra ( YY_EXTRA_TYPE user_defined ); -FILE *hyyget_in (void ); +FILE *yyget_in ( void ); -void hyyset_in (FILE * in_str ); +void yyset_in ( FILE * _in_str ); -FILE *hyyget_out (void ); +FILE *yyget_out ( void ); -void hyyset_out (FILE * out_str ); +void yyset_out ( FILE * _out_str ); -int hyyget_leng (void ); + int yyget_leng ( void ); -char *hyyget_text (void ); +char *yyget_text ( void ); -int hyyget_lineno (void ); +int yyget_lineno ( void ); -void hyyset_lineno (int line_number ); +void yyset_lineno ( int _line_number ); /* %if-bison-bridge */ /* %endif */ @@ -2115,36 +2341,37 @@ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int hyywrap (void ); +extern "C" int yywrap ( void ); #else -extern int hyywrap (void ); +extern int yywrap ( void ); #endif #endif /* %not-for-header */ - - static void yyunput (int c,char *buf_ptr ); +#ifndef YY_NO_UNPUT + static void yyunput ( int c, char *buf_ptr ); + +#endif /* %ok-for-header */ /* %endif */ #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); +static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); +static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT /* %if-c-only Standard (non-C++) definition */ /* %not-for-header */ - #ifdef __cplusplus -static int yyinput (void ); +static int yyinput ( void ); #else -static int input (void ); +static int input ( void ); #endif /* %ok-for-header */ @@ -2171,7 +2398,7 @@ /* 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) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) /* %endif */ /* %if-c++-only C++ definition */ /* %endif */ @@ -2186,13 +2413,13 @@ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + int n; \ for ( n = 0; n < max_size && \ - (c = getc( hyyin )) != EOF && c != '\n'; ++n ) \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ - if ( c == EOF && ferror( hyyin ) ) \ + if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ @@ -2199,7 +2426,7 @@ else \ { \ errno=0; \ - while ( (result = fread(buf, 1, max_size, hyyin))==0 && ferror(hyyin)) \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -2207,7 +2434,7 @@ break; \ } \ errno=0; \ - clearerr(hyyin); \ + clearerr(yyin); \ } \ }\ \ @@ -2240,11 +2467,9 @@ /* %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 */ @@ -2258,15 +2483,15 @@ #define YY_DECL_IS_OURS 1 /* %if-c-only Standard (non-C++) definition */ -extern int hyylex (void); +extern int yylex (void); -#define YY_DECL int hyylex (void) +#define YY_DECL int yylex (void) /* %endif */ /* %if-c++-only C++ definition */ /* %endif */ #endif /* !YY_DECL */ -/* Code executed at the beginning of each rule, after hyytext and hyyleng +/* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION @@ -2275,33 +2500,25 @@ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif /* %% [6.0] YY_RULE_SETUP definition goes here */ #define YY_RULE_SETUP \ - if ( hyyleng > 0 ) \ + if ( yyleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (hyytext[hyyleng - 1] == '\n'); \ + (yytext[yyleng - 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; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; -/* %% [7.0] user's declarations go here */ -#line 139 "hyp_l.l" - - - /* When in STATE_COMMENT skip all comment until next right brace */ -#line 2304 "hyp_l.c" - if ( !(yy_init) ) { (yy_init) = 1; @@ -2312,42 +2529,50 @@ /* 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 ); + (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE ); if ( ! (yy_state_buf) ) - YY_FATAL_ERROR( "out of dynamic memory in hyylex()" ); + YY_FATAL_ERROR( "out of dynamic memory in yylex()" ); if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ - if ( ! hyyin ) + if ( ! yyin ) /* %if-c-only */ - hyyin = stdin; + yyin = stdin; /* %endif */ /* %if-c++-only */ /* %endif */ - if ( ! hyyout ) + if ( ! yyout ) /* %if-c-only */ - hyyout = stdout; + yyout = stdout; /* %endif */ /* %if-c++-only */ /* %endif */ if ( ! YY_CURRENT_BUFFER ) { - hyyensure_buffer_stack (); + yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = - hyy_create_buffer(hyyin,YY_BUF_SIZE ); + yy_create_buffer( yyin, YY_BUF_SIZE ); } - hyy_load_buffer_state( ); + yy_load_buffer_state( ); } - while ( 1 ) /* loops until end-of-file is reached */ + { +/* %% [7.0] user's declarations go here */ +#line 140 "hyp_l.l" + + + /* When in STATE_COMMENT skip all comment until next right brace */ +#line 2569 "hyp_l.c" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { /* %% [8.0] yymore()-related code goes here */ yy_cp = (yy_c_buf_p); - /* Support of hyytext. */ + /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of @@ -2365,14 +2590,14 @@ yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + 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 >= 770 ) - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; *(yy_state_ptr)++ = yy_current_state; ++yy_cp; } @@ -2382,7 +2607,9 @@ /* %% [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] ) @@ -2400,15 +2627,15 @@ YY_DO_BEFORE_ACTION; -/* %% [11.0] code for hyylineno update goes here */ +/* %% [11.0] code for yylineno update goes here */ if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { int yyl; - for ( yyl = 0; yyl < hyyleng; ++yyl ) - if ( hyytext[yyl] == '\n' ) - - hyylineno++; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + + yylineno++; ; } @@ -2415,16 +2642,16 @@ do_action: /* This label is used only to access EOF actions. */ /* %% [12.0] debug code goes here */ - if ( hyy_flex_debug ) + if ( yy_flex_debug ) { if ( yy_act == 0 ) fprintf( stderr, "--scanner backing up\n" ); else if ( yy_act < 138 ) fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n", - (long)yy_rule_linenum[yy_act], hyytext ); + (long)yy_rule_linenum[yy_act], yytext ); else if ( yy_act == 138 ) fprintf( stderr, "--accepting default rule (\"%s\")\n", - hyytext ); + yytext ); else if ( yy_act == 139 ) fprintf( stderr, "--(end of buffer or a NUL)\n" ); else @@ -2438,7 +2665,7 @@ case 1: /* rule 1 can match eol */ YY_RULE_SETUP -#line 143 "hyp_l.l" +#line 144 "hyp_l.l" { BEGIN INITIAL; /* skip all comment until next right brace */ } YY_BREAK @@ -2447,7 +2674,7 @@ case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 148 "hyp_l.l" +#line 149 "hyp_l.l" { BEGIN INITIAL; /* skip all comment until next end-of-line */ } YY_BREAK @@ -2456,18 +2683,18 @@ case 3: /* rule 3 can match eol */ YY_RULE_SETUP -#line 155 "hyp_l.l" +#line 156 "hyp_l.l" { /* skip comments */ } YY_BREAK case 4: YY_RULE_SETUP -#line 157 "hyp_l.l" +#line 158 "hyp_l.l" { /* skip whitespace */ } YY_BREAK case 5: /* rule 5 can match eol */ YY_RULE_SETUP -#line 159 "hyp_l.l" +#line 160 "hyp_l.l" { /* skip newlines */ } YY_BREAK @@ -2477,675 +2704,675 @@ /* Sections */ case 6: YY_RULE_SETUP -#line 169 "hyp_l.l" +#line 170 "hyp_l.l" {section = H_BOARD_FILE; return H_BOARD_FILE;} YY_BREAK case 7: YY_RULE_SETUP -#line 170 "hyp_l.l" +#line 171 "hyp_l.l" {section = H_VERSION; return H_VERSION;} YY_BREAK case 8: YY_RULE_SETUP -#line 171 "hyp_l.l" +#line 172 "hyp_l.l" {section = H_DATA_MODE; return H_DATA_MODE;} YY_BREAK case 9: YY_RULE_SETUP -#line 172 "hyp_l.l" +#line 173 "hyp_l.l" {section = H_UNITS; return H_UNITS;} YY_BREAK case 10: YY_RULE_SETUP -#line 173 "hyp_l.l" +#line 174 "hyp_l.l" {section = H_PLANE_SEP; return H_PLANE_SEP;} YY_BREAK case 11: YY_RULE_SETUP -#line 174 "hyp_l.l" +#line 175 "hyp_l.l" {section = H_BOARD; BEGIN STATE_COMMENT_EOL; return H_BOARD;} YY_BREAK case 12: YY_RULE_SETUP -#line 175 "hyp_l.l" +#line 176 "hyp_l.l" {section = H_STACKUP; BEGIN STATE_COMMENT_EOL; return H_STACKUP;} YY_BREAK case 13: YY_RULE_SETUP -#line 176 "hyp_l.l" +#line 177 "hyp_l.l" {section = H_DEVICES; BEGIN STATE_COMMENT_EOL; return H_DEVICES;} YY_BREAK case 14: YY_RULE_SETUP -#line 177 "hyp_l.l" +#line 178 "hyp_l.l" {section = H_SUPPLIES; BEGIN STATE_COMMENT_EOL; return H_SUPPLIES;} YY_BREAK case 15: YY_RULE_SETUP -#line 178 "hyp_l.l" +#line 179 "hyp_l.l" {section = H_PADSTACK; BEGIN STATE_STRING; return H_PADSTACK;} YY_BREAK case 16: YY_RULE_SETUP -#line 179 "hyp_l.l" +#line 180 "hyp_l.l" {section = H_NET; BEGIN STATE_STRING; return H_NET;} YY_BREAK case 17: YY_RULE_SETUP -#line 180 "hyp_l.l" +#line 181 "hyp_l.l" {section = H_NET_CLASS; return H_NET_CLASS;} YY_BREAK case 18: YY_RULE_SETUP -#line 181 "hyp_l.l" +#line 182 "hyp_l.l" {section = H_END; return H_END;} YY_BREAK case 19: YY_RULE_SETUP -#line 182 "hyp_l.l" +#line 183 "hyp_l.l" {section = H_KEY; return H_KEY;} YY_BREAK /* Keywords */ case 20: YY_RULE_SETUP -#line 186 "hyp_l.l" +#line 187 "hyp_l.l" {return H_A;} YY_BREAK case 21: YY_RULE_SETUP -#line 187 "hyp_l.l" +#line 188 "hyp_l.l" {return H_ARC;} YY_BREAK case 22: YY_RULE_SETUP -#line 188 "hyp_l.l" +#line 189 "hyp_l.l" {return H_COPPER;} YY_BREAK case 23: YY_RULE_SETUP -#line 189 "hyp_l.l" +#line 190 "hyp_l.l" {return H_CURVE;} YY_BREAK case 24: YY_RULE_SETUP -#line 190 "hyp_l.l" +#line 191 "hyp_l.l" {if (section == H_DATA_MODE) BEGIN STATE_COMMENT; return H_DETAILED;} YY_BREAK case 25: YY_RULE_SETUP -#line 191 "hyp_l.l" +#line 192 "hyp_l.l" {return H_DIELECTRIC;} YY_BREAK case 26: YY_RULE_SETUP -#line 192 "hyp_l.l" +#line 193 "hyp_l.l" {return H_ENGLISH;} YY_BREAK case 27: YY_RULE_SETUP -#line 193 "hyp_l.l" +#line 194 "hyp_l.l" {if (section == H_UNITS) BEGIN STATE_COMMENT; return H_LENGTH;} YY_BREAK case 28: YY_RULE_SETUP -#line 194 "hyp_l.l" +#line 195 "hyp_l.l" {return H_LINE;} YY_BREAK case 29: YY_RULE_SETUP -#line 195 "hyp_l.l" +#line 196 "hyp_l.l" {return H_METRIC;} YY_BREAK case 30: YY_RULE_SETUP -#line 196 "hyp_l.l" +#line 197 "hyp_l.l" {return H_M;} YY_BREAK case 31: YY_RULE_SETUP -#line 197 "hyp_l.l" +#line 198 "hyp_l.l" {return H_N;} YY_BREAK case 32: YY_RULE_SETUP -#line 198 "hyp_l.l" +#line 199 "hyp_l.l" {return H_OPTIONS;} YY_BREAK case 33: YY_RULE_SETUP -#line 199 "hyp_l.l" +#line 200 "hyp_l.l" {return H_PAD;} YY_BREAK case 34: YY_RULE_SETUP -#line 200 "hyp_l.l" +#line 201 "hyp_l.l" {return H_PERIMETER_ARC;} YY_BREAK case 35: YY_RULE_SETUP -#line 201 "hyp_l.l" +#line 202 "hyp_l.l" {return H_PERIMETER_SEGMENT;} YY_BREAK case 36: YY_RULE_SETUP -#line 202 "hyp_l.l" +#line 203 "hyp_l.l" {return H_PIN;} YY_BREAK case 37: YY_RULE_SETUP -#line 203 "hyp_l.l" +#line 204 "hyp_l.l" {return H_PLANE;} YY_BREAK case 38: YY_RULE_SETUP -#line 204 "hyp_l.l" +#line 205 "hyp_l.l" {return H_POLYGON;} YY_BREAK case 39: YY_RULE_SETUP -#line 205 "hyp_l.l" +#line 206 "hyp_l.l" {return H_POLYLINE;} YY_BREAK case 40: YY_RULE_SETUP -#line 206 "hyp_l.l" +#line 207 "hyp_l.l" {return H_POLYVOID;} YY_BREAK case 41: YY_RULE_SETUP -#line 207 "hyp_l.l" +#line 208 "hyp_l.l" {return H_POUR;} YY_BREAK case 42: YY_RULE_SETUP -#line 208 "hyp_l.l" +#line 209 "hyp_l.l" {return H_S;} YY_BREAK case 43: YY_RULE_SETUP -#line 209 "hyp_l.l" +#line 210 "hyp_l.l" {return H_T;} YY_BREAK case 44: YY_RULE_SETUP -#line 210 "hyp_l.l" +#line 211 "hyp_l.l" {return H_SEG;} YY_BREAK case 45: YY_RULE_SETUP -#line 211 "hyp_l.l" +#line 212 "hyp_l.l" {return H_SIGNAL;} YY_BREAK case 46: YY_RULE_SETUP -#line 212 "hyp_l.l" +#line 213 "hyp_l.l" {if (section == H_DATA_MODE) BEGIN STATE_COMMENT; return H_SIMPLIFIED; } YY_BREAK case 47: YY_RULE_SETUP -#line 213 "hyp_l.l" +#line 214 "hyp_l.l" {return H_SIM_BOTH;} YY_BREAK case 48: YY_RULE_SETUP -#line 214 "hyp_l.l" +#line 215 "hyp_l.l" {return H_SIM_IN;} YY_BREAK case 49: YY_RULE_SETUP -#line 215 "hyp_l.l" +#line 216 "hyp_l.l" {return H_SIM_OUT;} YY_BREAK case 50: YY_RULE_SETUP -#line 216 "hyp_l.l" +#line 217 "hyp_l.l" {return H_USEG;} YY_BREAK case 51: YY_RULE_SETUP -#line 217 "hyp_l.l" +#line 218 "hyp_l.l" {return H_VIA;} YY_BREAK case 52: YY_RULE_SETUP -#line 218 "hyp_l.l" +#line 219 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 222 "hyp_l.l" +#line 223 "hyp_l.l" {return H_A;} YY_BREAK case 54: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 223 "hyp_l.l" +#line 224 "hyp_l.l" {return H_A1;} YY_BREAK case 55: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 224 "hyp_l.l" +#line 225 "hyp_l.l" {return H_A2;} YY_BREAK case 56: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 225 "hyp_l.l" +#line 226 "hyp_l.l" {return H_BR;} YY_BREAK case 57: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 226 "hyp_l.l" +#line 227 "hyp_l.l" {return H_C;} YY_BREAK case 58: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 227 "hyp_l.l" +#line 228 "hyp_l.l" {return H_C_QM;} YY_BREAK case 59: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 3; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 228 "hyp_l.l" +#line 229 "hyp_l.l" {return H_CO_QM;} YY_BREAK case 60: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 229 "hyp_l.l" +#line 230 "hyp_l.l" {return H_D;} YY_BREAK case 61: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 230 "hyp_l.l" +#line 231 "hyp_l.l" {return H_ER;} YY_BREAK case 62: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 231 "hyp_l.l" +#line 232 "hyp_l.l" {return H_F;} YY_BREAK case 63: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 232 "hyp_l.l" +#line 233 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 233 "hyp_l.l" +#line 234 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 234 "hyp_l.l" +#line 235 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 235 "hyp_l.l" +#line 236 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 3; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 236 "hyp_l.l" +#line 237 "hyp_l.l" {return H_LPS;} YY_BREAK case 68: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 237 "hyp_l.l" +#line 238 "hyp_l.l" {return H_LT;} YY_BREAK case 69: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 238 "hyp_l.l" +#line 239 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 239 "hyp_l.l" +#line 240 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 4; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 240 "hyp_l.l" +#line 241 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 242 "hyp_l.l" +#line 243 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 3; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 243 "hyp_l.l" +#line 244 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 3; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 244 "hyp_l.l" +#line 245 "hyp_l.l" {return H_PR_QM;} YY_BREAK case 75: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 245 "hyp_l.l" +#line 246 "hyp_l.l" {return H_PS;} YY_BREAK case 76: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 246 "hyp_l.l" +#line 247 "hyp_l.l" {return H_R;} YY_BREAK case 77: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 3; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 247 "hyp_l.l" +#line 248 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 248 "hyp_l.l" +#line 249 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 249 "hyp_l.l" +#line 250 "hyp_l.l" {return H_SX;} YY_BREAK case 80: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 250 "hyp_l.l" +#line 251 "hyp_l.l" {return H_SY;} YY_BREAK case 81: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 251 "hyp_l.l" +#line 252 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 3; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 252 "hyp_l.l" +#line 253 "hyp_l.l" {return H_S1X;} YY_BREAK case 83: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 3; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 253 "hyp_l.l" +#line 254 "hyp_l.l" {return H_S1Y;} YY_BREAK case 84: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 254 "hyp_l.l" +#line 255 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 3; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 255 "hyp_l.l" +#line 256 "hyp_l.l" {return H_S2X;} YY_BREAK case 86: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 3; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 256 "hyp_l.l" +#line 257 "hyp_l.l" {return H_S2Y;} YY_BREAK case 87: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 257 "hyp_l.l" +#line 258 "hyp_l.l" {return H_T;} YY_BREAK case 88: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 258 "hyp_l.l" +#line 259 "hyp_l.l" {return H_TC;} YY_BREAK case 89: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 17; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 259 "hyp_l.l" +#line 260 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 260 "hyp_l.l" +#line 261 "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_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 261 "hyp_l.l" +#line 262 "hyp_l.l" {return H_V_QM;} YY_BREAK case 92: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 3; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 262 "hyp_l.l" +#line 263 "hyp_l.l" {if (section == H_DEVICES) BEGIN STATE_STRING; return H_VAL;} YY_BREAK case 93: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 263 "hyp_l.l" +#line 264 "hyp_l.l" {return H_W;} YY_BREAK case 94: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 264 "hyp_l.l" +#line 265 "hyp_l.l" {return H_X;} YY_BREAK case 95: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 265 "hyp_l.l" +#line 266 "hyp_l.l" {return H_X1;} YY_BREAK case 96: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 266 "hyp_l.l" +#line 267 "hyp_l.l" {return H_X2;} YY_BREAK case 97: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 267 "hyp_l.l" +#line 268 "hyp_l.l" {return H_XC;} YY_BREAK case 98: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 268 "hyp_l.l" +#line 269 "hyp_l.l" {return H_Y;} YY_BREAK case 99: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 269 "hyp_l.l" +#line 270 "hyp_l.l" {return H_Y1;} YY_BREAK case 100: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 270 "hyp_l.l" +#line 271 "hyp_l.l" {return H_Y2;} YY_BREAK case 101: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 271 "hyp_l.l" +#line 272 "hyp_l.l" {return H_YC;} YY_BREAK case 102: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 272 "hyp_l.l" +#line 273 "hyp_l.l" {return H_Z;} YY_BREAK case 103: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 273 "hyp_l.l" +#line 274 "hyp_l.l" {BEGIN STATE_STRING; return H_ZL;} YY_BREAK case 104: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 4; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 274 "hyp_l.l" +#line 275 "hyp_l.l" {return H_ZLEN;} YY_BREAK case 105: -*yy_cp = (yy_hold_char); /* undo effects of setting up hyytext */ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; -YY_DO_BEFORE_ACTION; /* set up hyytext again */ +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 275 "hyp_l.l" +#line 276 "hyp_l.l" {return H_ZW;} YY_BREAK /* Booleans */ case 106: YY_RULE_SETUP -#line 279 "hyp_l.l" +#line 280 "hyp_l.l" {hyylval.boolval = 1; return H_BOOL; } YY_BREAK case 107: YY_RULE_SETUP -#line 280 "hyp_l.l" +#line 281 "hyp_l.l" {hyylval.boolval = 0; return H_BOOL; } YY_BREAK /* Floats */ @@ -3152,88 +3379,88 @@ /* ordinary floating point numbers */ case 108: YY_RULE_SETUP -#line 285 "hyp_l.l" +#line 286 "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 288 "hyp_l.l" +#line 289 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e24; return H_FLOAT;} YY_BREAK case 110: YY_RULE_SETUP -#line 289 "hyp_l.l" +#line 290 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e21; return H_FLOAT;} YY_BREAK case 111: YY_RULE_SETUP -#line 290 "hyp_l.l" +#line 291 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e18; return H_FLOAT;} YY_BREAK case 112: YY_RULE_SETUP -#line 291 "hyp_l.l" +#line 292 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e15; return H_FLOAT;} YY_BREAK case 113: YY_RULE_SETUP -#line 292 "hyp_l.l" +#line 293 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e12; return H_FLOAT;} YY_BREAK case 114: YY_RULE_SETUP -#line 293 "hyp_l.l" +#line 294 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e9; return H_FLOAT;} YY_BREAK case 115: YY_RULE_SETUP -#line 294 "hyp_l.l" +#line 295 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e6; return H_FLOAT;} YY_BREAK case 116: YY_RULE_SETUP -#line 295 "hyp_l.l" +#line 296 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e3; return H_FLOAT;} YY_BREAK case 117: YY_RULE_SETUP -#line 296 "hyp_l.l" +#line 297 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e-3; return H_FLOAT;} YY_BREAK case 118: YY_RULE_SETUP -#line 297 "hyp_l.l" +#line 298 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e-6; return H_FLOAT;} YY_BREAK case 119: YY_RULE_SETUP -#line 298 "hyp_l.l" +#line 299 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e-9; return H_FLOAT;} YY_BREAK case 120: YY_RULE_SETUP -#line 299 "hyp_l.l" +#line 300 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e-12; return H_FLOAT;} YY_BREAK case 121: YY_RULE_SETUP -#line 300 "hyp_l.l" +#line 301 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e-15; return H_FLOAT;} YY_BREAK case 122: YY_RULE_SETUP -#line 301 "hyp_l.l" +#line 302 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e-18; return H_FLOAT;} YY_BREAK case 123: YY_RULE_SETUP -#line 302 "hyp_l.l" +#line 303 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL) * 1e-21; return H_FLOAT;} YY_BREAK case 124: YY_RULE_SETUP -#line 303 "hyp_l.l" +#line 304 "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 */ @@ -3240,7 +3467,7 @@ case 125: YY_RULE_SETUP -#line 307 "hyp_l.l" +#line 308 "hyp_l.l" {hyylval.floatval = strtod(hyytext, NULL); BEGIN STATE_COMMENT; return H_FLOAT;} YY_BREAK @@ -3248,7 +3475,7 @@ case 126: YY_RULE_SETUP -#line 312 "hyp_l.l" +#line 313 "hyp_l.l" { BEGIN INITIAL; hyylval.intval = atoi(hyytext); return H_POSINT; } YY_BREAK @@ -3264,12 +3491,12 @@ case 127: YY_RULE_SETUP -#line 327 "hyp_l.l" +#line 328 "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 329 "hyp_l.l" +#line 330 "hyp_l.l" { /* * Commas are not allowed in strings in the padstack section unless the string is enclosed in double quotes ("). @@ -3303,39 +3530,39 @@ case 129: YY_RULE_SETUP -#line 361 "hyp_l.l" +#line 362 "hyp_l.l" {return '{';} YY_BREAK case 130: YY_RULE_SETUP -#line 363 "hyp_l.l" +#line 364 "hyp_l.l" {BEGIN STATE_COMMENT_EOL; return '}';} YY_BREAK case 131: YY_RULE_SETUP -#line 365 "hyp_l.l" +#line 366 "hyp_l.l" {if (section == H_PADSTACK) BEGIN STATE_STRING; return '(';} YY_BREAK /* allow for comment after the closing bracket ) */ case 132: YY_RULE_SETUP -#line 368 "hyp_l.l" +#line 369 "hyp_l.l" {BEGIN STATE_COMMENT_EOL; return ')';} YY_BREAK case 133: YY_RULE_SETUP -#line 370 "hyp_l.l" +#line 371 "hyp_l.l" {return ',';} YY_BREAK case 134: YY_RULE_SETUP -#line 372 "hyp_l.l" +#line 373 "hyp_l.l" {if ((section == H_VERSION) || (section == H_PLANE_SEP)) BEGIN STATE_FLOAT; return '=';} YY_BREAK /* string */ case 135: YY_RULE_SETUP -#line 375 "hyp_l.l" +#line 376 "hyp_l.l" { /* * Commas are not allowed in strings in the padstack section unless the string is enclosed in double quotes ("). @@ -3354,7 +3581,7 @@ /* string in double quotes */ case 136: YY_RULE_SETUP -#line 391 "hyp_l.l" +#line 392 "hyp_l.l" {BEGIN INITIAL; hyylval.strval = strunquote(hyytext); return H_STRING;} YY_BREAK case YY_STATE_EOF(INITIAL): @@ -3363,22 +3590,22 @@ case YY_STATE_EOF(STATE_FLOAT): case YY_STATE_EOF(STATE_COMMENT): case YY_STATE_EOF(STATE_COMMENT_EOL): -#line 393 "hyp_l.l" +#line 394 "hyp_l.l" {yyterminate();} YY_BREAK /* have bison catch all unrecognized characters with parse errors */ case 137: YY_RULE_SETUP -#line 396 "hyp_l.l" +#line 397 "hyp_l.l" {return hyytext[0];} YY_BREAK case 138: YY_RULE_SETUP -#line 400 "hyp_l.l" +#line 401 "hyp_l.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 3382 "hyp_l.c" +#line 3609 "hyp_l.c" case YY_END_OF_BUFFER: { @@ -3393,8 +3620,8 @@ { /* 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 + * just pointed yyin at a new source and called + * yylex(). 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 @@ -3401,7 +3628,11 @@ * 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; +/* %if-c-only */ + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; +/* %endif */ +/* %if-c++-only */ +/* %endif */ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } @@ -3455,11 +3686,11 @@ { (yy_did_buffer_switch_on_eof) = 0; - if ( hyywrap( ) ) + if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up - * hyytext, we can now set up + * yytext, 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 @@ -3508,12 +3739,12 @@ "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ -} /* end of hyylex */ + } /* end of user's declarations */ +} /* end of yylex */ /* %ok-for-header */ /* %if-c++-only */ /* %not-for-header */ - /* %ok-for-header */ /* %endif */ @@ -3531,9 +3762,9 @@ /* %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; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) @@ -3562,7 +3793,7 @@ /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -3591,7 +3822,7 @@ /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); + (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -3601,7 +3832,7 @@ if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - hyyrestart(hyyin ); + yyrestart( yyin ); } else @@ -3615,12 +3846,15 @@ else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if (((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 ); + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } (yy_n_chars) += number_to_move; @@ -3636,14 +3870,13 @@ /* %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; + yy_state_type yy_current_state; + char *yy_cp; /* %% [15.0] code to get the start state into yy_current_state goes here */ yy_current_state = (yy_start); @@ -3655,14 +3888,14 @@ 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); + 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 >= 770 ) - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; *(yy_state_ptr)++ = yy_current_state; } @@ -3680,45 +3913,46 @@ /* %if-c++-only */ /* %endif */ { - register int yy_is_jam; + 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; + 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 >= 770 ) - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; yy_is_jam = (yy_current_state == 769); if ( ! yy_is_jam ) *(yy_state_ptr)++ = yy_current_state; - return yy_is_jam ? 0 : yy_current_state; + return yy_is_jam ? 0 : yy_current_state; } +#ifndef YY_NO_UNPUT /* %if-c-only */ - static void yyunput (int c, register char * yy_bp ) + static void yyunput (int c, char * yy_bp ) /* %endif */ /* %if-c++-only */ /* %endif */ { - register char *yy_cp; + char *yy_cp; yy_cp = (yy_c_buf_p); - /* undo effects of setting up hyytext */ + /* undo effects of setting up yytext */ *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 int number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = + char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -3727,7 +3961,7 @@ 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; + (yy_n_chars) = (int) 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" ); @@ -3735,10 +3969,10 @@ *--yy_cp = (char) c; -/* %% [18.0] update hyylineno here */ +/* %% [18.0] update yylineno here */ if ( c == '\n' ){ - --hyylineno; + --yylineno; } (yytext_ptr) = yy_bp; @@ -3748,6 +3982,7 @@ /* %if-c-only */ /* %endif */ +#endif /* %if-c-only */ #ifndef YY_NO_INPUT @@ -3777,7 +4012,7 @@ else { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -3794,14 +4029,14 @@ */ /* Reset buffer status. */ - hyyrestart(hyyin ); + yyrestart( yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( hyywrap( ) ) - return EOF; + if ( yywrap( ) ) + return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -3820,14 +4055,14 @@ } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve hyytext */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); -/* %% [19.0] update BOL and hyylineno */ +/* %% [19.0] update BOL and yylineno */ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol ) - - hyylineno++; + + yylineno++; ; return c; @@ -3842,7 +4077,7 @@ * @note This function does not reset the start condition to @c INITIAL . */ /* %if-c-only */ - void hyyrestart (FILE * input_file ) + void yyrestart (FILE * input_file ) /* %endif */ /* %if-c++-only */ /* %endif */ @@ -3849,21 +4084,24 @@ { if ( ! YY_CURRENT_BUFFER ){ - hyyensure_buffer_stack (); + yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = - hyy_create_buffer(hyyin,YY_BUF_SIZE ); + yy_create_buffer( yyin, YY_BUF_SIZE ); } - hyy_init_buffer(YY_CURRENT_BUFFER,input_file ); - hyy_load_buffer_state( ); + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); } +/* %if-c++-only */ +/* %endif */ + /** 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 ) + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) /* %endif */ /* %if-c++-only */ /* %endif */ @@ -3871,10 +4109,10 @@ /* TODO. We should be able to replace this entire function body * with - * hyypop_buffer_state(); - * hyypush_buffer_state(new_buffer); + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); */ - hyyensure_buffer_stack (); + yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; @@ -3887,11 +4125,11 @@ } YY_CURRENT_BUFFER_LVALUE = new_buffer; - hyy_load_buffer_state( ); + yy_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 + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; @@ -3898,7 +4136,7 @@ } /* %if-c-only */ -static void hyy_load_buffer_state (void) +static void yy_load_buffer_state (void) /* %endif */ /* %if-c++-only */ /* %endif */ @@ -3905,7 +4143,11 @@ { (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; +/* %if-c-only */ + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; +/* %endif */ +/* %if-c++-only */ +/* %endif */ (yy_hold_char) = *(yy_c_buf_p); } @@ -3916,7 +4158,7 @@ * @return the allocated buffer state. */ /* %if-c-only */ - YY_BUFFER_STATE hyy_create_buffer (FILE * file, int size ) + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) /* %endif */ /* %if-c++-only */ /* %endif */ @@ -3923,9 +4165,9 @@ { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) hyyalloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in hyy_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; @@ -3932,23 +4174,26 @@ /* 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 ); + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in hyy_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - hyy_init_buffer(b,file ); + yy_init_buffer( b, file ); return b; } +/* %if-c++-only */ +/* %endif */ + /** Destroy the buffer. - * @param b a buffer created with hyy_create_buffer() + * @param b a buffer created with yy_create_buffer() * */ /* %if-c-only */ - void hyy_delete_buffer (YY_BUFFER_STATE b ) + void yy_delete_buffer (YY_BUFFER_STATE b ) /* %endif */ /* %if-c++-only */ /* %endif */ @@ -3961,28 +4206,17 @@ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - hyyfree((void *) b->yy_ch_buf ); + yyfree( (void *) b->yy_ch_buf ); - hyyfree((void *) b ); + yyfree( (void *) b ); } -/* %if-c-only */ - -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - -/* %endif */ - -/* %if-c++-only */ -/* %endif */ - /* 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. + * such as during a yyrestart() or at EOF. */ /* %if-c-only */ - static void hyy_init_buffer (YY_BUFFER_STATE b, FILE * file ) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) /* %endif */ /* %if-c++-only */ /* %endif */ @@ -3990,13 +4224,17 @@ { int oerrno = errno; - hyy_flush_buffer(b ); + yy_flush_buffer( b ); +/* %if-c-only */ b->yy_input_file = file; +/* %endif */ +/* %if-c++-only */ +/* %endif */ 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. + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ @@ -4019,7 +4257,7 @@ * */ /* %if-c-only */ - void hyy_flush_buffer (YY_BUFFER_STATE b ) + void yy_flush_buffer (YY_BUFFER_STATE b ) /* %endif */ /* %if-c++-only */ /* %endif */ @@ -4042,7 +4280,7 @@ b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) - hyy_load_buffer_state( ); + yy_load_buffer_state( ); } /* %if-c-or-c++ */ @@ -4053,7 +4291,7 @@ * */ /* %if-c-only */ -void hyypush_buffer_state (YY_BUFFER_STATE new_buffer ) +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) /* %endif */ /* %if-c++-only */ /* %endif */ @@ -4061,9 +4299,9 @@ if (new_buffer == NULL) return; - hyyensure_buffer_stack(); + yyensure_buffer_stack(); - /* This block is copied from hyy_switch_to_buffer. */ + /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ @@ -4077,8 +4315,8 @@ (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; - /* copied from hyy_switch_to_buffer. */ - hyy_load_buffer_state( ); + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /* %endif */ @@ -4089,7 +4327,7 @@ * */ /* %if-c-only */ -void hyypop_buffer_state (void) +void yypop_buffer_state (void) /* %endif */ /* %if-c++-only */ /* %endif */ @@ -4097,13 +4335,13 @@ if (!YY_CURRENT_BUFFER) return; - hyy_delete_buffer(YY_CURRENT_BUFFER ); + yy_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_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } @@ -4114,12 +4352,12 @@ * Guarantees space for at least one push. */ /* %if-c-only */ -static void hyyensure_buffer_stack (void) +static void yyensure_buffer_stack (void) /* %endif */ /* %if-c++-only */ /* %endif */ { - int num_to_alloc; + yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { @@ -4127,15 +4365,15 @@ * 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 = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in hyyensure_buffer_stack()" ); - + YY_FATAL_ERROR( "out of dynamic memory in yyensure_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; @@ -4144,15 +4382,15 @@ 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 */; + yy_size_t 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) = (struct yy_buffer_state**)yyrealloc ((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()" ); + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); @@ -4166,9 +4404,9 @@ * @param base the character buffer * @param size the size in bytes of the character buffer * - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE hyy_scan_buffer (char * base, yy_size_t size ) +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; @@ -4176,16 +4414,16 @@ 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; + return NULL; - b = (YY_BUFFER_STATE) hyyalloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in hyy_scan_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_size = (int) (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_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; @@ -4192,7 +4430,7 @@ b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - hyy_switch_to_buffer(b ); + yy_switch_to_buffer( b ); return b; } @@ -4199,23 +4437,23 @@ /* %endif */ /* %if-c-only */ -/** Setup the input buffer state to scan a string. The next call to hyylex() will +/** Setup the input buffer state to scan a string. The next call to yylex() 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_scan_bytes() instead. */ -YY_BUFFER_STATE hyy_scan_string (yyconst char * yystr ) +YY_BUFFER_STATE yy_scan_string (const char * yystr ) { - return hyy_scan_bytes(yystr,strlen(yystr) ); + return yy_scan_bytes( yystr, (int) strlen(yystr) ); } /* %endif */ /* %if-c-only */ -/** Setup the input buffer state to scan the given bytes. The next call to hyylex() will +/** Setup the input buffer state to scan the given bytes. The next call to yylex() 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. @@ -4222,7 +4460,7 @@ * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE hyy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; @@ -4230,10 +4468,10 @@ int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) hyyalloc(n ); + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n ); if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in hyy_scan_bytes()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; @@ -4240,9 +4478,9 @@ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = hyy_scan_buffer(buf,n ); + b = yy_scan_buffer( buf, n ); if ( ! b ) - YY_FATAL_ERROR( "bad buffer in hyy_scan_bytes()" ); + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. @@ -4258,9 +4496,9 @@ #endif /* %if-c-only */ -static void yy_fatal_error (yyconst char* msg ) +static void yynoreturn yy_fatal_error (const char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); + fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* %endif */ @@ -4273,14 +4511,14 @@ #define yyless(n) \ do \ { \ - /* Undo effects of setting up hyytext. */ \ + /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ - hyytext[hyyleng] = (yy_hold_char); \ - (yy_c_buf_p) = hyytext + yyless_macro_arg; \ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ - hyyleng = yyless_macro_arg; \ + yyleng = yyless_macro_arg; \ } \ while ( 0 ) @@ -4293,34 +4531,34 @@ /** Get the current line number. * */ -int hyyget_lineno (void) +int yyget_lineno (void) { - - return hyylineno; + + return yylineno; } /** Get the input stream. * */ -FILE *hyyget_in (void) +FILE *yyget_in (void) { - return hyyin; + return yyin; } /** Get the output stream. * */ -FILE *hyyget_out (void) +FILE *yyget_out (void) { - return hyyout; + return yyout; } /** Get the length of the current token. * */ -int hyyget_leng (void) +int yyget_leng (void) { - return hyyleng; + return yyleng; } /** Get the current token. @@ -4327,9 +4565,9 @@ * */ -char *hyyget_text (void) +char *yyget_text (void) { - return hyytext; + return yytext; } /* %if-reentrant */ @@ -4336,39 +4574,39 @@ /* %endif */ /** Set the current line number. - * @param line_number + * @param _line_number line number * */ -void hyyset_lineno (int line_number ) +void yyset_lineno (int _line_number ) { - hyylineno = line_number; + yylineno = _line_number; } /** Set the input stream. This does not discard the current * input buffer. - * @param in_str A readable stream. + * @param _in_str A readable stream. * - * @see hyy_switch_to_buffer + * @see yy_switch_to_buffer */ -void hyyset_in (FILE * in_str ) +void yyset_in (FILE * _in_str ) { - hyyin = in_str ; + yyin = _in_str ; } -void hyyset_out (FILE * out_str ) +void yyset_out (FILE * _out_str ) { - hyyout = out_str ; + yyout = _out_str ; } -int hyyget_debug (void) +int yyget_debug (void) { - return hyy_flex_debug; + return yy_flex_debug; } -void hyyset_debug (int bdebug ) +void yyset_debug (int _bdebug ) { - hyy_flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } /* %endif */ @@ -4382,16 +4620,16 @@ 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. + * This function is called from yylex_destroy(), so don't allocate here. */ - /* We do not touch hyylineno unless the option is enabled. */ - hyylineno = 1; + /* We do not touch yylineno unless the option is enabled. */ + yylineno = 1; - (yy_buffer_stack) = 0; + (yy_buffer_stack) = NULL; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; + (yy_c_buf_p) = NULL; (yy_init) = 0; (yy_start) = 0; @@ -4402,15 +4640,15 @@ /* Defined in main.c */ #ifdef YY_STDINIT - hyyin = stdin; - hyyout = stdout; + yyin = stdin; + yyout = stdout; #else - hyyin = (FILE *) 0; - hyyout = (FILE *) 0; + yyin = NULL; + yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by - * hyylex_init() + * yylex_init() */ return 0; } @@ -4417,26 +4655,26 @@ /* %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) +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ - hyy_delete_buffer(YY_CURRENT_BUFFER ); + yy_delete_buffer( YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; - hyypop_buffer_state(); + yypop_buffer_state(); } /* Destroy the stack itself. */ - hyyfree((yy_buffer_stack) ); + yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; - hyyfree ( (yy_state_buf) ); + yyfree ( (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. */ + * yylex() is called, initialization will occur. */ yy_init_globals( ); /* %if-reentrant */ @@ -4450,9 +4688,10 @@ */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +static void yy_flex_strncpy (char* s1, const char * s2, int n ) { - register int i; + + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } @@ -4459,9 +4698,9 @@ #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) +static int yy_flex_strlen (const char * s ) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -4469,13 +4708,14 @@ } #endif -void *hyyalloc (yy_size_t size ) +void *yyalloc (yy_size_t size ) { - return (void *) malloc( size ); + return malloc(size); } -void *hyyrealloc (void * ptr, yy_size_t size ) +void *yyrealloc (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 @@ -4483,12 +4723,12 @@ * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } -void hyyfree (void * ptr ) +void yyfree (void * ptr ) { - free( (char *) ptr ); /* see hyyrealloc() for (char *) cast */ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } /* %if-tables-serialization definitions */ @@ -4498,10 +4738,9 @@ /* %ok-for-header */ -#line 400 "hyp_l.l" +#line 401 "hyp_l.l" - /* * copy a quoted string. * e.g. "data 0" -> data 0 Index: trunk/src_plugins/io_hyp/hyp_l.h =================================================================== --- trunk/src_plugins/io_hyp/hyp_l.h (revision 27088) +++ trunk/src_plugins/io_hyp/hyp_l.h (revision 27089) @@ -14,8 +14,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -24,11 +24,244 @@ /* %endif */ /* %if-c-only */ - +#ifdef yy_create_buffer +#define hyy_create_buffer_ALREADY_DEFINED +#else +#define yy_create_buffer hyy_create_buffer +#endif + +#ifdef yy_delete_buffer +#define hyy_delete_buffer_ALREADY_DEFINED +#else +#define yy_delete_buffer hyy_delete_buffer +#endif + +#ifdef yy_scan_buffer +#define hyy_scan_buffer_ALREADY_DEFINED +#else +#define yy_scan_buffer hyy_scan_buffer +#endif + +#ifdef yy_scan_string +#define hyy_scan_string_ALREADY_DEFINED +#else +#define yy_scan_string hyy_scan_string +#endif + +#ifdef yy_scan_bytes +#define hyy_scan_bytes_ALREADY_DEFINED +#else +#define yy_scan_bytes hyy_scan_bytes +#endif + +#ifdef yy_init_buffer +#define hyy_init_buffer_ALREADY_DEFINED +#else +#define yy_init_buffer hyy_init_buffer +#endif + +#ifdef yy_flush_buffer +#define hyy_flush_buffer_ALREADY_DEFINED +#else +#define yy_flush_buffer hyy_flush_buffer +#endif + +#ifdef yy_load_buffer_state +#define hyy_load_buffer_state_ALREADY_DEFINED +#else +#define yy_load_buffer_state hyy_load_buffer_state +#endif + +#ifdef yy_switch_to_buffer +#define hyy_switch_to_buffer_ALREADY_DEFINED +#else +#define yy_switch_to_buffer hyy_switch_to_buffer +#endif + +#ifdef yypush_buffer_state +#define hyypush_buffer_state_ALREADY_DEFINED +#else +#define yypush_buffer_state hyypush_buffer_state +#endif + +#ifdef yypop_buffer_state +#define hyypop_buffer_state_ALREADY_DEFINED +#else +#define yypop_buffer_state hyypop_buffer_state +#endif + +#ifdef yyensure_buffer_stack +#define hyyensure_buffer_stack_ALREADY_DEFINED +#else +#define yyensure_buffer_stack hyyensure_buffer_stack +#endif + +#ifdef yylex +#define hyylex_ALREADY_DEFINED +#else +#define yylex hyylex +#endif + +#ifdef yyrestart +#define hyyrestart_ALREADY_DEFINED +#else +#define yyrestart hyyrestart +#endif + +#ifdef yylex_init +#define hyylex_init_ALREADY_DEFINED +#else +#define yylex_init hyylex_init +#endif + +#ifdef yylex_init_extra +#define hyylex_init_extra_ALREADY_DEFINED +#else +#define yylex_init_extra hyylex_init_extra +#endif + +#ifdef yylex_destroy +#define hyylex_destroy_ALREADY_DEFINED +#else +#define yylex_destroy hyylex_destroy +#endif + +#ifdef yyget_debug +#define hyyget_debug_ALREADY_DEFINED +#else +#define yyget_debug hyyget_debug +#endif + +#ifdef yyset_debug +#define hyyset_debug_ALREADY_DEFINED +#else +#define yyset_debug hyyset_debug +#endif + +#ifdef yyget_extra +#define hyyget_extra_ALREADY_DEFINED +#else +#define yyget_extra hyyget_extra +#endif + +#ifdef yyset_extra +#define hyyset_extra_ALREADY_DEFINED +#else +#define yyset_extra hyyset_extra +#endif + +#ifdef yyget_in +#define hyyget_in_ALREADY_DEFINED +#else +#define yyget_in hyyget_in +#endif + +#ifdef yyset_in +#define hyyset_in_ALREADY_DEFINED +#else +#define yyset_in hyyset_in +#endif + +#ifdef yyget_out +#define hyyget_out_ALREADY_DEFINED +#else +#define yyget_out hyyget_out +#endif + +#ifdef yyset_out +#define hyyset_out_ALREADY_DEFINED +#else +#define yyset_out hyyset_out +#endif + +#ifdef yyget_leng +#define hyyget_leng_ALREADY_DEFINED +#else +#define yyget_leng hyyget_leng +#endif + +#ifdef yyget_text +#define hyyget_text_ALREADY_DEFINED +#else +#define yyget_text hyyget_text +#endif + +#ifdef yyget_lineno +#define hyyget_lineno_ALREADY_DEFINED +#else +#define yyget_lineno hyyget_lineno +#endif + +#ifdef yyset_lineno +#define hyyset_lineno_ALREADY_DEFINED +#else +#define yyset_lineno hyyset_lineno +#endif + +#ifdef yywrap +#define hyywrap_ALREADY_DEFINED +#else +#define yywrap hyywrap +#endif + /* %endif */ +#ifdef yyalloc +#define hyyalloc_ALREADY_DEFINED +#else +#define yyalloc hyyalloc +#endif + +#ifdef yyrealloc +#define hyyrealloc_ALREADY_DEFINED +#else +#define yyrealloc hyyrealloc +#endif + +#ifdef yyfree +#define hyyfree_ALREADY_DEFINED +#else +#define yyfree hyyfree +#endif + /* %if-c-only */ +#ifdef yytext +#define hyytext_ALREADY_DEFINED +#else +#define yytext hyytext +#endif + +#ifdef yyleng +#define hyyleng_ALREADY_DEFINED +#else +#define yyleng hyyleng +#endif + +#ifdef yyin +#define hyyin_ALREADY_DEFINED +#else +#define yyin hyyin +#endif + +#ifdef yyout +#define hyyout_ALREADY_DEFINED +#else +#define yyout hyyout +#endif + +#ifdef yy_flex_debug +#define hyy_flex_debug_ALREADY_DEFINED +#else +#define yy_flex_debug hyy_flex_debug +#endif + +#ifdef yylineno +#define hyylineno_ALREADY_DEFINED +#else +#define yylineno hyylineno +#endif + /* %endif */ /* First, we deal with platform-specific or compiler-specific issues. */ @@ -106,6 +339,10 @@ #define UINT32_MAX (4294967295U) #endif +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + #endif /* ! C99 */ #endif /* ! FLEXINT_H */ @@ -112,28 +349,17 @@ /* %endif */ +/* begin standard C++ headers. */ /* %if-c++-only */ /* %endif */ -#ifdef __cplusplus +/* TODO: this is always defined, so inline it */ +#define yyconst const -/* 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 +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* %not-for-header */ @@ -165,21 +391,21 @@ 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 int hyyleng; +extern int yyleng; /* %endif */ /* %if-c-only */ /* %if-not-reentrant */ -extern FILE *hyyin, *hyyout; +extern FILE *yyin, *yyout; /* %endif */ /* %endif */ -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -197,7 +423,7 @@ /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -225,7 +451,7 @@ 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. */ @@ -248,36 +474,39 @@ /* %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 ); +void yyrestart ( FILE *input_file ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); +void yy_delete_buffer ( YY_BUFFER_STATE b ); +void yy_flush_buffer ( YY_BUFFER_STATE b ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); +void yypop_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,int len ); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); /* %endif */ -void *hyyalloc (yy_size_t ); -void *hyyrealloc (void *,yy_size_t ); -void hyyfree (void * ); +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); -/* %% [1.0] hyytext/hyyin/hyyout/yy_state_type/hyylineno etc. def's & init go here */ +/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ /* Begin user sect3 */ -#define hyywrap(n) 1 +#define hyywrap() (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define FLEX_DEBUG -extern int hyylineno; +extern int yylineno; -extern char *hyytext; -#define yytext_ptr hyytext +extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif +#define yytext_ptr yytext /* %if-c-only Standard (non-C++) definition */ @@ -321,31 +550,31 @@ /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int hyylex_destroy (void ); +int yylex_destroy ( void ); -int hyyget_debug (void ); +int yyget_debug ( void ); -void hyyset_debug (int debug_flag ); +void yyset_debug ( int debug_flag ); -YY_EXTRA_TYPE hyyget_extra (void ); +YY_EXTRA_TYPE yyget_extra ( void ); -void hyyset_extra (YY_EXTRA_TYPE user_defined ); +void yyset_extra ( YY_EXTRA_TYPE user_defined ); -FILE *hyyget_in (void ); +FILE *yyget_in ( void ); -void hyyset_in (FILE * in_str ); +void yyset_in ( FILE * _in_str ); -FILE *hyyget_out (void ); +FILE *yyget_out ( void ); -void hyyset_out (FILE * out_str ); +void yyset_out ( FILE * _out_str ); -int hyyget_leng (void ); + int yyget_leng ( void ); -char *hyyget_text (void ); +char *yyget_text ( void ); -int hyyget_lineno (void ); +int yyget_lineno ( void ); -void hyyset_lineno (int line_number ); +void yyset_lineno ( int _line_number ); /* %if-bison-bridge */ /* %endif */ @@ -356,9 +585,9 @@ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int hyywrap (void ); +extern "C" int yywrap ( void ); #else -extern int hyywrap (void ); +extern int yywrap ( void ); #endif #endif @@ -367,11 +596,11 @@ /* %endif */ #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); +static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); +static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT @@ -412,9 +641,9 @@ #define YY_DECL_IS_OURS 1 /* %if-c-only Standard (non-C++) definition */ -extern int hyylex (void); +extern int yylex (void); -#define YY_DECL int hyylex (void) +#define YY_DECL int yylex (void) /* %endif */ /* %if-c++-only C++ definition */ /* %endif */ @@ -444,9 +673,154 @@ #undef YY_DECL #endif -#line 400 "hyp_l.l" +#ifndef hyy_create_buffer_ALREADY_DEFINED +#undef yy_create_buffer +#endif +#ifndef hyy_delete_buffer_ALREADY_DEFINED +#undef yy_delete_buffer +#endif +#ifndef hyy_scan_buffer_ALREADY_DEFINED +#undef yy_scan_buffer +#endif +#ifndef hyy_scan_string_ALREADY_DEFINED +#undef yy_scan_string +#endif +#ifndef hyy_scan_bytes_ALREADY_DEFINED +#undef yy_scan_bytes +#endif +#ifndef hyy_init_buffer_ALREADY_DEFINED +#undef yy_init_buffer +#endif +#ifndef hyy_flush_buffer_ALREADY_DEFINED +#undef yy_flush_buffer +#endif +#ifndef hyy_load_buffer_state_ALREADY_DEFINED +#undef yy_load_buffer_state +#endif +#ifndef hyy_switch_to_buffer_ALREADY_DEFINED +#undef yy_switch_to_buffer +#endif +#ifndef hyypush_buffer_state_ALREADY_DEFINED +#undef yypush_buffer_state +#endif +#ifndef hyypop_buffer_state_ALREADY_DEFINED +#undef yypop_buffer_state +#endif +#ifndef hyyensure_buffer_stack_ALREADY_DEFINED +#undef yyensure_buffer_stack +#endif +#ifndef hyylex_ALREADY_DEFINED +#undef yylex +#endif +#ifndef hyyrestart_ALREADY_DEFINED +#undef yyrestart +#endif +#ifndef hyylex_init_ALREADY_DEFINED +#undef yylex_init +#endif +#ifndef hyylex_init_extra_ALREADY_DEFINED +#undef yylex_init_extra +#endif +#ifndef hyylex_destroy_ALREADY_DEFINED +#undef yylex_destroy +#endif +#ifndef hyyget_debug_ALREADY_DEFINED +#undef yyget_debug +#endif +#ifndef hyyset_debug_ALREADY_DEFINED +#undef yyset_debug +#endif +#ifndef hyyget_extra_ALREADY_DEFINED +#undef yyget_extra +#endif +#ifndef hyyset_extra_ALREADY_DEFINED +#undef yyset_extra +#endif +#ifndef hyyget_in_ALREADY_DEFINED +#undef yyget_in +#endif +#ifndef hyyset_in_ALREADY_DEFINED +#undef yyset_in +#endif +#ifndef hyyget_out_ALREADY_DEFINED +#undef yyget_out +#endif +#ifndef hyyset_out_ALREADY_DEFINED +#undef yyset_out +#endif +#ifndef hyyget_leng_ALREADY_DEFINED +#undef yyget_leng +#endif +#ifndef hyyget_text_ALREADY_DEFINED +#undef yyget_text +#endif +#ifndef hyyget_lineno_ALREADY_DEFINED +#undef yyget_lineno +#endif +#ifndef hyyset_lineno_ALREADY_DEFINED +#undef yyset_lineno +#endif +#ifndef hyyget_column_ALREADY_DEFINED +#undef yyget_column +#endif +#ifndef hyyset_column_ALREADY_DEFINED +#undef yyset_column +#endif +#ifndef hyywrap_ALREADY_DEFINED +#undef yywrap +#endif +#ifndef hyyget_lval_ALREADY_DEFINED +#undef yyget_lval +#endif +#ifndef hyyset_lval_ALREADY_DEFINED +#undef yyset_lval +#endif +#ifndef hyyget_lloc_ALREADY_DEFINED +#undef yyget_lloc +#endif +#ifndef hyyset_lloc_ALREADY_DEFINED +#undef yyset_lloc +#endif +#ifndef hyyalloc_ALREADY_DEFINED +#undef yyalloc +#endif +#ifndef hyyrealloc_ALREADY_DEFINED +#undef yyrealloc +#endif +#ifndef hyyfree_ALREADY_DEFINED +#undef yyfree +#endif +#ifndef hyytext_ALREADY_DEFINED +#undef yytext +#endif +#ifndef hyyleng_ALREADY_DEFINED +#undef yyleng +#endif +#ifndef hyyin_ALREADY_DEFINED +#undef yyin +#endif +#ifndef hyyout_ALREADY_DEFINED +#undef yyout +#endif +#ifndef hyy_flex_debug_ALREADY_DEFINED +#undef yy_flex_debug +#endif +#ifndef hyylineno_ALREADY_DEFINED +#undef yylineno +#endif +#ifndef hyytables_fload_ALREADY_DEFINED +#undef yytables_fload +#endif +#ifndef hyytables_destroy_ALREADY_DEFINED +#undef yytables_destroy +#endif +#ifndef hyyTABLES_NAME_ALREADY_DEFINED +#undef yyTABLES_NAME +#endif +#line 401 "hyp_l.l" -#line 451 "hyp_l.h" + +#line 825 "hyp_l.h" #undef hyyIN_HEADER #endif /* hyyHEADER_H */ Index: trunk/src_plugins/query/query_l.c =================================================================== --- trunk/src_plugins/query/query_l.c (revision 27088) +++ trunk/src_plugins/query/query_l.c (revision 27089) @@ -8,11 +8,17 @@ #define yy_create_buffer qry__create_buffer #define yy_delete_buffer qry__delete_buffer -#define yy_flex_debug qry__flex_debug +#define yy_scan_buffer qry__scan_buffer +#define yy_scan_string qry__scan_string +#define yy_scan_bytes qry__scan_bytes #define yy_init_buffer qry__init_buffer #define yy_flush_buffer qry__flush_buffer #define yy_load_buffer_state qry__load_buffer_state #define yy_switch_to_buffer qry__switch_to_buffer +#define yypush_buffer_state qry_push_buffer_state +#define yypop_buffer_state qry_pop_buffer_state +#define yyensure_buffer_stack qry_ensure_buffer_stack +#define yy_flex_debug qry__flex_debug #define yyin qry_in #define yyleng qry_leng #define yylex qry_lex @@ -27,12 +33,246 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif +#ifdef yy_create_buffer +#define qry__create_buffer_ALREADY_DEFINED +#else +#define yy_create_buffer qry__create_buffer +#endif + +#ifdef yy_delete_buffer +#define qry__delete_buffer_ALREADY_DEFINED +#else +#define yy_delete_buffer qry__delete_buffer +#endif + +#ifdef yy_scan_buffer +#define qry__scan_buffer_ALREADY_DEFINED +#else +#define yy_scan_buffer qry__scan_buffer +#endif + +#ifdef yy_scan_string +#define qry__scan_string_ALREADY_DEFINED +#else +#define yy_scan_string qry__scan_string +#endif + +#ifdef yy_scan_bytes +#define qry__scan_bytes_ALREADY_DEFINED +#else +#define yy_scan_bytes qry__scan_bytes +#endif + +#ifdef yy_init_buffer +#define qry__init_buffer_ALREADY_DEFINED +#else +#define yy_init_buffer qry__init_buffer +#endif + +#ifdef yy_flush_buffer +#define qry__flush_buffer_ALREADY_DEFINED +#else +#define yy_flush_buffer qry__flush_buffer +#endif + +#ifdef yy_load_buffer_state +#define qry__load_buffer_state_ALREADY_DEFINED +#else +#define yy_load_buffer_state qry__load_buffer_state +#endif + +#ifdef yy_switch_to_buffer +#define qry__switch_to_buffer_ALREADY_DEFINED +#else +#define yy_switch_to_buffer qry__switch_to_buffer +#endif + +#ifdef yypush_buffer_state +#define qry_push_buffer_state_ALREADY_DEFINED +#else +#define yypush_buffer_state qry_push_buffer_state +#endif + +#ifdef yypop_buffer_state +#define qry_pop_buffer_state_ALREADY_DEFINED +#else +#define yypop_buffer_state qry_pop_buffer_state +#endif + +#ifdef yyensure_buffer_stack +#define qry_ensure_buffer_stack_ALREADY_DEFINED +#else +#define yyensure_buffer_stack qry_ensure_buffer_stack +#endif + +#ifdef yylex +#define qry_lex_ALREADY_DEFINED +#else +#define yylex qry_lex +#endif + +#ifdef yyrestart +#define qry_restart_ALREADY_DEFINED +#else +#define yyrestart qry_restart +#endif + +#ifdef yylex_init +#define qry_lex_init_ALREADY_DEFINED +#else +#define yylex_init qry_lex_init +#endif + +#ifdef yylex_init_extra +#define qry_lex_init_extra_ALREADY_DEFINED +#else +#define yylex_init_extra qry_lex_init_extra +#endif + +#ifdef yylex_destroy +#define qry_lex_destroy_ALREADY_DEFINED +#else +#define yylex_destroy qry_lex_destroy +#endif + +#ifdef yyget_debug +#define qry_get_debug_ALREADY_DEFINED +#else +#define yyget_debug qry_get_debug +#endif + +#ifdef yyset_debug +#define qry_set_debug_ALREADY_DEFINED +#else +#define yyset_debug qry_set_debug +#endif + +#ifdef yyget_extra +#define qry_get_extra_ALREADY_DEFINED +#else +#define yyget_extra qry_get_extra +#endif + +#ifdef yyset_extra +#define qry_set_extra_ALREADY_DEFINED +#else +#define yyset_extra qry_set_extra +#endif + +#ifdef yyget_in +#define qry_get_in_ALREADY_DEFINED +#else +#define yyget_in qry_get_in +#endif + +#ifdef yyset_in +#define qry_set_in_ALREADY_DEFINED +#else +#define yyset_in qry_set_in +#endif + +#ifdef yyget_out +#define qry_get_out_ALREADY_DEFINED +#else +#define yyget_out qry_get_out +#endif + +#ifdef yyset_out +#define qry_set_out_ALREADY_DEFINED +#else +#define yyset_out qry_set_out +#endif + +#ifdef yyget_leng +#define qry_get_leng_ALREADY_DEFINED +#else +#define yyget_leng qry_get_leng +#endif + +#ifdef yyget_text +#define qry_get_text_ALREADY_DEFINED +#else +#define yyget_text qry_get_text +#endif + +#ifdef yyget_lineno +#define qry_get_lineno_ALREADY_DEFINED +#else +#define yyget_lineno qry_get_lineno +#endif + +#ifdef yyset_lineno +#define qry_set_lineno_ALREADY_DEFINED +#else +#define yyset_lineno qry_set_lineno +#endif + +#ifdef yywrap +#define qry_wrap_ALREADY_DEFINED +#else +#define yywrap qry_wrap +#endif + +#ifdef yyalloc +#define qry_alloc_ALREADY_DEFINED +#else +#define yyalloc qry_alloc +#endif + +#ifdef yyrealloc +#define qry_realloc_ALREADY_DEFINED +#else +#define yyrealloc qry_realloc +#endif + +#ifdef yyfree +#define qry_free_ALREADY_DEFINED +#else +#define yyfree qry_free +#endif + +#ifdef yytext +#define qry_text_ALREADY_DEFINED +#else +#define yytext qry_text +#endif + +#ifdef yyleng +#define qry_leng_ALREADY_DEFINED +#else +#define yyleng qry_leng +#endif + +#ifdef yyin +#define qry_in_ALREADY_DEFINED +#else +#define yyin qry_in +#endif + +#ifdef yyout +#define qry_out_ALREADY_DEFINED +#else +#define yyout qry_out +#endif + +#ifdef yy_flex_debug +#define qry__flex_debug_ALREADY_DEFINED +#else +#define yy_flex_debug qry__flex_debug +#endif + +#ifdef yylineno +#define qry_lineno_ALREADY_DEFINED +#else +#define yylineno qry_lineno +#endif + /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ @@ -103,40 +343,32 @@ #define UINT32_MAX (4294967295U) #endif +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + #endif /* ! C99 */ #endif /* ! FLEXINT_H */ -#ifdef __cplusplus +/* begin standard C++ headers. */ -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST +/* TODO: this is always defined, so inline it */ +#define yyconst 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 +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* Returned upon end-of-file. */ #define YY_NULL 0 -/* 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. +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* 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 @@ -143,7 +375,6 @@ * 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. @@ -150,13 +381,10 @@ */ #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 qry_restart(qry_in ) - +#define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -181,37 +409,37 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -extern int qry_leng; +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif -extern FILE *qry_in, *qry_out; +extern int yyleng; +extern FILE *yyin, *yyout; + #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ - /* Undo effects of setting up qry_text. */ \ + /* Undo effects of setting up yytext. */ \ 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 qry_text again */ \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) - #define unput(c) yyunput( c, (yytext_ptr) ) -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -224,7 +452,7 @@ /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -252,7 +480,7 @@ 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. */ @@ -269,8 +497,8 @@ * possible backing-up. * * When we actually see the EOF, we change the status to "new" - * (via qry_restart()), so that the user can continue scanning by - * just pointing qry_in at a new input file. + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 @@ -280,7 +508,7 @@ /* 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. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general @@ -291,103 +519,98 @@ #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)] -/* yy_hold_char holds the character lost when qry_text is formed. */ +/* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int qry_leng; +int yyleng; /* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; +static char *yy_c_buf_p = NULL; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ -/* Flag which is used to allow qry_wrap()'s to do buffer switches - * instead of setting up a fresh qry_in. A bit of a hack ... +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; -void qry_restart (FILE *input_file ); -void qry__switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE qry__create_buffer (FILE *file,int size ); -void qry__delete_buffer (YY_BUFFER_STATE b ); -void qry__flush_buffer (YY_BUFFER_STATE b ); -void qry_push_buffer_state (YY_BUFFER_STATE new_buffer ); -void qry_pop_buffer_state (void ); +void yyrestart ( FILE *input_file ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); +void yy_delete_buffer ( YY_BUFFER_STATE b ); +void yy_flush_buffer ( YY_BUFFER_STATE b ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state ( void ); -static void qry_ensure_buffer_stack (void ); -static void qry__load_buffer_state (void ); -static void qry__init_buffer (YY_BUFFER_STATE b,FILE *file ); +static void yyensure_buffer_stack ( void ); +static void yy_load_buffer_state ( void ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) -#define YY_FLUSH_BUFFER qry__flush_buffer(YY_CURRENT_BUFFER ) +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); -YY_BUFFER_STATE qry__scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE qry__scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE qry__scan_bytes (yyconst char *bytes,int len ); +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); -void *qry_alloc (yy_size_t ); -void *qry_realloc (void *,yy_size_t ); -void qry_free (void * ); - -#define yy_new_buffer qry__create_buffer - +#define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ - qry_ensure_buffer_stack (); \ + yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ - qry__create_buffer(qry_in,YY_BUF_SIZE ); \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } - #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ - qry_ensure_buffer_stack (); \ + yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ - qry__create_buffer(qry_in,YY_BUF_SIZE ); \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } - #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ +typedef flex_uint8_t YY_CHAR; -typedef unsigned char YY_CHAR; +FILE *yyin = NULL, *yyout = NULL; -FILE *qry_in = (FILE *) 0, *qry_out = (FILE *) 0; - typedef int yy_state_type; -extern int qry_lineno; +extern int yylineno; +int yylineno = 1; -int qry_lineno = 1; +extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif +#define yytext_ptr yytext -extern char *qry_text; -#define yytext_ptr qry_text +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 yynoreturn yy_fatal_error ( const char* msg ); -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[] ); - /* Done after the current pattern has been matched and before the - * corresponding action - sets up qry_text. + * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ - qry_leng = (size_t) (yy_cp - yy_bp); \ + yyleng = (int) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; - #define YY_NUM_RULES 64 #define YY_END_OF_BUFFER 65 /* This struct is not used in this scanner, @@ -397,7 +620,7 @@ flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[215] = +static const flex_int16_t yy_accept[215] = { 0, 0, 0, 65, 64, 63, 62, 61, 64, 64, 64, 61, 61, 57, 61, 64, 61, 60, 60, 60, 60, @@ -425,7 +648,7 @@ 11, 12, 21, 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, @@ -457,7 +680,7 @@ 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[56] = +static const YY_CHAR yy_meta[56] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, @@ -467,7 +690,7 @@ 2, 2, 2, 2, 1 } ; -static yyconst flex_int16_t yy_base[218] = +static const flex_int16_t yy_base[218] = { 0, 0, 0, 233, 234, 234, 234, 220, 226, 224, 222, 234, 218, 47, 215, 214, 213, 194, 195, 194, 193, @@ -495,7 +718,7 @@ 0, 0, 0, 234, 107, 109, 87 } ; -static yyconst flex_int16_t yy_def[218] = +static const flex_int16_t yy_def[218] = { 0, 214, 1, 214, 214, 214, 214, 214, 215, 214, 216, 214, 214, 214, 214, 214, 214, 217, 217, 217, 217, @@ -523,7 +746,7 @@ 217, 217, 217, 0, 214, 214, 214 } ; -static yyconst flex_int16_t yy_nxt[290] = +static const flex_int16_t yy_nxt[290] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 21, @@ -558,7 +781,7 @@ 214, 214, 214, 214, 214, 214, 214, 214, 214 } ; -static yyconst flex_int16_t yy_chk[290] = +static const flex_int16_t yy_chk[290] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -596,8 +819,8 @@ static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; -extern int qry__flex_debug; -int qry__flex_debug = 0; +extern int yy_flex_debug; +int yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -606,7 +829,7 @@ #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET -char *qry_text; +char *yytext; #line 1 "query_l.l" #line 2 "query_l.l" /* @@ -643,7 +866,8 @@ static int qry_yy_input(char *buf, int buflen); static pcb_qry_node_t *make_constant(char *str, long val); #define YY_INPUT(buf, res, buflen) (res = qry_yy_input(buf, buflen)) -#line 647 "query_l.c" +#line 870 "query_l.c" +#line 871 "query_l.c" #define INITIAL 0 @@ -659,36 +883,36 @@ #define YY_EXTRA_TYPE void * #endif -static int yy_init_globals (void ); +static int yy_init_globals ( void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int qry_lex_destroy (void ); +int yylex_destroy ( void ); -int qry_get_debug (void ); +int yyget_debug ( void ); -void qry_set_debug (int debug_flag ); +void yyset_debug ( int debug_flag ); -YY_EXTRA_TYPE qry_get_extra (void ); +YY_EXTRA_TYPE yyget_extra ( void ); -void qry_set_extra (YY_EXTRA_TYPE user_defined ); +void yyset_extra ( YY_EXTRA_TYPE user_defined ); -FILE *qry_get_in (void ); +FILE *yyget_in ( void ); -void qry_set_in (FILE * in_str ); +void yyset_in ( FILE * _in_str ); -FILE *qry_get_out (void ); +FILE *yyget_out ( void ); -void qry_set_out (FILE * out_str ); +void yyset_out ( FILE * _out_str ); -int qry_get_leng (void ); + int yyget_leng ( void ); -char *qry_get_text (void ); +char *yyget_text ( void ); -int qry_get_lineno (void ); +int yyget_lineno ( void ); -void qry_set_lineno (int line_number ); +void yyset_lineno ( int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -696,28 +920,31 @@ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int qry_wrap (void ); +extern "C" int yywrap ( void ); #else -extern int qry_wrap (void ); +extern int yywrap ( void ); #endif #endif - static void yyunput (int c,char *buf_ptr ); +#ifndef YY_NO_UNPUT + static void yyunput ( int c, char *buf_ptr ); + +#endif + #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); +static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); +static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT - #ifdef __cplusplus -static int yyinput (void ); +static int yyinput ( void ); #else -static int input (void ); +static int input ( void ); #endif #endif @@ -737,7 +964,7 @@ /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( qry_text, qry_leng, 1, qry_out )) {} } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -748,13 +975,13 @@ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + int n; \ for ( n = 0; n < max_size && \ - (c = getc( qry_in )) != EOF && c != '\n'; ++n ) \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ - if ( c == EOF && ferror( qry_in ) ) \ + if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ @@ -761,7 +988,7 @@ else \ { \ errno=0; \ - while ( (result = fread(buf, 1, max_size, qry_in))==0 && ferror(qry_in)) \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -769,7 +996,7 @@ break; \ } \ errno=0; \ - clearerr(qry_in); \ + clearerr(yyin); \ } \ }\ \ @@ -802,12 +1029,12 @@ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int qry_lex (void); +extern int yylex (void); -#define YY_DECL int qry_lex (void) +#define YY_DECL int yylex (void) #endif /* !YY_DECL */ -/* Code executed at the beginning of each rule, after qry_text and qry_leng +/* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION @@ -816,7 +1043,7 @@ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ @@ -826,14 +1053,10 @@ */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; -#line 40 "query_l.l" - -#line 836 "query_l.c" - if ( !(yy_init) ) { (yy_init) = 1; @@ -845,26 +1068,31 @@ if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ - if ( ! qry_in ) - qry_in = stdin; + if ( ! yyin ) + yyin = stdin; - if ( ! qry_out ) - qry_out = stdout; + if ( ! yyout ) + yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { - qry_ensure_buffer_stack (); + yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = - qry__create_buffer(qry_in,YY_BUF_SIZE ); + yy_create_buffer( yyin, YY_BUF_SIZE ); } - qry__load_buffer_state( ); + yy_load_buffer_state( ); } - while ( 1 ) /* loops until end-of-file is reached */ + { +#line 40 "query_l.l" + +#line 1090 "query_l.c" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); - /* Support of qry_text. */ + /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of @@ -876,7 +1104,7 @@ yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -886,9 +1114,9 @@ { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 215 ) - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 234 ); @@ -919,13 +1147,13 @@ /* rule 1 can match eol */ YY_RULE_SETUP #line 41 "query_l.l" -{ qry_lval.s = pcb_strdup(qry_text+1); qry_lval.s[strlen(qry_lval.s)-1] = '\0'; return T_QSTR; /*"*/ } +{ qry_lval.s = pcb_strdup(yytext+1); qry_lval.s[strlen(qry_lval.s)-1] = '\0'; return T_QSTR; /*"*/ } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP #line 42 "query_l.l" -{ qry_lval.s = pcb_strdup(qry_text+1); qry_lval.s[strlen(qry_lval.s)-1] = '\0'; return T_QSTR; } +{ qry_lval.s = pcb_strdup(yytext+1); qry_lval.s[strlen(qry_lval.s)-1] = '\0'; return T_QSTR; } YY_BREAK case 3: YY_RULE_SETUP @@ -970,167 +1198,167 @@ case 11: YY_RULE_SETUP #line 53 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_OBJ_LINE_POINT); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_OBJ_LINE_POINT); return T_CONST; } YY_BREAK case 12: YY_RULE_SETUP #line 54 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_OBJ_POLY_POINT); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_OBJ_POLY_POINT); return T_CONST; } YY_BREAK case 13: YY_RULE_SETUP #line 55 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_OBJ_LINE); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_OBJ_LINE); return T_CONST; } YY_BREAK case 14: YY_RULE_SETUP #line 56 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_OBJ_TEXT); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_OBJ_TEXT); return T_CONST; } YY_BREAK case 15: YY_RULE_SETUP #line 57 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_OBJ_POLY); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_OBJ_POLY); return T_CONST; } YY_BREAK case 16: YY_RULE_SETUP #line 58 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_OBJ_ARC); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_OBJ_ARC); return T_CONST; } YY_BREAK case 17: YY_RULE_SETUP #line 59 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_OBJ_RAT); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_OBJ_RAT); return T_CONST; } YY_BREAK case 18: YY_RULE_SETUP #line 60 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_OBJ_PSTK); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_OBJ_PSTK); return T_CONST; } YY_BREAK case 19: YY_RULE_SETUP #line 61 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_OBJ_PSTK); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_OBJ_PSTK); return T_CONST; } YY_BREAK case 20: YY_RULE_SETUP #line 62 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_OBJ_SUBC); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_OBJ_SUBC); return T_CONST; } YY_BREAK case 21: YY_RULE_SETUP #line 63 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_OBJ_SUBC); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_OBJ_SUBC); return T_CONST; } YY_BREAK case 22: YY_RULE_SETUP #line 64 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_OBJ_NET); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_OBJ_NET); return T_CONST; } YY_BREAK case 23: YY_RULE_SETUP #line 65 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_OBJ_LAYER); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_OBJ_LAYER); return T_CONST; } YY_BREAK case 24: YY_RULE_SETUP #line 66 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_OBJ_LAYERGRP); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_OBJ_LAYERGRP); return T_CONST; } YY_BREAK case 25: YY_RULE_SETUP #line 68 "query_l.l" -{ qry_lval.n = make_constant(qry_text, 1); return T_CONST; } +{ qry_lval.n = make_constant(yytext, 1); return T_CONST; } YY_BREAK case 26: YY_RULE_SETUP #line 69 "query_l.l" -{ qry_lval.n = make_constant(qry_text, 1); return T_CONST; } +{ qry_lval.n = make_constant(yytext, 1); return T_CONST; } YY_BREAK case 27: YY_RULE_SETUP #line 70 "query_l.l" -{ qry_lval.n = make_constant(qry_text, 1); return T_CONST; } +{ qry_lval.n = make_constant(yytext, 1); return T_CONST; } YY_BREAK case 28: YY_RULE_SETUP #line 71 "query_l.l" -{ qry_lval.n = make_constant(qry_text, 1); return T_CONST; } +{ qry_lval.n = make_constant(yytext, 1); return T_CONST; } YY_BREAK case 29: YY_RULE_SETUP #line 73 "query_l.l" -{ qry_lval.n = make_constant(qry_text, 0); return T_CONST; } +{ qry_lval.n = make_constant(yytext, 0); return T_CONST; } YY_BREAK case 30: YY_RULE_SETUP #line 74 "query_l.l" -{ qry_lval.n = make_constant(qry_text, 0); return T_CONST; } +{ qry_lval.n = make_constant(yytext, 0); return T_CONST; } YY_BREAK case 31: YY_RULE_SETUP #line 75 "query_l.l" -{ qry_lval.n = make_constant(qry_text, 0); return T_CONST; } +{ qry_lval.n = make_constant(yytext, 0); return T_CONST; } YY_BREAK case 32: YY_RULE_SETUP #line 76 "query_l.l" -{ qry_lval.n = make_constant(qry_text, 0); return T_CONST; } +{ qry_lval.n = make_constant(yytext, 0); return T_CONST; } YY_BREAK case 33: YY_RULE_SETUP #line 78 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_LYT_TOP); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_LYT_TOP); return T_CONST; } YY_BREAK case 34: YY_RULE_SETUP #line 79 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_LYT_BOTTOM); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_LYT_BOTTOM); return T_CONST; } YY_BREAK case 35: YY_RULE_SETUP #line 80 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_LYT_INTERN); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_LYT_INTERN); return T_CONST; } YY_BREAK case 36: YY_RULE_SETUP #line 81 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_LYT_INTERN); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_LYT_INTERN); return T_CONST; } YY_BREAK case 37: YY_RULE_SETUP #line 82 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_LYT_COPPER); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_LYT_COPPER); return T_CONST; } YY_BREAK case 38: YY_RULE_SETUP #line 83 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_LYT_SILK); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_LYT_SILK); return T_CONST; } YY_BREAK case 39: YY_RULE_SETUP #line 84 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_LYT_MASK); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_LYT_MASK); return T_CONST; } YY_BREAK case 40: YY_RULE_SETUP #line 85 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_LYT_PASTE); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_LYT_PASTE); return T_CONST; } YY_BREAK case 41: YY_RULE_SETUP #line 86 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_LYT_MECH); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_LYT_MECH); return T_CONST; } YY_BREAK case 42: YY_RULE_SETUP #line 87 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_LYT_DOC); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_LYT_DOC); return T_CONST; } YY_BREAK case 43: YY_RULE_SETUP #line 88 "query_l.l" -{ qry_lval.n = make_constant(qry_text, PCB_LYT_BOUNDARY); return T_CONST; } +{ qry_lval.n = make_constant(yytext, PCB_LYT_BOUNDARY); return T_CONST; } YY_BREAK case 44: YY_RULE_SETUP @@ -1200,27 +1428,27 @@ case 57: YY_RULE_SETUP #line 107 "query_l.l" -{ qry_lval.c = strtol(qry_text, NULL, 10); return T_INT; } +{ qry_lval.c = strtol(yytext, NULL, 10); return T_INT; } YY_BREAK case 58: YY_RULE_SETUP #line 108 "query_l.l" -{ qry_lval.d = strtod(qry_text, NULL); return T_DBL; } +{ qry_lval.d = strtod(yytext, NULL); return T_DBL; } YY_BREAK case 59: YY_RULE_SETUP #line 109 "query_l.l" -{ qry_lval.d = strtod(qry_text, NULL); return T_DBL; } +{ qry_lval.d = strtod(yytext, NULL); return T_DBL; } YY_BREAK case 60: YY_RULE_SETUP #line 110 "query_l.l" -{ qry_lval.s = pcb_strdup(qry_text); return T_STR; } +{ qry_lval.s = pcb_strdup(yytext); return T_STR; } YY_BREAK case 61: YY_RULE_SETUP #line 112 "query_l.l" -{ return *qry_text; } +{ return *yytext; } YY_BREAK case 62: /* rule 62 can match eol */ @@ -1238,7 +1466,7 @@ #line 117 "query_l.l" ECHO; YY_BREAK -#line 1242 "query_l.c" +#line 1470 "query_l.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1255,8 +1483,8 @@ { /* We're scanning a new file or input source. It's * possible that this happened because the user - * just pointed qry_in at a new source and called - * qry_lex(). If so, then we have to assure + * just pointed yyin at a new source and called + * yylex(). 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 @@ -1263,7 +1491,7 @@ * 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 = qry_in; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } @@ -1316,11 +1544,11 @@ { (yy_did_buffer_switch_on_eof) = 0; - if ( qry_wrap( ) ) + if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up - * qry_text, we can now set up + * yytext, 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 @@ -1369,7 +1597,8 @@ "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ -} /* end of qry_lex */ + } /* end of user's declarations */ +} /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * @@ -1380,9 +1609,9 @@ */ static int yy_get_next_buffer (void) { - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) @@ -1411,7 +1640,7 @@ /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -1431,7 +1660,7 @@ { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); @@ -1447,11 +1676,12 @@ b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - qry_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -1469,7 +1699,7 @@ /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); + (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1479,7 +1709,7 @@ if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - qry_restart(qry_in ); + yyrestart( yyin ); } else @@ -1493,12 +1723,15 @@ else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if (((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 *) qry_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } (yy_n_chars) += number_to_move; @@ -1514,14 +1747,14 @@ static yy_state_type yy_get_previous_state (void) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -1531,9 +1764,9 @@ { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 215 ) - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } return yy_current_state; @@ -1546,10 +1779,10 @@ */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -1559,30 +1792,32 @@ { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 215 ) - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; yy_is_jam = (yy_current_state == 214); - return yy_is_jam ? 0 : yy_current_state; + return yy_is_jam ? 0 : yy_current_state; } - static void yyunput (int c, register char * yy_bp ) +#ifndef YY_NO_UNPUT + + static void yyunput (int c, char * yy_bp ) { - register char *yy_cp; + char *yy_cp; yy_cp = (yy_c_buf_p); - /* undo effects of setting up qry_text */ + /* undo effects of setting up yytext */ *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 int number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = + char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -1591,7 +1826,7 @@ 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; + (yy_n_chars) = (int) 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" ); @@ -1604,6 +1839,8 @@ (yy_c_buf_p) = yy_cp; } +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) @@ -1628,7 +1865,7 @@ else { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -1645,14 +1882,14 @@ */ /* Reset buffer status. */ - qry_restart(qry_in ); + yyrestart( yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( qry_wrap( ) ) - return EOF; + if ( yywrap( ) ) + return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -1671,7 +1908,7 @@ } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve qry_text */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); return c; @@ -1683,17 +1920,17 @@ * * @note This function does not reset the start condition to @c INITIAL . */ - void qry_restart (FILE * input_file ) + void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ - qry_ensure_buffer_stack (); + yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = - qry__create_buffer(qry_in,YY_BUF_SIZE ); + yy_create_buffer( yyin, YY_BUF_SIZE ); } - qry__init_buffer(YY_CURRENT_BUFFER,input_file ); - qry__load_buffer_state( ); + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); } /** Switch to a different input buffer. @@ -1700,15 +1937,15 @@ * @param new_buffer The new input buffer. * */ - void qry__switch_to_buffer (YY_BUFFER_STATE new_buffer ) + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with - * qry_pop_buffer_state(); - * qry_push_buffer_state(new_buffer); + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); */ - qry_ensure_buffer_stack (); + yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; @@ -1721,21 +1958,21 @@ } YY_CURRENT_BUFFER_LVALUE = new_buffer; - qry__load_buffer_state( ); + yy_load_buffer_state( ); /* We don't actually know whether we did this switch during - * EOF (qry_wrap()) processing, but the only time this flag - * is looked at is after qry_wrap() is called, so it's safe + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } -static void qry__load_buffer_state (void) +static void yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - qry_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } @@ -1745,13 +1982,13 @@ * * @return the allocated buffer state. */ - YY_BUFFER_STATE qry__create_buffer (FILE * file, int size ) + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) qry_alloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in qry__create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; @@ -1758,22 +1995,22 @@ /* 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 *) qry_alloc(b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in qry__create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - qry__init_buffer(b,file ); + yy_init_buffer( b, file ); return b; } /** Destroy the buffer. - * @param b a buffer created with qry__create_buffer() + * @param b a buffer created with yy_create_buffer() * */ - void qry__delete_buffer (YY_BUFFER_STATE b ) + void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) @@ -1783,31 +2020,27 @@ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - qry_free((void *) b->yy_ch_buf ); + yyfree( (void *) b->yy_ch_buf ); - qry_free((void *) b ); + yyfree( (void *) b ); } -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, - * such as during a qry_restart() or at EOF. + * such as during a yyrestart() or at EOF. */ - static void qry__init_buffer (YY_BUFFER_STATE b, FILE * file ) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; - qry__flush_buffer(b ); + yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; - /* If b is the current buffer, then qry__init_buffer was _probably_ - * called from qry_restart() or through yy_get_next_buffer. + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ @@ -1824,7 +2057,7 @@ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ - void qry__flush_buffer (YY_BUFFER_STATE b ) + void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; @@ -1844,7 +2077,7 @@ b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) - qry__load_buffer_state( ); + yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes @@ -1853,14 +2086,14 @@ * @param new_buffer The new state. * */ -void qry_push_buffer_state (YY_BUFFER_STATE new_buffer ) +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; - qry_ensure_buffer_stack(); + yyensure_buffer_stack(); - /* This block is copied from qry__switch_to_buffer. */ + /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ @@ -1874,8 +2107,8 @@ (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; - /* copied from qry__switch_to_buffer. */ - qry__load_buffer_state( ); + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } @@ -1883,18 +2116,18 @@ * The next element becomes the new top. * */ -void qry_pop_buffer_state (void) +void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; - qry__delete_buffer(YY_CURRENT_BUFFER ); + yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { - qry__load_buffer_state( ); + yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } @@ -1902,9 +2135,9 @@ /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void qry_ensure_buffer_stack (void) +static void yyensure_buffer_stack (void) { - int num_to_alloc; + yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { @@ -1912,15 +2145,15 @@ * 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**)qry_alloc + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in qry_ensure_buffer_stack()" ); - + YY_FATAL_ERROR( "out of dynamic memory in yyensure_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; @@ -1929,15 +2162,15 @@ 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 */; + yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)qry_realloc + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in qry_ensure_buffer_stack()" ); + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); @@ -1949,9 +2182,9 @@ * @param base the character buffer * @param size the size in bytes of the character buffer * - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE qry__scan_buffer (char * base, yy_size_t size ) +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; @@ -1959,16 +2192,16 @@ 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; + return NULL; - b = (YY_BUFFER_STATE) qry_alloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in qry__scan_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_size = (int) (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_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; @@ -1975,26 +2208,26 @@ b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - qry__switch_to_buffer(b ); + yy_switch_to_buffer( b ); return b; } -/** Setup the input buffer state to scan a string. The next call to qry_lex() will +/** Setup the input buffer state to scan a string. The next call to yylex() 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 - * qry__scan_bytes() instead. + * yy_scan_bytes() instead. */ -YY_BUFFER_STATE qry__scan_string (yyconst char * yystr ) +YY_BUFFER_STATE yy_scan_string (const char * yystr ) { - return qry__scan_bytes(yystr,strlen(yystr) ); + return yy_scan_bytes( yystr, (int) strlen(yystr) ); } -/** Setup the input buffer state to scan the given bytes. The next call to qry_lex() will +/** Setup the input buffer state to scan the given bytes. The next call to yylex() 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. @@ -2001,7 +2234,7 @@ * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE qry__scan_bytes (yyconst char * yybytes, int _yybytes_len ) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; @@ -2009,10 +2242,10 @@ int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) qry_alloc(n ); + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n ); if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in qry__scan_bytes()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; @@ -2019,9 +2252,9 @@ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = qry__scan_buffer(buf,n ); + b = yy_scan_buffer( buf, n ); if ( ! b ) - YY_FATAL_ERROR( "bad buffer in qry__scan_bytes()" ); + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. @@ -2035,9 +2268,9 @@ #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg ) +static void yynoreturn yy_fatal_error (const char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); + fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -2047,14 +2280,14 @@ #define yyless(n) \ do \ { \ - /* Undo effects of setting up qry_text. */ \ + /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ - qry_text[qry_leng] = (yy_hold_char); \ - (yy_c_buf_p) = qry_text + yyless_macro_arg; \ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ - qry_leng = yyless_macro_arg; \ + yyleng = yyless_macro_arg; \ } \ while ( 0 ) @@ -2063,34 +2296,34 @@ /** Get the current line number. * */ -int qry_get_lineno (void) +int yyget_lineno (void) { - - return qry_lineno; + + return yylineno; } /** Get the input stream. * */ -FILE *qry_get_in (void) +FILE *yyget_in (void) { - return qry_in; + return yyin; } /** Get the output stream. * */ -FILE *qry_get_out (void) +FILE *yyget_out (void) { - return qry_out; + return yyout; } /** Get the length of the current token. * */ -int qry_get_leng (void) +int yyget_leng (void) { - return qry_leng; + return yyleng; } /** Get the current token. @@ -2097,92 +2330,92 @@ * */ -char *qry_get_text (void) +char *yyget_text (void) { - return qry_text; + return yytext; } /** Set the current line number. - * @param line_number + * @param _line_number line number * */ -void qry_set_lineno (int line_number ) +void yyset_lineno (int _line_number ) { - qry_lineno = line_number; + yylineno = _line_number; } /** Set the input stream. This does not discard the current * input buffer. - * @param in_str A readable stream. + * @param _in_str A readable stream. * - * @see qry__switch_to_buffer + * @see yy_switch_to_buffer */ -void qry_set_in (FILE * in_str ) +void yyset_in (FILE * _in_str ) { - qry_in = in_str ; + yyin = _in_str ; } -void qry_set_out (FILE * out_str ) +void yyset_out (FILE * _out_str ) { - qry_out = out_str ; + yyout = _out_str ; } -int qry_get_debug (void) +int yyget_debug (void) { - return qry__flex_debug; + return yy_flex_debug; } -void qry_set_debug (int bdebug ) +void yyset_debug (int _bdebug ) { - qry__flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. - * This function is called from qry_lex_destroy(), so don't allocate here. + * This function is called from yylex_destroy(), so don't allocate here. */ - (yy_buffer_stack) = 0; + (yy_buffer_stack) = NULL; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; + (yy_c_buf_p) = NULL; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT - qry_in = stdin; - qry_out = stdout; + yyin = stdin; + yyout = stdout; #else - qry_in = (FILE *) 0; - qry_out = (FILE *) 0; + yyin = NULL; + yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by - * qry_lex_init() + * yylex_init() */ return 0; } -/* qry_lex_destroy is for both reentrant and non-reentrant scanners. */ -int qry_lex_destroy (void) +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ - qry__delete_buffer(YY_CURRENT_BUFFER ); + yy_delete_buffer( YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; - qry_pop_buffer_state(); + yypop_buffer_state(); } /* Destroy the stack itself. */ - qry_free((yy_buffer_stack) ); + yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time - * qry_lex() is called, initialization will occur. */ + * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; @@ -2193,9 +2426,10 @@ */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +static void yy_flex_strncpy (char* s1, const char * s2, int n ) { - register int i; + + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } @@ -2202,9 +2436,9 @@ #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) +static int yy_flex_strlen (const char * s ) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -2212,13 +2446,14 @@ } #endif -void *qry_alloc (yy_size_t size ) +void *yyalloc (yy_size_t size ) { - return (void *) malloc( size ); + return malloc(size); } -void *qry_realloc (void * ptr, yy_size_t size ) +void *yyrealloc (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 @@ -2226,12 +2461,12 @@ * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } -void qry_free (void * ptr ) +void yyfree (void * ptr ) { - free( (char *) ptr ); /* see qry_realloc() for (char *) cast */ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" @@ -2239,7 +2474,6 @@ #line 117 "query_l.l" - static int qry_yy_input(char *buf, int buflen) { int len; Index: trunk/src_plugins/query/query_l.h =================================================================== --- trunk/src_plugins/query/query_l.h (revision 27088) +++ trunk/src_plugins/query/query_l.h (revision 27089) @@ -12,12 +12,246 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif +#ifdef yy_create_buffer +#define qry__create_buffer_ALREADY_DEFINED +#else +#define yy_create_buffer qry__create_buffer +#endif + +#ifdef yy_delete_buffer +#define qry__delete_buffer_ALREADY_DEFINED +#else +#define yy_delete_buffer qry__delete_buffer +#endif + +#ifdef yy_scan_buffer +#define qry__scan_buffer_ALREADY_DEFINED +#else +#define yy_scan_buffer qry__scan_buffer +#endif + +#ifdef yy_scan_string +#define qry__scan_string_ALREADY_DEFINED +#else +#define yy_scan_string qry__scan_string +#endif + +#ifdef yy_scan_bytes +#define qry__scan_bytes_ALREADY_DEFINED +#else +#define yy_scan_bytes qry__scan_bytes +#endif + +#ifdef yy_init_buffer +#define qry__init_buffer_ALREADY_DEFINED +#else +#define yy_init_buffer qry__init_buffer +#endif + +#ifdef yy_flush_buffer +#define qry__flush_buffer_ALREADY_DEFINED +#else +#define yy_flush_buffer qry__flush_buffer +#endif + +#ifdef yy_load_buffer_state +#define qry__load_buffer_state_ALREADY_DEFINED +#else +#define yy_load_buffer_state qry__load_buffer_state +#endif + +#ifdef yy_switch_to_buffer +#define qry__switch_to_buffer_ALREADY_DEFINED +#else +#define yy_switch_to_buffer qry__switch_to_buffer +#endif + +#ifdef yypush_buffer_state +#define qry_push_buffer_state_ALREADY_DEFINED +#else +#define yypush_buffer_state qry_push_buffer_state +#endif + +#ifdef yypop_buffer_state +#define qry_pop_buffer_state_ALREADY_DEFINED +#else +#define yypop_buffer_state qry_pop_buffer_state +#endif + +#ifdef yyensure_buffer_stack +#define qry_ensure_buffer_stack_ALREADY_DEFINED +#else +#define yyensure_buffer_stack qry_ensure_buffer_stack +#endif + +#ifdef yylex +#define qry_lex_ALREADY_DEFINED +#else +#define yylex qry_lex +#endif + +#ifdef yyrestart +#define qry_restart_ALREADY_DEFINED +#else +#define yyrestart qry_restart +#endif + +#ifdef yylex_init +#define qry_lex_init_ALREADY_DEFINED +#else +#define yylex_init qry_lex_init +#endif + +#ifdef yylex_init_extra +#define qry_lex_init_extra_ALREADY_DEFINED +#else +#define yylex_init_extra qry_lex_init_extra +#endif + +#ifdef yylex_destroy +#define qry_lex_destroy_ALREADY_DEFINED +#else +#define yylex_destroy qry_lex_destroy +#endif + +#ifdef yyget_debug +#define qry_get_debug_ALREADY_DEFINED +#else +#define yyget_debug qry_get_debug +#endif + +#ifdef yyset_debug +#define qry_set_debug_ALREADY_DEFINED +#else +#define yyset_debug qry_set_debug +#endif + +#ifdef yyget_extra +#define qry_get_extra_ALREADY_DEFINED +#else +#define yyget_extra qry_get_extra +#endif + +#ifdef yyset_extra +#define qry_set_extra_ALREADY_DEFINED +#else +#define yyset_extra qry_set_extra +#endif + +#ifdef yyget_in +#define qry_get_in_ALREADY_DEFINED +#else +#define yyget_in qry_get_in +#endif + +#ifdef yyset_in +#define qry_set_in_ALREADY_DEFINED +#else +#define yyset_in qry_set_in +#endif + +#ifdef yyget_out +#define qry_get_out_ALREADY_DEFINED +#else +#define yyget_out qry_get_out +#endif + +#ifdef yyset_out +#define qry_set_out_ALREADY_DEFINED +#else +#define yyset_out qry_set_out +#endif + +#ifdef yyget_leng +#define qry_get_leng_ALREADY_DEFINED +#else +#define yyget_leng qry_get_leng +#endif + +#ifdef yyget_text +#define qry_get_text_ALREADY_DEFINED +#else +#define yyget_text qry_get_text +#endif + +#ifdef yyget_lineno +#define qry_get_lineno_ALREADY_DEFINED +#else +#define yyget_lineno qry_get_lineno +#endif + +#ifdef yyset_lineno +#define qry_set_lineno_ALREADY_DEFINED +#else +#define yyset_lineno qry_set_lineno +#endif + +#ifdef yywrap +#define qry_wrap_ALREADY_DEFINED +#else +#define yywrap qry_wrap +#endif + +#ifdef yyalloc +#define qry_alloc_ALREADY_DEFINED +#else +#define yyalloc qry_alloc +#endif + +#ifdef yyrealloc +#define qry_realloc_ALREADY_DEFINED +#else +#define yyrealloc qry_realloc +#endif + +#ifdef yyfree +#define qry_free_ALREADY_DEFINED +#else +#define yyfree qry_free +#endif + +#ifdef yytext +#define qry_text_ALREADY_DEFINED +#else +#define yytext qry_text +#endif + +#ifdef yyleng +#define qry_leng_ALREADY_DEFINED +#else +#define yyleng qry_leng +#endif + +#ifdef yyin +#define qry_in_ALREADY_DEFINED +#else +#define yyin qry_in +#endif + +#ifdef yyout +#define qry_out_ALREADY_DEFINED +#else +#define yyout qry_out +#endif + +#ifdef yy_flex_debug +#define qry__flex_debug_ALREADY_DEFINED +#else +#define yy_flex_debug qry__flex_debug +#endif + +#ifdef yylineno +#define qry_lineno_ALREADY_DEFINED +#else +#define yylineno qry_lineno +#endif + /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ @@ -88,29 +322,23 @@ #define UINT32_MAX (4294967295U) #endif +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + #endif /* ! C99 */ #endif /* ! FLEXINT_H */ -#ifdef __cplusplus +/* begin standard C++ headers. */ -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST +/* TODO: this is always defined, so inline it */ +#define yyconst 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 +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* Size of default input buffer. */ @@ -131,15 +359,15 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -extern int qry_leng; - -extern FILE *qry_in, *qry_out; - #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif +extern int yyleng; + +extern FILE *yyin, *yyout; + #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -152,7 +380,7 @@ /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -180,7 +408,7 @@ 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. */ @@ -191,28 +419,31 @@ }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void qry_restart (FILE *input_file ); -void qry__switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE qry__create_buffer (FILE *file,int size ); -void qry__delete_buffer (YY_BUFFER_STATE b ); -void qry__flush_buffer (YY_BUFFER_STATE b ); -void qry_push_buffer_state (YY_BUFFER_STATE new_buffer ); -void qry_pop_buffer_state (void ); +void yyrestart ( FILE *input_file ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); +void yy_delete_buffer ( YY_BUFFER_STATE b ); +void yy_flush_buffer ( YY_BUFFER_STATE b ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state ( void ); -YY_BUFFER_STATE qry__scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE qry__scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE qry__scan_bytes (yyconst char *bytes,int len ); +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); -void *qry_alloc (yy_size_t ); -void *qry_realloc (void *,yy_size_t ); -void qry_free (void * ); +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); /* Begin user sect3 */ -extern int qry_lineno; +extern int yylineno; -extern char *qry_text; -#define yytext_ptr qry_text +extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif +#define yytext_ptr yytext #ifdef YY_HEADER_EXPORT_START_CONDITIONS #define INITIAL 0 @@ -234,31 +465,31 @@ /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int qry_lex_destroy (void ); +int yylex_destroy ( void ); -int qry_get_debug (void ); +int yyget_debug ( void ); -void qry_set_debug (int debug_flag ); +void yyset_debug ( int debug_flag ); -YY_EXTRA_TYPE qry_get_extra (void ); +YY_EXTRA_TYPE yyget_extra ( void ); -void qry_set_extra (YY_EXTRA_TYPE user_defined ); +void yyset_extra ( YY_EXTRA_TYPE user_defined ); -FILE *qry_get_in (void ); +FILE *yyget_in ( void ); -void qry_set_in (FILE * in_str ); +void yyset_in ( FILE * _in_str ); -FILE *qry_get_out (void ); +FILE *yyget_out ( void ); -void qry_set_out (FILE * out_str ); +void yyset_out ( FILE * _out_str ); -int qry_get_leng (void ); + int yyget_leng ( void ); -char *qry_get_text (void ); +char *yyget_text ( void ); -int qry_get_lineno (void ); +int yyget_lineno ( void ); -void qry_set_lineno (int line_number ); +void yyset_lineno ( int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -266,18 +497,18 @@ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int qry_wrap (void ); +extern "C" int yywrap ( void ); #else -extern int qry_wrap (void ); +extern int yywrap ( void ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); +static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); +static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT @@ -305,9 +536,9 @@ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int qry_lex (void); +extern int yylex (void); -#define YY_DECL int qry_lex (void) +#define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ @@ -324,9 +555,154 @@ #undef YY_DECL #endif +#ifndef qry__create_buffer_ALREADY_DEFINED +#undef yy_create_buffer +#endif +#ifndef qry__delete_buffer_ALREADY_DEFINED +#undef yy_delete_buffer +#endif +#ifndef qry__scan_buffer_ALREADY_DEFINED +#undef yy_scan_buffer +#endif +#ifndef qry__scan_string_ALREADY_DEFINED +#undef yy_scan_string +#endif +#ifndef qry__scan_bytes_ALREADY_DEFINED +#undef yy_scan_bytes +#endif +#ifndef qry__init_buffer_ALREADY_DEFINED +#undef yy_init_buffer +#endif +#ifndef qry__flush_buffer_ALREADY_DEFINED +#undef yy_flush_buffer +#endif +#ifndef qry__load_buffer_state_ALREADY_DEFINED +#undef yy_load_buffer_state +#endif +#ifndef qry__switch_to_buffer_ALREADY_DEFINED +#undef yy_switch_to_buffer +#endif +#ifndef qry_push_buffer_state_ALREADY_DEFINED +#undef yypush_buffer_state +#endif +#ifndef qry_pop_buffer_state_ALREADY_DEFINED +#undef yypop_buffer_state +#endif +#ifndef qry_ensure_buffer_stack_ALREADY_DEFINED +#undef yyensure_buffer_stack +#endif +#ifndef qry_lex_ALREADY_DEFINED +#undef yylex +#endif +#ifndef qry_restart_ALREADY_DEFINED +#undef yyrestart +#endif +#ifndef qry_lex_init_ALREADY_DEFINED +#undef yylex_init +#endif +#ifndef qry_lex_init_extra_ALREADY_DEFINED +#undef yylex_init_extra +#endif +#ifndef qry_lex_destroy_ALREADY_DEFINED +#undef yylex_destroy +#endif +#ifndef qry_get_debug_ALREADY_DEFINED +#undef yyget_debug +#endif +#ifndef qry_set_debug_ALREADY_DEFINED +#undef yyset_debug +#endif +#ifndef qry_get_extra_ALREADY_DEFINED +#undef yyget_extra +#endif +#ifndef qry_set_extra_ALREADY_DEFINED +#undef yyset_extra +#endif +#ifndef qry_get_in_ALREADY_DEFINED +#undef yyget_in +#endif +#ifndef qry_set_in_ALREADY_DEFINED +#undef yyset_in +#endif +#ifndef qry_get_out_ALREADY_DEFINED +#undef yyget_out +#endif +#ifndef qry_set_out_ALREADY_DEFINED +#undef yyset_out +#endif +#ifndef qry_get_leng_ALREADY_DEFINED +#undef yyget_leng +#endif +#ifndef qry_get_text_ALREADY_DEFINED +#undef yyget_text +#endif +#ifndef qry_get_lineno_ALREADY_DEFINED +#undef yyget_lineno +#endif +#ifndef qry_set_lineno_ALREADY_DEFINED +#undef yyset_lineno +#endif +#ifndef qry_get_column_ALREADY_DEFINED +#undef yyget_column +#endif +#ifndef qry_set_column_ALREADY_DEFINED +#undef yyset_column +#endif +#ifndef qry_wrap_ALREADY_DEFINED +#undef yywrap +#endif +#ifndef qry_get_lval_ALREADY_DEFINED +#undef yyget_lval +#endif +#ifndef qry_set_lval_ALREADY_DEFINED +#undef yyset_lval +#endif +#ifndef qry_get_lloc_ALREADY_DEFINED +#undef yyget_lloc +#endif +#ifndef qry_set_lloc_ALREADY_DEFINED +#undef yyset_lloc +#endif +#ifndef qry_alloc_ALREADY_DEFINED +#undef yyalloc +#endif +#ifndef qry_realloc_ALREADY_DEFINED +#undef yyrealloc +#endif +#ifndef qry_free_ALREADY_DEFINED +#undef yyfree +#endif +#ifndef qry_text_ALREADY_DEFINED +#undef yytext +#endif +#ifndef qry_leng_ALREADY_DEFINED +#undef yyleng +#endif +#ifndef qry_in_ALREADY_DEFINED +#undef yyin +#endif +#ifndef qry_out_ALREADY_DEFINED +#undef yyout +#endif +#ifndef qry__flex_debug_ALREADY_DEFINED +#undef yy_flex_debug +#endif +#ifndef qry_lineno_ALREADY_DEFINED +#undef yylineno +#endif +#ifndef qry_tables_fload_ALREADY_DEFINED +#undef yytables_fload +#endif +#ifndef qry_tables_destroy_ALREADY_DEFINED +#undef yytables_destroy +#endif +#ifndef qry_TABLES_NAME_ALREADY_DEFINED +#undef yyTABLES_NAME +#endif + #line 117 "query_l.l" -#line 331 "query_l.h" +#line 707 "query_l.h" #undef qry_IN_HEADER #endif /* qry_HEADER_H */