Skip to content
Snippets Groups Projects
Gmsh.tab.cpp 300 KiB
Newer Older
# endif

# define YYDPRINTF(Args)			\
do {						\
  if (yydebug)					\
    YYFPRINTF Args;				\
} while (0)

# define YYDSYMPRINT(Args)			\
do {						\
  if (yydebug)					\
    yysymprint Args;				\
} while (0)

# define YYDSYMPRINTF(Title, Token, Value, Location)		\
do {								\
  if (yydebug)							\
    {								\
      YYFPRINTF (stderr, "%s ", Title);				\
      yysymprint (stderr, 					\
                  Token, Value);	\
      YYFPRINTF (stderr, "\n");					\
    }								\
} while (0)
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (cinluded).                                                   |
`------------------------------------------------------------------*/
#if defined (__STDC__) || defined (__cplusplus)
static void
yy_stack_print (short *bottom, short *top)
#else
static void
yy_stack_print (bottom, top)
    short *bottom;
    short *top;
{
  YYFPRINTF (stderr, "Stack now");
  for (/* Nothing. */; bottom <= top; ++bottom)
    YYFPRINTF (stderr, " %d", *bottom);
  YYFPRINTF (stderr, "\n");
}
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

# define YY_STACK_PRINT(Bottom, Top)				\
do {								\
  if (yydebug)							\
    yy_stack_print ((Bottom), (Top));				\
} while (0)
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yy_reduce_print (int yyrule)
#else
static void
yy_reduce_print (yyrule)
    int yyrule;
#endif
{
  int yyi;
  unsigned int yylineno = yyrline[yyrule];
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
             yyrule - 1, yylineno);
  /* Print the symbols being reduced, and their result.  */
  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
}
# define YY_REDUCE_PRINT(Rule)		\
do {					\
  if (yydebug)				\
    yy_reduce_print (Rule);		\
} while (0)

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YYDSYMPRINT(Args)
# define YYDSYMPRINTF(Title, Token, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */


/* YYINITDEPTH -- initial size of the parser's stacks.  */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#ifndef	YYINITDEPTH
# define YYINITDEPTH 200
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#endif

/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).

   Do not make this value too large; the results are undefined if
   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#endif

#if YYERROR_VERBOSE

# ifndef yystrlen
#  if defined (__GLIBC__) && defined (_STRING_H)
#   define yystrlen strlen
#  else
/* Return the length of YYSTR.  */
static YYSIZE_T
#   if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
#   else
yystrlen (yystr)
     const char *yystr;
#   endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
  register const char *yys = yystr;
  while (*yys++ != '\0')
    continue;

  return yys - yystr - 1;
}
#  endif
# endif

# ifndef yystpcpy
#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
#   define yystpcpy stpcpy
#  else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
   YYDEST.  */
static char *
#   if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
#   else
yystpcpy (yydest, yysrc)
     char *yydest;
     const char *yysrc;
#   endif
{
  register char *yyd = yydest;
  register const char *yys = yysrc;

  while ((*yyd++ = *yys++) != '\0')
    continue;

  return yyd - 1;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
}
#  endif
# endif
#endif /* !YYERROR_VERBOSE */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed



#if YYDEBUG
/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
#else
static void
yysymprint (yyoutput, yytype, yyvaluep)
    FILE *yyoutput;
    int yytype;
    YYSTYPE *yyvaluep;
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;

  if (yytype < YYNTOKENS)
    {
      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
# ifdef YYPRINT
      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
    }
  else
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
  switch (yytype)
    {
      default:
        break;
    }
  YYFPRINTF (yyoutput, ")");
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
}
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

#endif /* ! YYDEBUG */
/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yydestruct (int yytype, YYSTYPE *yyvaluep)
#else
static void
yydestruct (yytype, yyvaluep)
    int yytype;
    YYSTYPE *yyvaluep;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;

  switch (yytype)
    {

      default:
        break;
    }
}
/* Prevent warnings from -Wmissing-prototypes.  */
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM);
# else
int yyparse ();
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
int yyparse (void);
#else
int yyparse ();
#endif /* ! YYPARSE_PARAM */



/* The lookahead symbol.  */
int yychar;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;

/* Number of syntax errors so far.  */
int yynerrs;



/*----------.
| yyparse.  |
`----------*/

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM)
# else
int yyparse (YYPARSE_PARAM)
  void *YYPARSE_PARAM;
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int
yyparse (void)
#else
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
int
  int yyresult;
  /* Number of tokens to shift before error messages enabled.  */
  int yyerrstatus;
  /* Lookahead token as an internal (translated) token number.  */
  int yytoken = 0;

  /* Three stacks and their tools:
     `yyss': related to states,
     `yyvs': related to semantic values,
     `yyls': related to locations.

     Refer to the stacks thru separate pointers, to allow yyoverflow
     to reallocate them elsewhere.  */

  /* The state stack.  */
  short	yyssa[YYINITDEPTH];
  short *yyss = yyssa;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

  /* The semantic value stack.  */
  YYSTYPE yyvsa[YYINITDEPTH];
  YYSTYPE *yyvs = yyvsa;
  register YYSTYPE *yyvsp;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#define YYPOPSTACK   (yyvsp--, yyssp--)
  YYSIZE_T yystacksize = YYINITDEPTH;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

  /* When reducing, the number of symbols on the RHS of the reduced
     rule.  */
  YYDPRINTF ((stderr, "Starting parse\n"));

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss;
  goto yysetstate;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
 yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed. so pushing a state here evens the stacks.
     */
  yyssp++;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

 yysetstate:
  *yyssp = yystate;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

  if (yyss + yystacksize - 1 <= yyssp)
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = yyssp - yyss + 1;
      {
	/* Give user a chance to reallocate the stack. Use copies of
	   these so that the &'s don't force the real ones into
	   memory.  */
	YYSTYPE *yyvs1 = yyvs;
	short *yyss1 = yyss;

	/* Each stack pointer address is followed by the size of the
	   data in use in that stack, in bytes.  This used to be a
	   conditional around just the two extra args, but that might
	   be undefined if yyoverflow is a macro.  */
	yyoverflow ("parser stack overflow",
		    &yyss1, yysize * sizeof (*yyssp),
		    &yyvs1, yysize * sizeof (*yyvsp),

		    &yystacksize);

	yyss = yyss1;
	yyvs = yyvs1;
      }
