2 Copyright (c) 1999-2014 OPEN CASCADE SAS
4 This file is part of Open CASCADE Technology software library.
6 This library is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License version 2.1 as published
8 by the Free Software Foundation, with special exception defined in the file
9 OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 distribution for complete text of the license and disclaimer of any warranty.
12 Alternatively, this file may be used under the terms of Open CASCADE
13 commercial license or contractual agreement.
16 %token STEP HEADER ENDSEC DATA ENDSTEP SCOPE ENDSCOPE ENTITY TYPE INTEGER FLOAT IDENT TEXT NONDEF ENUM HEXA QUID
19 #include "recfile.ph" /* definitions des types d'arguments */
20 #include "recfile.pc" /* la-dedans, tout y est */
22 #define stepparse STEPparse
23 #define steplex STEPlex
24 #define stepwrap STEPwrap
25 #define steprestart STEPrestart
26 #define steplex STEPlex
27 #define steplval STEPlval
28 #define stepval STEPval
29 #define stepchar STEPchar
30 #define stepdebug STEPdebug
31 #define stepnerrs STEPnerrs
32 #define steperror STEPerror
34 #define stepclearin yychar = -1
35 #define steperrok yyerrflag = 0
39 #define yyerrflag STEPerrflag
40 #define yyerrstatus STEPerrflag
43 /* ABV 19.12.00: merging porting modifications by POP (for WNT, AIX) */
44 #if defined(WNT) && !defined(MSDOS)
53 // disable MSVC warnings in bison code
55 #pragma warning(disable:4244 4131 4127 4702)
56 #define YYMALLOC malloc
62 /* N.B. : les commentaires sont filtres par LEX */
63 /* La fin vide (selon systeme emetteur) est filtree ici */
68 stepf1 : STEP HEADER headl ENDSEC endhead model ENDSEC finstep ;
69 stepf2 : STEP HEADER ENDSEC endhead model ENDSEC ENDSTEP ;
70 stepf3 : STEP HEADER ENDSEC endhead model error ;
71 stepf : stepf1 | stepf2 | stepf3
72 { rec_finfile(); return(0); /* fini pour celui-la */ }
77 headent : enttype listarg ';'
78 | error /* Erreur sur Entite : la sauter */
83 unarg : IDENT { rec_typarg(rec_argIdent); rec_newarg(); }
84 | QUID { /* deja fait par lex*/ rec_newarg(); }
85 | listarg /* rec_newent lors du ')' */ { rec_newarg(); }
86 | listype listarg /* liste typee */ { rec_newarg(); }
87 | error { rec_typarg(rec_argMisc); rec_newarg();
88 yyerrstatus = 1; yyclearin; }
89 /* Erreur sur Parametre : tacher de le noter sans jeter l'Entite */
99 { printf("Record no : %d -- ",nbrec+1); rec_print(currec); }
100 rec_newent (); yyerrstatus = 0; }
102 listarg : deblist finlist /* liste vide (peut y en avoir) */
103 | deblist arglist finlist /* liste normale, non vide */
113 bloc : entlab '=' unent ';'
114 | entlab '=' debscop model finscop unent ';'
115 | entlab '=' debscop finscop unent ';'
116 | error /* Erreur sur Entite : la sauter */
118 plex : enttype listarg
119 | plex enttype listarg /* sert a ce qui suit : */
121 unent : enttype listarg /* Entite de Type Simple */
122 | '(' plex ')' /* Entite de Type Complexe */
128 { rec_typarg(rec_argIdent); rec_newarg(); }
138 | ENDSCOPE debexp export '/'
139 { printf("*** Warning : Export List not yet processed\n");
140 rec_newent(); scope_fin() ; }
141 /* La liste Export est prise comme ARGUMENT du EndScope */