From 492e01d2445e493f4b5214689a26dcc6a8399631 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 13 Dec 2007 15:23:21 +0000 Subject: [PATCH] Convert tabs to four spaces --- src/osgPlugins/cfg/ConfigParser.cpp | 578 ++++++++++++++-------------- 1 file changed, 289 insertions(+), 289 deletions(-) diff --git a/src/osgPlugins/cfg/ConfigParser.cpp b/src/osgPlugins/cfg/ConfigParser.cpp index 706cb112e..de2cf5804 100644 --- a/src/osgPlugins/cfg/ConfigParser.cpp +++ b/src/osgPlugins/cfg/ConfigParser.cpp @@ -318,7 +318,7 @@ typedef union YYSTYPE { #if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ - || (YYSTYPE_IS_TRIVIAL))) + || (YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -333,7 +333,7 @@ union yyalloc /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do @@ -343,13 +343,13 @@ union yyalloc # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else -# define YYCOPY(To, From, Count) \ - do \ - { \ - register YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ +# define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ while (0) # endif # endif @@ -359,15 +359,15 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ while (0) #endif @@ -396,7 +396,7 @@ union yyalloc #define YYUNDEFTOK 2 #define YYMAXUTOK 326 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ @@ -827,42 +827,42 @@ static const unsigned char yystos[] = # define YYSIZE_T unsigned int #endif -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ -#define YYFAIL goto yyerrlab +#define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { \ yyerror ("syntax error: cannot back up");\ - YYERROR; \ - } \ + YYERROR; \ + } \ while (0) -#define YYTERROR 1 -#define YYERRCODE 256 +#define YYTERROR 1 +#define YYERRCODE 256 /* YYLLOC_DEFAULT -- Compute the default location (before the actions are run). */ @@ -891,27 +891,27 @@ while (0) # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ } while (0) -# define YYDSYMPRINT(Args) \ -do { \ - if (yydebug) \ - yysymprint Args; \ +# 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"); \ - } \ +# define YYDSYMPRINTF(Title, Token, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yysymprint (stderr, \ + Token, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ } while (0) /*------------------------------------------------------------------. @@ -935,10 +935,10 @@ yy_stack_print (bottom, top) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ } while (0) @@ -965,10 +965,10 @@ yy_reduce_print (yyrule) YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (Rule); \ +# 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 @@ -984,7 +984,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1193,7 +1193,7 @@ yyparse () to reallocate them elsewhere. */ /* The state stack. */ - short yyssa[YYINITDEPTH]; + short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; @@ -1222,7 +1222,7 @@ yyparse () yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack @@ -1253,25 +1253,25 @@ yyparse () #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; + /* 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), + /* 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); + &yystacksize); - yyss = yyss1; - yyvs = yyvs1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1279,23 +1279,23 @@ yyparse () # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; + goto yyoverflowlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - short *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyoverflowlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); + 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); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1305,10 +1305,10 @@ yyparse () YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1359,7 +1359,7 @@ yybackup: if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -1450,43 +1450,43 @@ yyreduce: case 24: { - cfg->beginCamera( yyvsp[0].string ); - ;} + cfg->beginCamera( yyvsp[0].string ); + ;} break; case 25: { - cfg->endCamera(); - ;} + cfg->endCamera(); + ;} break; case 29: { - cfg->setCameraRenderSurface( yyvsp[-1].string ); - ;} + cfg->setCameraRenderSurface( yyvsp[-1].string ); + ;} break; case 30: { - cfg->setCameraRenderSurface(); - ;} + cfg->setCameraRenderSurface(); + ;} break; case 31: { - cfg->setCameraProjectionRectangle( yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); - ;} + cfg->setCameraProjectionRectangle( yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); + ;} break; case 32: { - cfg->setCameraShareLens( yyvsp[-1].boolean ); - ;} + cfg->setCameraShareLens( yyvsp[-1].boolean ); + ;} break; case 33: @@ -1506,50 +1506,50 @@ yyreduce: case 37: { - cfg->beginCameraOffset(); - ;} + cfg->beginCameraOffset(); + ;} break; case 38: { - cfg->endCameraOffset(); - ;} + cfg->endCameraOffset(); + ;} break; case 41: { - cfg->shearCameraOffset( yyvsp[-2].real, yyvsp[-1].real ); - ;} + cfg->shearCameraOffset( yyvsp[-2].real, yyvsp[-1].real ); + ;} break; case 42: { - cfg->rotateCameraOffset( yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); - ;} + cfg->rotateCameraOffset( yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); + ;} break; case 43: { - cfg->translateCameraOffset( yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); - ;} + cfg->translateCameraOffset( yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); + ;} break; case 44: { - cfg->scaleCameraOffset( yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); - ;} + cfg->scaleCameraOffset( yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); + ;} break; case 45: { - cfg->setCameraOffsetMultiplyMethod( (osgProducer::Camera::Offset::MultiplyMethod)yyvsp[-1].integer ); - ;} + cfg->setCameraOffsetMultiplyMethod( (osgProducer::Camera::Offset::MultiplyMethod)yyvsp[-1].integer ); + ;} break; case 46: @@ -1565,85 +1565,85 @@ yyreduce: case 52: { - cfg->setCameraOrtho( yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); - ;} + cfg->setCameraOrtho( yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); + ;} break; case 53: { - cfg->setCameraOrtho( yyvsp[-8].real, yyvsp[-7].real, yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); - ;} + cfg->setCameraOrtho( yyvsp[-8].real, yyvsp[-7].real, yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); + ;} break; case 54: { - cfg->setCameraPerspective( yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); - ;} + cfg->setCameraPerspective( yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); + ;} break; case 55: { - cfg->setCameraPerspective( yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); - ;} + cfg->setCameraPerspective( yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); + ;} break; case 56: { - cfg->setCameraFrustum( yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); - ;} + cfg->setCameraFrustum( yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); + ;} break; case 57: { - cfg->setCameraFrustum( yyvsp[-8].real, yyvsp[-7].real, yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); - ;} + cfg->setCameraFrustum( yyvsp[-8].real, yyvsp[-7].real, yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real ); + ;} break; case 58: { - cfg->setCameraLensShear( yyvsp[-2].real, yyvsp[-1].real ); - ;} + cfg->setCameraLensShear( yyvsp[-2].real, yyvsp[-1].real ); + ;} break; case 59: { - cfg->beginRenderSurface( yyvsp[0].string ); - ;} + cfg->beginRenderSurface( yyvsp[0].string ); + ;} break; case 60: { - cfg->endRenderSurface(); - ;} + cfg->endRenderSurface(); + ;} break; case 64: { - cfg->setRenderSurfaceVisualChooser( yyvsp[-1].string ); - ;} + cfg->setRenderSurfaceVisualChooser( yyvsp[-1].string ); + ;} break; case 65: { - cfg->setRenderSurfaceVisualChooser(); - ;} + cfg->setRenderSurfaceVisualChooser(); + ;} break; case 66: { - cfg->setRenderSurfaceWindowRectangle( yyvsp[-4].integer, yyvsp[-3].integer, yyvsp[-2].integer, yyvsp[-1].integer ); - ;} + cfg->setRenderSurfaceWindowRectangle( yyvsp[-4].integer, yyvsp[-3].integer, yyvsp[-2].integer, yyvsp[-1].integer ); + ;} break; case 67: @@ -1656,29 +1656,29 @@ yyreduce: case 68: { - cfg->setRenderSurfaceHostName( std::string(yyvsp[-1].string) ); - ;} + cfg->setRenderSurfaceHostName( std::string(yyvsp[-1].string) ); + ;} break; case 69: { - cfg->setRenderSurfaceDisplayNum( yyvsp[-1].integer ); - ;} + cfg->setRenderSurfaceDisplayNum( yyvsp[-1].integer ); + ;} break; case 70: { - cfg->setRenderSurfaceScreen( yyvsp[-1].integer ); - ;} + cfg->setRenderSurfaceScreen( yyvsp[-1].integer ); + ;} break; case 71: { - cfg->setRenderSurfaceBorder( yyvsp[-1].boolean ); - ;} + cfg->setRenderSurfaceBorder( yyvsp[-1].boolean ); + ;} break; case 72: @@ -1745,176 +1745,176 @@ yyreduce: case 82: { - cfg->beginVisual( yyvsp[0].string ); - ;} + cfg->beginVisual( yyvsp[0].string ); + ;} break; case 83: { - cfg->endVisual(); - ;} + cfg->endVisual(); + ;} break; case 84: { - cfg->beginVisual(); - ;} + cfg->beginVisual(); + ;} break; case 85: { - cfg->endVisual(); - ;} + cfg->endVisual(); + ;} break; case 88: { - cfg->setVisualSimpleConfiguration(); - ;} + cfg->setVisualSimpleConfiguration(); + ;} break; case 89: { - cfg->setVisualByID( yyvsp[0].integer ); - ;} + cfg->setVisualByID( yyvsp[0].integer ); + ;} break; case 90: { - cfg->addVisualAttribute( VisualChooser::BufferSize, yyvsp[0].integer ); - ;} + cfg->addVisualAttribute( VisualChooser::BufferSize, yyvsp[0].integer ); + ;} break; case 91: { - cfg->addVisualAttribute( VisualChooser::Level, yyvsp[0].integer ); - ;} + cfg->addVisualAttribute( VisualChooser::Level, yyvsp[0].integer ); + ;} break; case 92: { - cfg->addVisualAttribute( VisualChooser::RGBA ); - ;} + cfg->addVisualAttribute( VisualChooser::RGBA ); + ;} break; case 93: { - cfg->addVisualAttribute( VisualChooser::DoubleBuffer ); - ;} + cfg->addVisualAttribute( VisualChooser::DoubleBuffer ); + ;} break; case 94: { - cfg->addVisualAttribute( VisualChooser::Stereo ); - ;} + cfg->addVisualAttribute( VisualChooser::Stereo ); + ;} break; case 95: { - cfg->addVisualAttribute( VisualChooser::AuxBuffers, yyvsp[0].integer ); - ;} + cfg->addVisualAttribute( VisualChooser::AuxBuffers, yyvsp[0].integer ); + ;} break; case 96: { - cfg->addVisualAttribute( VisualChooser::RedSize, yyvsp[0].integer ); - ;} + cfg->addVisualAttribute( VisualChooser::RedSize, yyvsp[0].integer ); + ;} break; case 97: { - cfg->addVisualAttribute( VisualChooser::GreenSize, yyvsp[0].integer ); - ;} + cfg->addVisualAttribute( VisualChooser::GreenSize, yyvsp[0].integer ); + ;} break; case 98: { - cfg->addVisualAttribute( VisualChooser::BlueSize, yyvsp[0].integer ); - ;} + cfg->addVisualAttribute( VisualChooser::BlueSize, yyvsp[0].integer ); + ;} break; case 99: { - cfg->addVisualAttribute( VisualChooser::AlphaSize, yyvsp[0].integer ); - ;} + cfg->addVisualAttribute( VisualChooser::AlphaSize, yyvsp[0].integer ); + ;} break; case 100: { - cfg->addVisualAttribute( VisualChooser::DepthSize, yyvsp[0].integer ); - ;} + cfg->addVisualAttribute( VisualChooser::DepthSize, yyvsp[0].integer ); + ;} break; case 101: { - cfg->addVisualAttribute( VisualChooser::StencilSize, yyvsp[0].integer ); - ;} + cfg->addVisualAttribute( VisualChooser::StencilSize, yyvsp[0].integer ); + ;} break; case 102: { - cfg->addVisualAttribute( VisualChooser::AccumRedSize, yyvsp[0].integer ); - ;} + cfg->addVisualAttribute( VisualChooser::AccumRedSize, yyvsp[0].integer ); + ;} break; case 103: { - cfg->addVisualAttribute( VisualChooser::AccumGreenSize, yyvsp[0].integer ); - ;} + cfg->addVisualAttribute( VisualChooser::AccumGreenSize, yyvsp[0].integer ); + ;} break; case 104: { - cfg->addVisualAttribute( VisualChooser::AccumBlueSize, yyvsp[0].integer ); - ;} + cfg->addVisualAttribute( VisualChooser::AccumBlueSize, yyvsp[0].integer ); + ;} break; case 105: { - cfg->addVisualAttribute( VisualChooser::AccumAlphaSize, yyvsp[0].integer ); - ;} + cfg->addVisualAttribute( VisualChooser::AccumAlphaSize, yyvsp[0].integer ); + ;} break; case 106: { - cfg->addVisualAttribute( VisualChooser::Samples, yyvsp[0].integer ); + cfg->addVisualAttribute( VisualChooser::Samples, yyvsp[0].integer ); ;} break; case 107: { - cfg->addVisualAttribute( VisualChooser::SampleBuffers ); - ;} + cfg->addVisualAttribute( VisualChooser::SampleBuffers ); + ;} break; case 108: { - cfg->addVisualExtendedAttribute( yyvsp[-1].integer, yyvsp[0].integer ); - ;} + cfg->addVisualExtendedAttribute( yyvsp[-1].integer, yyvsp[0].integer ); + ;} break; case 109: @@ -1930,59 +1930,59 @@ yyreduce: case 113: { - cfg->addInputAreaEntry( yyvsp[-1].string ); - ;} + cfg->addInputAreaEntry( yyvsp[-1].string ); + ;} break; case 114: { - yyval.real = atof(flexer->YYText()); - ;} + yyval.real = atof(flexer->YYText()); + ;} break; case 115: { - yyval.real = atof(flexer->YYText()); - ;} + yyval.real = atof(flexer->YYText()); + ;} break; case 116: { - yyval.real = atof(flexer->YYText()); - ;} + yyval.real = atof(flexer->YYText()); + ;} break; case 117: { - yyval.integer = atoi( flexer->YYText() ); - ;} + yyval.integer = atoi( flexer->YYText() ); + ;} break; case 118: { - yyval.string = strdup( flexer->YYText() ); - ;} + yyval.string = strdup( flexer->YYText() ); + ;} break; case 119: { - yyval.string = strdup( flexer->YYText() ); - ;} + yyval.string = strdup( flexer->YYText() ); + ;} break; case 120: { - int n; - sscanf( flexer->YYText(), "0x%x", &n ); - yyval.integer = n; - ;} + int n; + sscanf( flexer->YYText(), "0x%x", &n ); + yyval.integer = n; + ;} break; case 121: @@ -2037,50 +2037,50 @@ yyerrlab: yyn = yypact[yystate]; if (YYPACT_NINF < yyn && yyn < YYLAST) - { - YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); - char *yymsg; - int yyx, yycount; + { + YYSIZE_T yysize = 0; + int yytype = YYTRANSLATE (yychar); + char *yymsg; + int yyx, yycount; - yycount = 0; - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - yysize += yystrlen (yytname[yyx]) + 15, yycount++; - yysize += yystrlen ("syntax error, unexpected ") + 1; - yysize += yystrlen (yytname[yytype]); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) - { - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); + yycount = 0; + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + for (yyx = yyn < 0 ? -yyn : 0; + yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + yysize += yystrlen (yytname[yyx]) + 15, yycount++; + yysize += yystrlen ("syntax error, unexpected ") + 1; + yysize += yystrlen (yytname[yytype]); + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg != 0) + { + char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); + yyp = yystpcpy (yyp, yytname[yytype]); - if (yycount < 5) - { - yycount = 0; - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); - yyx++) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - const char *yyq = ! yycount ? ", expecting " : " or "; - yyp = yystpcpy (yyp, yyq); - yyp = yystpcpy (yyp, yytname[yyx]); - yycount++; - } - } - yyerror (yymsg); - YYSTACK_FREE (yymsg); - } - else - yyerror ("syntax error; also virtual memory exhausted"); - } + if (yycount < 5) + { + yycount = 0; + for (yyx = yyn < 0 ? -yyn : 0; + yyx < (int) (sizeof (yytname) / sizeof (char *)); + yyx++) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + const char *yyq = ! yycount ? ", expecting " : " or "; + yyp = yystpcpy (yyp, yyq); + yyp = yystpcpy (yyp, yytname[yyx]); + yycount++; + } + } + yyerror (yymsg); + YYSTACK_FREE (yymsg); + } + else + yyerror ("syntax error; also virtual memory exhausted"); + } else #endif /* YYERROR_VERBOSE */ - yyerror ("syntax error"); + yyerror ("syntax error"); } @@ -2088,21 +2088,21 @@ yyerrlab: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ /* Return failure if at end of input. */ if (yychar == YYEOF) { - /* Pop the error token. */ + /* Pop the error token. */ YYPOPSTACK; - /* Pop the rest of the stack. */ - while (yyss < yyssp) - { - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); - YYPOPSTACK; - } - YYABORT; + /* Pop the rest of the stack. */ + while (yyss < yyssp) + { + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); + yydestruct (yystos[*yyssp], yyvsp); + YYPOPSTACK; + } + YYABORT; } YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); @@ -2136,25 +2136,25 @@ yyerrlab1: | yyerrlab2 -- pop states until the error token can be shifted. | `---------------------------------------------------------------*/ yyerrlab2: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); yydestruct (yystos[yystate], yyvsp); @@ -2215,9 +2215,9 @@ yyreturn: static void yyerror( const char *errmsg ) { fprintf( stderr, - "CameraConfig::parseFile(\"%s\") : %s - Line %d at or before \"%s\"\n", - fileName.c_str(), - errmsg, + "CameraConfig::parseFile(\"%s\") : %s - Line %d at or before \"%s\"\n", + fileName.c_str(), + errmsg, flexer->lineno(), flexer->YYText() ); }