# ifndef YYSTACK_RELOCATE
      goto yyoverflowlab;
# else
      if (YYMAXDEPTH <= yystacksize)
	goto yyoverflowlab;
      if (YYMAXDEPTH < yystacksize)

      {
	short *yyss1 = yyss;
	union yyalloc *yyptr =
	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
	if (! yyptr)
	  goto yyoverflowlab;
	YYSTACK_RELOCATE (yyss);
	YYSTACK_RELOCATE (yyvs);

#  undef YYSTACK_RELOCATE
	if (yyss1 != yyssa)
	  YYSTACK_FREE (yyss1);
      }
# endif
      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
		  (unsigned long int) yystacksize));

      if (yyss + yystacksize - 1 <= yyssp)
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));

/*-----------.
| yybackup.  |
`-----------*/
yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYPACT_NINF)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
      YYDPRINTF ((stderr, "Reading a token: "));
  if (yychar <= YYEOF)
      yychar = yytoken = YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
      yytoken = YYTRANSLATE (yychar);
      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
  if (yyn <= 0)
      if (yyn == 0 || yyn == YYTABLE_NINF)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */
  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;


  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
  /* yyn is the number of a rule to reduce with.  */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

  /* If YYLEN is nonzero, implement the default value of the action:
     `$$ = $1'.
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
        case 4:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 160 "Gmsh.y"
    { yyerrok; return 1; ;}
    break;

  case 7:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 176 "Gmsh.y"
    { return 1; ;}
    break;

  case 8:
#line 177 "Gmsh.y"
    { return 1; ;}
    break;

  case 9:
#line 178 "Gmsh.y"
    { return 1; ;}
    break;

  case 10:
#line 183 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      yymsg(INFO, "Reading Step Iso-10303-21 data");
      Create_Step_Solid_BRep();
#line 188 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Resolve_BREP ();
      yymsg(INFO, "Read Step Iso-10303-21 data");
#line 199 "Gmsh.y"
#line 202 "Gmsh.y"
#line 206 "Gmsh.y"
#line 212 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_Cartesian_Point((int)yyvsp[-8].d, yyvsp[-4].c, yyvsp[-2].v[0], yyvsp[-2].v[1], yyvsp[-2].v[2]);
#line 218 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_BSpline_Curve_With_Knots ((int)yyvsp[-22].d, yyvsp[-18].c, (int) yyvsp[-16].d, yyvsp[-14].l,	yyvsp[-6].l, yyvsp[-4].l, 0., 1.);
#line 225 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_BSpline_Surface_With_Knots ((int)yyvsp[-30].d, yyvsp[-26].c, (int) yyvsp[-24].d, (int) yyvsp[-22].d, yyvsp[-20].l, yyvsp[-10].l,
				      yyvsp[-8].l, yyvsp[-6].l, yyvsp[-4].l, 0., 1., 0., 1. );
#line 231 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_Edge_Curve ((int)yyvsp[-14].d, yyvsp[-10].c , (int)yyvsp[-8].d , (int)yyvsp[-6].d, (int)yyvsp[-4].d);
#line 235 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_Face_Outer_Bound((int)yyvsp[-10].d, yyvsp[-6].c, (int)yyvsp[-4].d, yyvsp[-2].i, 1);
#line 239 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      // check the norm! Face_Bound : hole outside surface!
      yymsg(INFO, "Found a face bound");
      Add_Face_Outer_Bound((int)yyvsp[-10].d, yyvsp[-6].c, (int)yyvsp[-4].d, yyvsp[-2].i, 0);
#line 246 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_Oriented_Edge((int)yyvsp[-14].d, yyvsp[-10].c, (int)yyvsp[-4].d, yyvsp[-2].i);
#line 250 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_Edge_Loop((int)yyvsp[-8].d, yyvsp[-4].c, yyvsp[-2].l);
#line 255 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_Advanced_Face((int)yyvsp[-12].d, yyvsp[-8].c, yyvsp[-6].l, (int)yyvsp[-4].d, yyvsp[-2].i);
#line 259 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_Vertex_Point((int)yyvsp[-8].d, yyvsp[-4].c, (int)yyvsp[-2].d);
#line 263 "Gmsh.y"
#line 267 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_Axis2_Placement3D  ((int)yyvsp[-12].d, (int)yyvsp[-4].d, (int)yyvsp[-2].d, (int)yyvsp[-6].d);
#line 271 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_Direction((int)yyvsp[-8].d , yyvsp[-4].c, yyvsp[-2].v[0], yyvsp[-2].v[1], yyvsp[-2].v[2]);
#line 275 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_Plane((int)yyvsp[-8].d, yyvsp[-4].c, (int)yyvsp[-2].d);
#line 279 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_Line ((int)yyvsp[-10].d, yyvsp[-6].c , (int) yyvsp[-4].d, (int)yyvsp[-2].d);
#line 283 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      yymsg(INFO, "Found a closed shell");
      Add_Closed_Shell((int)yyvsp[-8].d, yyvsp[-4].c , yyvsp[-2].l);
#line 289 "Gmsh.y"
#line 292 "Gmsh.y"
#line 295 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_Cylinder ((int)yyvsp[-10].d, yyvsp[-6].c , (int)yyvsp[-4].d, yyvsp[-2].d);
#line 299 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_Cone ((int)yyvsp[-12].d, yyvsp[-8].c , (int)yyvsp[-6].d, yyvsp[-4].d, yyvsp[-2].d);
#line 303 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Add_Torus ((int)yyvsp[-12].d, yyvsp[-8].c , (int)yyvsp[-6].d, yyvsp[-4].d, yyvsp[-2].d);
#line 307 "Gmsh.y"
      Add_Circle((int) yyvsp[-10].d, yyvsp[-6].c, (int) yyvsp[-4].d, yyvsp[-2].d);
#line 311 "Gmsh.y"
      Add_Ellipse((int) yyvsp[-12].d, yyvsp[-8].c, (int) yyvsp[-6].d, yyvsp[-4].d, yyvsp[-2].d);
#line 316 "Gmsh.y"
#line 319 "Gmsh.y"
#line 323 "Gmsh.y"
#line 326 "Gmsh.y"
#line 330 "Gmsh.y"
#line 333 "Gmsh.y"
#line 336 "Gmsh.y"
#line 348 "Gmsh.y"
    { return 1; ;}
    break;

  case 51:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 349 "Gmsh.y"
    { return 1; ;}
    break;

  case 52:
#line 350 "Gmsh.y"
    { return 1; ;}
    break;

  case 53:
#line 351 "Gmsh.y"
    { return 1; ;}
    break;

  case 54:
#line 352 "Gmsh.y"
    { List_Delete(yyvsp[0].l); return 1; ;}
    break;

  case 55:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 353 "Gmsh.y"
    { List_Delete(yyvsp[0].l); return 1; ;}
    break;

  case 56:
#line 354 "Gmsh.y"
    { return 1; ;}
    break;

  case 57:
#line 355 "Gmsh.y"
    { return 1; ;}
    break;

  case 58:
#line 356 "Gmsh.y"
    { return 1; ;}
    break;

  case 59:
#line 357 "Gmsh.y"
    { List_Delete(yyvsp[0].l); return 1; ;}
    break;

  case 60:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 358 "Gmsh.y"
    { return 1; ;}
    break;

  case 61:
#line 359 "Gmsh.y"
    { return 1; ;}
    break;

  case 62:
#line 360 "Gmsh.y"
    { return 1; ;}
    break;

  case 63:
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#line 361 "Gmsh.y"
    { return 1; ;}
    break;

  case 64:
#line 366 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      Msg(DIRECT, yyvsp[-2].c);
      Free(yyvsp[-2].c);
#line 371 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      char tmpstring[1024];
      int i = PrintListOfDouble(yyvsp[-4].c, yyvsp[-2].l, tmpstring);
      if(i < 0) 
	yymsg(GERROR, "Too few arguments in Printf");
      else if(i > 0)
	yymsg(GERROR, "%d extra argument%s in Printf", i, (i>1)?"s":"");
      else
	Msg(DIRECT, tmpstring);
      Free(yyvsp[-4].c);
      List_Delete(yyvsp[-2].l);
#line 389 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!strcmp(yyvsp[-5].c, "View") && !CheckViewErrorFlags(View)){
	EndView(View, 0, yyname, yyvsp[-4].c);
      }
      Free(yyvsp[-5].c); Free(yyvsp[-4].c);
#line 396 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!strcmp(yyvsp[-7].c, "View") && !CheckViewErrorFlags(View)){
	EndView(View, 0, yyname, yyvsp[-6].c);
      }
      Free(yyvsp[-7].c); Free(yyvsp[-6].c); Free(yyvsp[-5].c);
#line 406 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      View = BeginView(1); 
      for(int i = 0; i < VIEW_NB_ELEMENT_TYPES; i++){
	ViewErrorFlags[i] = 0;
      }
#line 421 "Gmsh.y"
    { ViewCoord[ViewCoordIdx] = yyvsp[0].d; ViewCoordIdx++; ;}
    break;

  case 75:
#line 423 "Gmsh.y"
    { ViewCoord[ViewCoordIdx] = yyvsp[0].d; ViewCoordIdx++; ;}
    break;

  case 76:
#line 428 "Gmsh.y"
    { if(ViewValueList) List_Add(ViewValueList, &yyvsp[0].d); ;}
    break;

  case 77:
#line 430 "Gmsh.y"
    { if(ViewValueList) List_Add(ViewValueList, &yyvsp[0].d); ;}
    break;

  case 78:
#line 435 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
      if(!strcmp(yyvsp[0].c, "SP")){
	ViewElementIdx = 0; ViewNumNodes = 1; ViewNumComp = 1;
	ViewValueList = View->SP; ViewNumList = &View->NbSP;
      }
      else if(!strcmp(yyvsp[0].c, "VP")){
	ViewElementIdx = 1; ViewNumNodes = 1; ViewNumComp = 3;
	ViewValueList = View->VP; ViewNumList = &View->NbVP;
      }
      else if(!strcmp(yyvsp[0].c, "TP")){
	ViewElementIdx = 2; ViewNumNodes = 1; ViewNumComp = 9;
	ViewValueList = View->TP; ViewNumList = &View->NbTP;
      }
      else if(!strcmp(yyvsp[0].c, "SL")){
	ViewElementIdx = 3; ViewNumNodes = 2; ViewNumComp = 1;
	ViewValueList = View->SL; ViewNumList = &View->NbSL;
      }
      else if(!strcmp(yyvsp[0].c, "VL")){
	ViewElementIdx = 4; ViewNumNodes = 2; ViewNumComp = 3;
	ViewValueList = View->VL; ViewNumList = &View->NbVL;
      }
      else if(!strcmp(yyvsp[0].c, "TL")){
	ViewElementIdx = 5; ViewNumNodes = 2; ViewNumComp = 9;
	ViewValueList = View->TL; ViewNumList = &View->NbTL;
      }
      else if(!strcmp(yyvsp[0].c, "ST")){
	ViewElementIdx = 6; ViewNumNodes = 3; ViewNumComp = 1;
	ViewValueList = View->ST; ViewNumList = &View->NbST;
      }
      else if(!strcmp(yyvsp[0].c, "VT")){
	ViewElementIdx = 7; ViewNumNodes = 3; ViewNumComp = 3;
	ViewValueList = View->VT; ViewNumList = &View->NbVT;
      }
      else if(!strcmp(yyvsp[0].c, "TT")){
	ViewElementIdx = 8; ViewNumNodes = 3; ViewNumComp = 9;
	ViewValueList = View->TT; ViewNumList = &View->NbTT;
      }
      else if(!strcmp(yyvsp[0].c, "SQ")){
	ViewElementIdx = 9; ViewNumNodes = 4; ViewNumComp = 1;
	ViewValueList = View->SQ; ViewNumList = &View->NbSQ;
      }
      else if(!strcmp(yyvsp[0].c, "VQ")){
	ViewElementIdx = 10; ViewNumNodes = 4; ViewNumComp = 3;
	ViewValueList = View->VQ; ViewNumList = &View->NbVQ;
      }
      else if(!strcmp(yyvsp[0].c, "TQ")){
	ViewElementIdx = 11; ViewNumNodes = 4; ViewNumComp = 9;
	ViewValueList = View->TQ; ViewNumList = &View->NbTQ;
      }
      else if(!strcmp(yyvsp[0].c, "SS")){
	ViewElementIdx = 12; ViewNumNodes = 4; ViewNumComp = 1;
	ViewValueList = View->SS; ViewNumList = &View->NbSS;
      }
      else if(!strcmp(yyvsp[0].c, "VS")){
	ViewElementIdx = 13; ViewNumNodes = 4; ViewNumComp = 3;
	ViewValueList = View->VS; ViewNumList = &View->NbVS;
      }
      else if(!strcmp(yyvsp[0].c, "TS")){
	ViewElementIdx = 14; ViewNumNodes = 4; ViewNumComp = 9;
	ViewValueList = View->TS; ViewNumList = &View->NbTS;
      }
      else if(!strcmp(yyvsp[0].c, "SH")){
	ViewElementIdx = 15; ViewNumNodes = 8; ViewNumComp = 1;
	ViewValueList = View->SH; ViewNumList = &View->NbSH;
      }
      else if(!strcmp(yyvsp[0].c, "VH")){
	ViewElementIdx = 16; ViewNumNodes = 8; ViewNumComp = 3;
	ViewValueList = View->VH; ViewNumList = &View->NbVH;