/* A Bison parser, made from src/gramatica.y by GNU Bison version 1.27 */ #define YYBISON 1 /* Identify Bison output. */ #define texto 257 #define id 258 #define valor 259 #define PLI_DOC 260 #define ABERTURA 261 #define TITULO 262 #define DATA 263 #define AUTOR 264 #define NOME 265 #define EMAIL 266 #define URL 267 #define RESUMO 268 #define REALCADO 269 #define REF 270 #define GRAFICO 271 #define CODPROGRAMA 272 #define LISTA 273 #define ITEM 274 #define EXEMPLO 275 #define FECHO 276 #define AGRADECIMENTOS 277 #define BIBLIOGRAFIA 278 #define BIBITEM 279 #define CHAVE 280 #define CORPO 281 #define CAPITULO 282 #define SECCAO 283 #define PARA 284 #define COMANDO 285 #define PUB 286 #define FIGURA 287 #line 1 "src/gramatica.y" #include #include "grove.h" #define YYERROR_VERBOSE(a) zbr int nlines; int to_what; extern char* yytext; #line 12 "src/gramatica.y" typedef union { Elem * el; GHashTable * hash; char* str; GString* gstr; } YYSTYPE; #include #ifndef __cplusplus #ifndef __STDC__ #define const #endif #endif #define YYFINAL 310 #define YYFLAG -32768 #define YYNTBASE 38 #define YYTRANSLATE(x) ((unsigned)(x) <= 287 ? yytranslate[x] : 106) static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 36, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 34, 37, 35, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 }; #if YYDEBUG != 0 static const short yyprhs[] = { 0, 0, 1, 14, 15, 29, 30, 41, 42, 53, 56, 57, 58, 65, 71, 78, 85, 93, 94, 105, 106, 117, 118, 129, 130, 141, 142, 154, 155, 166, 167, 178, 181, 182, 183, 195, 196, 207, 208, 219, 220, 231, 234, 235, 236, 248, 251, 252, 254, 256, 258, 260, 262, 264, 265, 277, 280, 281, 282, 293, 296, 297, 299, 301, 303, 305, 306, 317, 318, 329, 335, 336, 348, 354, 355, 366, 367, 378, 381, 382, 383, 394, 395, 407, 410, 411, 413, 415, 417, 419, 424 }; static const short yyrhs[] = { -1, 34, 6, 105, 35, 39, 40, 69, 58, 34, 36, 6, 35, 0, 0, 34, 7, 105, 35, 41, 42, 44, 46, 56, 34, 36, 7, 35, 0, 0, 34, 8, 105, 35, 43, 104, 34, 36, 8, 35, 0, 0, 34, 9, 105, 35, 45, 104, 34, 36, 9, 35, 0, 46, 47, 0, 0, 0, 34, 10, 105, 35, 48, 49, 0, 50, 34, 36, 10, 35, 0, 50, 52, 34, 36, 10, 35, 0, 50, 54, 34, 36, 10, 35, 0, 50, 52, 54, 34, 36, 10, 35, 0, 0, 34, 11, 105, 35, 51, 104, 34, 36, 11, 35, 0, 0, 34, 12, 105, 35, 53, 104, 34, 36, 12, 35, 0, 0, 34, 13, 105, 35, 55, 104, 34, 36, 13, 35, 0, 0, 34, 14, 105, 35, 57, 80, 34, 36, 14, 35, 0, 0, 34, 22, 105, 35, 59, 60, 62, 34, 36, 22, 35, 0, 0, 34, 23, 105, 35, 61, 80, 34, 36, 23, 35, 0, 0, 34, 24, 105, 35, 63, 64, 34, 36, 24, 35, 0, 64, 65, 0, 0, 0, 34, 25, 105, 35, 66, 67, 71, 34, 36, 25, 35, 0, 0, 34, 26, 105, 35, 68, 104, 34, 36, 26, 35, 0, 0, 34, 27, 105, 35, 70, 73, 34, 36, 27, 35, 0, 0, 34, 32, 105, 35, 72, 104, 34, 36, 32, 35, 0, 73, 74, 0, 0, 0, 34, 28, 105, 35, 75, 42, 76, 34, 36, 28, 35, 0, 76, 77, 0, 0, 81, 0, 78, 0, 100, 0, 90, 0, 95, 0, 93, 0, 0, 34, 29, 105, 35, 79, 42, 76, 34, 36, 29, 35, 0, 80, 81, 0, 0, 0, 34, 30, 105, 35, 82, 83, 34, 36, 30, 35, 0, 83, 84, 0, 0, 104, 0, 85, 0, 87, 0, 89, 0, 0, 34, 31, 105, 35, 86, 104, 34, 36, 31, 35, 0, 0, 34, 15, 105, 35, 88, 104, 34, 36, 15, 35, 0, 34, 16, 105, 36, 35, 0, 0, 34, 33, 105, 35, 91, 42, 92, 34, 36, 33, 35, 0, 34, 17, 105, 36, 35, 0, 0, 34, 18, 105, 35, 94, 104, 34, 36, 18, 35, 0, 0, 34, 19, 105, 35, 96, 97, 34, 36, 19, 35, 0, 97, 98, 0, 0, 0, 34, 20, 105, 35, 99, 80, 34, 36, 20, 35, 0, 0, 34, 21, 105, 35, 101, 42, 102, 34, 36, 21, 35, 0, 102, 103, 0, 0, 81, 0, 90, 0, 93, 0, 3, 0, 105, 4, 37, 5, 0, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, 79, 80, 92, 93, 99, 99, 102, 102, 105, 106, 108, 109, 111, 113, 116, 120, 125, 125, 128, 128, 131, 131, 134, 135, 138, 139, 143, 144, 147, 148, 151, 152, 154, 155, 159, 159, 162, 162, 165, 165, 168, 169, 171, 172, 177, 178, 180, 181, 182, 183, 184, 185, 187, 188, 192, 193, 195, 196, 199, 200, 202, 203, 204, 205, 207, 208, 211, 212, 215, 218, 219, 223, 226, 227, 230, 231, 234, 235, 237, 238, 241, 242, 246, 248, 250, 251, 252, 254, 257, 263 }; #endif #if YYDEBUG != 0 || defined (YYERROR_VERBOSE) static const char * const yytname[] = { "$","error","$undefined.","texto", "id","valor","PLI_DOC","ABERTURA","TITULO","DATA","AUTOR","NOME","EMAIL","URL", "RESUMO","REALCADO","REF","GRAFICO","CODPROGRAMA","LISTA","ITEM","EXEMPLO","FECHO", "AGRADECIMENTOS","BIBLIOGRAFIA","BIBITEM","CHAVE","CORPO","CAPITULO","SECCAO", "PARA","COMANDO","PUB","FIGURA","'<'","'>'","'/'","'='","PLI_doc","@1","Abertura", "@2","Titulo","@3","Data","@4","AutorList","Autor","@5","Autor2","Nome","@6", "Email","@7","Url","@8","Resumo","@9","Fecho","@10","Agradecimentos","@11","Bibliografia", "@12","BibItemList","BibItem","@13","Chave","@14","Corpo","@15","Pub","@16", "CapList","Capitulo","@17","ConteudoList","Conteudo","Seccao","@18","ParaList", "Para","@19","ParaConteudoList","ParaConteudo","Comando","@20","Realcado","@21", "Ref","Figura","@22","Grafico","CodPrograma","@23","Lista","@24","ListaItem", "Item","@25","Exemplo","@26","ExemploConteudoList","ExemploConteudo","Text", "AtriList", NULL }; #endif static const short yyr1[] = { 0, 39, 38, 41, 40, 43, 42, 45, 44, 46, 46, 48, 47, 49, 49, 49, 49, 51, 50, 53, 52, 55, 54, 57, 56, 59, 58, 61, 60, 63, 62, 64, 64, 66, 65, 68, 67, 70, 69, 72, 71, 73, 73, 75, 74, 76, 76, 77, 77, 77, 77, 77, 77, 79, 78, 80, 80, 82, 81, 83, 83, 84, 84, 84, 84, 86, 85, 88, 87, 89, 91, 90, 92, 94, 93, 96, 95, 97, 97, 99, 98, 101, 100, 102, 102, 103, 103, 103, 104, 105, 105 }; static const short yyr2[] = { 0, 0, 12, 0, 13, 0, 10, 0, 10, 2, 0, 0, 6, 5, 6, 6, 7, 0, 10, 0, 10, 0, 10, 0, 10, 0, 11, 0, 10, 0, 10, 2, 0, 0, 11, 0, 10, 0, 10, 0, 10, 2, 0, 0, 11, 2, 0, 1, 1, 1, 1, 1, 1, 0, 11, 2, 0, 0, 10, 2, 0, 1, 1, 1, 1, 0, 10, 0, 10, 5, 0, 11, 5, 0, 10, 0, 10, 2, 0, 0, 10, 0, 11, 2, 0, 1, 1, 1, 1, 4, 0 }; static const short yydefact[] = { 0, 0, 90, 0, 0, 1, 0, 0, 89, 0, 0, 90, 0, 0, 0, 90, 0, 0, 3, 0, 90, 0, 0, 37, 0, 0, 0, 0, 42, 25, 0, 90, 0, 10, 0, 0, 2, 0, 90, 0, 0, 41, 0, 0, 5, 0, 0, 9, 0, 90, 0, 90, 0, 0, 0, 7, 90, 90, 0, 0, 0, 0, 90, 0, 88, 0, 0, 0, 0, 0, 43, 38, 27, 0, 0, 0, 0, 11, 23, 0, 0, 56, 29, 0, 0, 0, 0, 56, 4, 46, 0, 32, 26, 0, 0, 0, 12, 0, 0, 0, 0, 55, 0, 6, 0, 90, 0, 0, 0, 0, 0, 45, 48, 47, 50, 52, 51, 49, 90, 0, 0, 31, 8, 0, 90, 90, 0, 0, 0, 0, 0, 90, 90, 90, 90, 90, 0, 0, 0, 90, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 28, 0, 0, 0, 19, 21, 13, 0, 0, 0, 24, 73, 75, 81, 53, 70, 44, 60, 33, 30, 0, 0, 0, 14, 0, 15, 0, 78, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 84, 46, 0, 0, 59, 62, 63, 64, 61, 0, 0, 0, 0, 0, 0, 0, 77, 0, 0, 0, 0, 90, 90, 90, 0, 90, 0, 0, 0, 0, 0, 0, 90, 0, 0, 85, 86, 87, 83, 0, 90, 0, 0, 0, 0, 0, 0, 90, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 65, 58, 35, 0, 0, 20, 22, 74, 79, 76, 0, 0, 0, 0, 0, 69, 0, 0, 39, 0, 56, 82, 54, 72, 71, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 66, 36, 0, 80, 40, 0, 0, 0 }; static const short yydefgoto[] = { 308, 7, 10, 22, 27, 54, 33, 66, 39, 47, 86, 96, 97, 159, 107, 177, 108, 178, 48, 87, 17, 35, 43, 81, 53, 91, 102, 121, 188, 205, 273, 13, 28, 222, 284, 34, 41, 80, 99, 111, 112, 185, 90, 101, 173, 187, 199, 200, 272, 201, 270, 202, 114, 186, 215, 115, 182, 116, 183, 194, 211, 276, 117, 184, 212, 233, 65, 3 }; static const short yypact[] = { 44, 74,-32768, 2, 53,-32768, 76, 71,-32768, 95, 72, -32768, 85, 83, 6,-32768, 96, 91,-32768, 7,-32768, 97, 104,-32768, 8, 113, 131, 108,-32768,-32768, 115, -32768, 134,-32768, 114, 117,-32768, 9,-32768, 119, 46, -32768, 132, 120,-32768, 12, 78,-32768, 122,-32768, 130, -32768, 135, 124, 157,-32768,-32768,-32768, 125, 13, 127, 14,-32768, 128,-32768, 129, 157, 15, 17, 158,-32768, -32768,-32768, 18, 144, 133, 136,-32768,-32768, 137, 104, -32768,-32768, 138, 159, 139, 140,-32768,-32768,-32768, 142, -32768,-32768, 143, 162, 166,-32768, 145, 146, 147, -22, -32768, 148,-32768, 149,-32768, 59, 151, 152, 47, 111, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 160, 48, -32768,-32768, 19,-32768,-32768, 177, 57, 154, 153, 178, -32768,-32768,-32768,-32768,-32768, 163, 20, 161,-32768, 169, -32768, 21, 22, 164, 184, 165, 185, 167, 24, 25, 26, 27, 28, 168,-32768,-32768, 29, 173, 157,-32768, -32768,-32768, 175, 187, 176,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768, 170, 157, 157,-32768, 179, -32768, 157,-32768, 104, 104, 104, 31, 181, 182, 183, 186,-32768, 189, 191,-32768,-32768, 192, 60,-32768,-32768, -32768,-32768,-32768, 172, 193, 201, 194, 196, 198, 67, -32768, 195, 202, 211, 203,-32768,-32768,-32768, 205,-32768, 206, 207, 204, 156, 200, 222,-32768, 223, 68,-32768, -32768,-32768,-32768, 116,-32768, 208, 32, -1, 54, 210, 62,-32768, 212,-32768, 214, 215, 216, 64, 217, 225, 171, 3, 220,-32768, 219,-32768,-32768,-32768, 65, 218, -32768,-32768,-32768,-32768,-32768, 221, 224, 226, 227, 157, -32768, 157, 157,-32768, 228,-32768,-32768,-32768,-32768,-32768, 213, 230, 231, 157,-32768, 232, 233, 234, 235, 238, 49, 240, 229, 241, 237, 248, 239, 242, 243, 244, 245,-32768,-32768,-32768, 246,-32768,-32768, 257, 258,-32768 }; static const short yypgoto[] = {-32768, -32768,-32768,-32768, -75,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768, 180,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768, 79,-32768,-32768, -32768, -86, -97,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768, 70,-32768,-32768, 73,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768, -51, -11 }; #define YYLAST 287 static const short yytable[] = { 14, 98, 113, 4, 19, 89, 4, 4, 118, 24, 4, 4, 4, 4, 119, 76, 4, 4, 4, 4, 37, 4, 4, 4, 4, 4, 4, 45, 4, 4, 4, 4, 4, 4, 64, 255, 4, 5, 59, 268, 61, 18, 23, 29, 44, 67, 68, 55, 70, 72, 77, 73, 78, 82, 141, 155, 160, 161, 4, 167, 168, 169, 170, 171, 174, 198, 4, 254, 4, 4, 125, 124, 125, 139, 49, 216, 217, 118, 1, 118, 2, 8, 50, 130, 140, 296, 131, 227, 56, 256, 6, 218, 57, 145, 123, 126, 219, 258, 118, 264, 274, 135, 11, 228, 250, 9, 12, 137, 176, 195, 196, 197, 15, 142, 143, 230, 113, 16, 20, 30, 149, 150, 151, 152, 153, 21, 190, 191, 157, 131, 132, 193, 133, 25, 131, 132, 203, 133, 26, 31, 134, 118, 32, 38, 135, 134, 118, 136, 40, 135, 36, 42, 251, 46, 52, 51, 58, 60, 63, 62, 64, 69, 71, 75, 74, 79, 83, 93, 245, 84, 85, 104, 88, 92, 95, 94, 100, 105, 103, 106, 109, 110, 120, 138, 122, 127, 129, 144, 146, 147, 286, 154, 148, 158, 163, 165, 156, 180, 220, 162, 267, 164, 166, 172, 189, 237, 238, 239, 175, 241, 179, 181, 223, 246, 192, 204, 248, 207, 206, 281, 208, 282, 283, 209, 252, 210, 214, 221, 235, 229, 224, 259, 225, 290, 226, 240, 234, 236, 242, 244, 247, 243, 249, 275, 253, 257, 266, 287, 260, 261, 262, 263, 265, 269, 271, 297, 277, 309, 310, 278, 298, 279, 280, 285, 288, 289, 291, 299, 301, 292, 293, 294, 295, 300, 302, 213, 305, 303, 304, 0, 306, 307, 231, 0, 0, 232, 0, 128 }; static const short yycheck[] = { 11, 87, 99, 4, 15, 80, 4, 4, 30, 20, 4, 4, 4, 4, 36, 66, 4, 4, 4, 4, 31, 4, 4, 4, 4, 4, 4, 38, 4, 4, 4, 4, 4, 4, 3, 36, 4, 35, 49, 36, 51, 35, 35, 35, 35, 56, 57, 35, 35, 35, 35, 62, 35, 35, 35, 35, 35, 35, 4, 35, 35, 35, 35, 35, 35, 34, 4, 35, 4, 4, 13, 12, 13, 25, 28, 15, 16, 30, 34, 30, 6, 5, 36, 36, 36, 36, 18, 20, 10, 35, 37, 31, 14, 36, 105, 36, 36, 35, 30, 35, 35, 33, 7, 36, 36, 34, 34, 118, 159, 184, 185, 186, 27, 124, 125, 212, 213, 34, 22, 6, 131, 132, 133, 134, 135, 34, 177, 178, 139, 18, 19, 182, 21, 36, 18, 19, 187, 21, 34, 8, 29, 30, 34, 9, 33, 29, 30, 36, 34, 33, 35, 34, 36, 34, 34, 23, 34, 27, 34, 24, 3, 36, 35, 34, 36, 7, 22, 8, 12, 36, 34, 9, 35, 35, 34, 36, 34, 11, 35, 34, 34, 34, 34, 23, 35, 34, 34, 10, 34, 36, 276, 28, 14, 24, 10, 10, 35, 10, 26, 35, 29, 36, 35, 35, 34, 216, 217, 218, 35, 220, 35, 35, 11, 13, 35, 34, 227, 34, 36, 270, 34, 272, 273, 34, 235, 34, 34, 34, 17, 34, 36, 242, 36, 284, 36, 30, 34, 34, 32, 35, 18, 34, 19, 25, 36, 35, 21, 34, 36, 35, 35, 35, 35, 33, 35, 15, 35, 0, 0, 35, 31, 35, 35, 35, 34, 34, 34, 26, 20, 36, 36, 36, 34, 36, 35, 196, 32, 35, 35, -1, 35, 35, 212, -1, -1, 212, -1, 107 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/lib/bison.simple" /* This file comes from bison-1.27. */ /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ #ifndef YYSTACK_USE_ALLOCA #ifdef alloca #define YYSTACK_USE_ALLOCA #else /* alloca not defined */ #ifdef __GNUC__ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) #define YYSTACK_USE_ALLOCA #include #else /* not sparc */ /* We think this test detects Watcom and Microsoft C. */ /* This used to test MSDOS, but that is a bad idea since that symbol is in the user namespace. */ #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) #if 0 /* No need for malloc.h, which pollutes the namespace; instead, just don't use alloca. */ #include #endif #else /* not MSDOS, or __TURBOC__ */ #if defined(_AIX) /* I don't know what this was needed for, but it pollutes the namespace. So I turned it off. rms, 2 May 1997. */ /* #include */ #pragma alloca #define YYSTACK_USE_ALLOCA #else /* not MSDOS, or __TURBOC__, or _AIX */ #if 0 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, and on HPUX 10. Eventually we can turn this on. */ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #endif /* __hpux */ #endif #endif /* not _AIX */ #endif /* not MSDOS, or __TURBOC__ */ #endif /* not sparc */ #endif /* not GNU C */ #endif /* alloca not defined */ #endif /* YYSTACK_USE_ALLOCA not defined */ #ifdef YYSTACK_USE_ALLOCA #define YYSTACK_ALLOC alloca #else #define YYSTACK_ALLOC malloc #endif /* Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the switch. */ #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 /* 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 YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(token, value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { yychar = (token), yylval = (value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) #define YYTERROR 1 #define YYERRCODE 256 #ifndef YYPURE #define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else #define YYLEX yylex(&yylval, &yylloc) #endif #else /* not YYLSP_NEEDED */ #ifdef YYLEX_PARAM #define YYLEX yylex(&yylval, YYLEX_PARAM) #else #define YYLEX yylex(&yylval) #endif #endif /* not YYLSP_NEEDED */ #endif /* If nonreentrant, generate the variables here */ #ifndef YYPURE int yychar; /* the lookahead symbol */ YYSTYPE yylval; /* the semantic value of the */ /* lookahead symbol */ #ifdef YYLSP_NEEDED YYLTYPE yylloc; /* location data for the lookahead */ /* symbol */ #endif int yynerrs; /* number of parse errors so far */ #endif /* not YYPURE */ #if YYDEBUG != 0 int yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YYINITDEPTH indicates the initial size of the parser's stacks */ #ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif /* YYMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ #if YYMAXDEPTH == 0 #undef YYMAXDEPTH #endif #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif /* Define __yy_memcpy. Note that the size argument should be passed with type unsigned int, because that is what the non-GCC definitions require. With GCC, __builtin_memcpy takes an arg of type size_t, but it can handle unsigned int. */ #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) #else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (to, from, count) char *to; char *from; unsigned int count; { register char *f = from; register char *t = to; register int i = count; while (i-- > 0) *t++ = *f++; } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ static void __yy_memcpy (char *to, char *from, unsigned int count) { register char *t = to; register char *f = from; register int i = count; while (i-- > 0) *t++ = *f++; } #endif #endif #line 216 "/usr/lib/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. It should actually point to an object. Grammar actions can access the variable by casting it to the proper pointer type. */ #ifdef YYPARSE_PARAM #ifdef __cplusplus #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM #define YYPARSE_PARAM_DECL #else /* not __cplusplus */ #define YYPARSE_PARAM_ARG YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; #endif /* not __cplusplus */ #else /* not YYPARSE_PARAM */ #define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ #ifdef YYPARSE_PARAM int yyparse (void *); #else int yyparse (void); #endif #endif int yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { register int yystate; register int yyn; register short *yyssp; register YYSTYPE *yyvsp; int yyerrstatus; /* number of tokens to shift before error messages enabled */ int yychar1 = 0; /* lookahead token as an internal (translated) token number */ short yyssa[YYINITDEPTH]; /* the state stack */ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ short *yyss = yyssa; /* refer to the stacks thru separate pointers */ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ YYLTYPE *yyls = yylsa; YYLTYPE *yylsp; #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else #define YYPOPSTACK (yyvsp--, yyssp--) #endif int yystacksize = YYINITDEPTH; int yyfree_stacks = 0; #ifdef YYPURE int yychar; YYSTYPE yylval; int yynerrs; #ifdef YYLSP_NEEDED YYLTYPE yylloc; #endif #endif YYSTYPE yyval; /* the variable used to return */ /* semantic values from the action */ /* routines */ int yylen; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Starting parse\n"); #endif 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 - 1; yyvsp = yyvs; #ifdef YYLSP_NEEDED yylsp = yyls; #endif /* Push a new state, which is found in yystate . */ /* In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the stacks. */ yynewstate: *++yyssp = yystate; if (yyssp >= yyss + yystacksize - 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; #ifdef YYLSP_NEEDED YYLTYPE *yyls1 = yyls; #endif /* Get the current used size of the three stacks, in elements. */ int size = yyssp - yyss + 1; #ifdef yyoverflow /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. */ #ifdef YYLSP_NEEDED /* 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, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yyls1, size * sizeof (*yylsp), &yystacksize); #else yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), &yystacksize); #endif yyss = yyss1; yyvs = yyvs1; #ifdef YYLSP_NEEDED yyls = yyls1; #endif #else /* no yyoverflow */ /* Extend the stack our own way. */ if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 2; } yystacksize *= 2; if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; #ifndef YYSTACK_USE_ALLOCA yyfree_stacks = 1; #endif yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); __yy_memcpy ((char *)yyss, (char *)yyss1, size * (unsigned int) sizeof (*yyssp)); yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * (unsigned int) sizeof (*yyvsp)); #ifdef YYLSP_NEEDED yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); __yy_memcpy ((char *)yyls, (char *)yyls1, size * (unsigned int) sizeof (*yylsp)); #endif #endif /* no yyoverflow */ yyssp = yyss + size - 1; yyvsp = yyvs + size - 1; #ifdef YYLSP_NEEDED yylsp = yyls + size - 1; #endif #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Stack size increased to %d\n", yystacksize); #endif if (yyssp >= yyss + yystacksize - 1) YYABORT; } #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Entering state %d\n", yystate); #endif goto 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 == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* yychar is either YYEMPTY or YYEOF or a valid token in external form. */ if (yychar == YYEMPTY) { #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Reading a token: "); #endif yychar = YYLEX; } /* Convert token to internal form (in yychar1) for indexing tables with */ if (yychar <= 0) /* This means end of input. */ { yychar1 = 0; yychar = YYEOF; /* Don't call YYLEX any more */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Now at end of input.\n"); #endif } else { yychar1 = YYTRANSLATE(yychar); #if YYDEBUG != 0 if (yydebug) { fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); /* Give the individual parser a way to print the precise meaning of a token, for further debugging info. */ #ifdef YYPRINT YYPRINT (stderr, yychar, yylval); #endif fprintf (stderr, ")\n"); } #endif } yyn += yychar1; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; yyn = yytable[yyn]; /* yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error. */ if (yyn < 0) { if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); #endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif /* count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; /* Do the default action for the current state. */ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: yylen = yyr2[yyn]; if (yylen > 0) yyval = yyvsp[1-yylen]; /* implement default value of the action */ #if YYDEBUG != 0 if (yydebug) { int i; fprintf (stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); /* Print the symbols being reduced, and their result. */ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) fprintf (stderr, "%s ", yytname[yyrhs[i]]); fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif switch (yyn) { case 1: #line 79 "src/gramatica.y" {yyval.el = Elem_new(PLI_DOC,yyvsp[-1].hash,nlines);; break;} case 2: #line 80 "src/gramatica.y" { yyvsp[-5].el = Set_next(yyvsp[-5].el,yyvsp[-4].el); yyvsp[-6].el = Set_next(yyvsp[-6].el,yyvsp[-5].el); yyval.el = Set_content(yyvsp[-7].el,yyvsp[-6].el); if (to_what > 0) _travessia_Html(yyval.el); else if (to_what==0) _travessia_Esis(yyval.el); else _travessia_Latex(yyval.el); ; break;} case 3: #line 92 "src/gramatica.y" {yyval.el = Elem_new(ABERTURA,yyvsp[-1].hash,nlines);; break;} case 4: #line 93 "src/gramatica.y" { yyvsp[-5].el=Elem_insert(yyvsp[-5].el,yyvsp[-4].el); yyvsp[-6].el = Set_next(yyvsp[-6].el,yyvsp[-5].el); yyvsp[-7].el = Set_next(yyvsp[-7].el,yyvsp[-6].el); yyval.el = Set_content(yyvsp[-8].el,yyvsp[-7].el);; break;} case 5: #line 99 "src/gramatica.y" { yyval.el = Elem_new(TITULO,yyvsp[-1].hash,nlines);; break;} case 6: #line 99 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 7: #line 102 "src/gramatica.y" {yyval.el = Elem_new(DATA,yyvsp[-1].hash,nlines);; break;} case 8: #line 102 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 9: #line 105 "src/gramatica.y" {yyval.el = Elem_insert(yyvsp[-1].el,yyvsp[0].el);; break;} case 10: #line 106 "src/gramatica.y" {yyval.el = NULL;; break;} case 11: #line 108 "src/gramatica.y" { yyval.el = Elem_new(AUTOR,yyvsp[-1].hash,nlines);; break;} case 12: #line 109 "src/gramatica.y" {yyval.el = Set_content(yyvsp[-1].el,yyvsp[0].el);; break;} case 13: #line 111 "src/gramatica.y" { yyval.el = yyvsp[-4].el;; break;} case 14: #line 113 "src/gramatica.y" { yyvsp[-5].el = Set_next(yyvsp[-5].el,yyvsp[-4].el); yyval.el = yyvsp[-5].el;; break;} case 15: #line 116 "src/gramatica.y" { yyvsp[-5].el = Set_next(yyvsp[-5].el,yyvsp[-4].el); yyval.el = yyvsp[-5].el; ; break;} case 16: #line 120 "src/gramatica.y" { yyvsp[-5].el = Set_next(yyvsp[-5].el,yyvsp[-4].el); yyvsp[-6].el = Set_next(yyvsp[-6].el,yyvsp[-5].el); yyval.el = yyvsp[-6].el;; break;} case 17: #line 125 "src/gramatica.y" {yyval.el = Elem_new(NOME,yyvsp[-1].hash,nlines);; break;} case 18: #line 125 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 19: #line 128 "src/gramatica.y" {yyval.el = Elem_new(EMAIL,yyvsp[-1].hash,nlines);; break;} case 20: #line 128 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 21: #line 131 "src/gramatica.y" {yyval.el = Elem_new(URL,yyvsp[-1].hash,nlines);; break;} case 22: #line 131 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 23: #line 134 "src/gramatica.y" {yyval.el = Elem_new(RESUMO,yyvsp[-1].hash,nlines);; break;} case 24: #line 135 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 25: #line 138 "src/gramatica.y" {yyval.el = Elem_new(FECHO,yyvsp[-1].hash,nlines);; break;} case 26: #line 139 "src/gramatica.y" { yyvsp[-5].el = Set_next(yyvsp[-5].el,yyvsp[-4].el); yyval.el = Set_content(yyvsp[-6].el,yyvsp[-5].el);; break;} case 27: #line 143 "src/gramatica.y" {yyval.el = Elem_new(AGRADECIMENTOS,yyvsp[-1].hash,nlines);; break;} case 28: #line 144 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 29: #line 147 "src/gramatica.y" {yyval.el = Elem_new(BIBLIOGRAFIA,yyvsp[-1].hash,nlines); ; break;} case 30: #line 148 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 31: #line 151 "src/gramatica.y" {yyval.el = Elem_insert(yyvsp[-1].el,yyvsp[0].el);; break;} case 32: #line 152 "src/gramatica.y" {yyval.el = NULL;; break;} case 33: #line 154 "src/gramatica.y" {yyval.el = Elem_new(BIBITEM,yyvsp[-1].hash,nlines);; break;} case 34: #line 155 "src/gramatica.y" { yyvsp[-5].el = Set_next(yyvsp[-5].el,yyvsp[-4].el); yyval.el = Set_content(yyvsp[-6].el,yyvsp[-5].el);; break;} case 35: #line 159 "src/gramatica.y" {yyval.el = Elem_new(CHAVE,yyvsp[-1].hash,nlines);; break;} case 36: #line 159 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 37: #line 162 "src/gramatica.y" {yyval.el = Elem_new(CORPO,yyvsp[-1].hash,nlines);; break;} case 38: #line 162 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 39: #line 165 "src/gramatica.y" {yyval.el = Elem_new(PUB,yyvsp[-1].hash,nlines);; break;} case 40: #line 165 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 41: #line 168 "src/gramatica.y" {yyval.el = Elem_insert(yyvsp[-1].el,yyvsp[0].el);; break;} case 42: #line 169 "src/gramatica.y" {yyval.el = NULL;; break;} case 43: #line 171 "src/gramatica.y" {yyval.el = Elem_new(CAPITULO,yyvsp[-1].hash,nlines);; break;} case 44: #line 172 "src/gramatica.y" { yyvsp[-5].el = Set_next(yyvsp[-5].el,yyvsp[-4].el); yyval.el = Set_content(yyvsp[-6].el,yyvsp[-5].el); ; break;} case 45: #line 177 "src/gramatica.y" {yyval.el = Elem_insert(yyvsp[-1].el,yyvsp[0].el);; break;} case 46: #line 178 "src/gramatica.y" {yyval.el = NULL;; break;} case 47: #line 180 "src/gramatica.y" {yyval.el = yyvsp[0].el;; break;} case 48: #line 181 "src/gramatica.y" {yyval.el = yyvsp[0].el;; break;} case 49: #line 182 "src/gramatica.y" {yyval.el = yyvsp[0].el;; break;} case 50: #line 183 "src/gramatica.y" {yyval.el = yyvsp[0].el;; break;} case 51: #line 184 "src/gramatica.y" {yyval.el = yyvsp[0].el;; break;} case 52: #line 185 "src/gramatica.y" {yyval.el = yyvsp[0].el;; break;} case 53: #line 187 "src/gramatica.y" {yyval.el = Elem_new(SECCAO,yyvsp[-1].hash,nlines);; break;} case 54: #line 188 "src/gramatica.y" { yyvsp[-5].el = Set_next(yyvsp[-5].el,yyvsp[-4].el); yyval.el = Set_content(yyvsp[-6].el,yyvsp[-5].el);; break;} case 55: #line 192 "src/gramatica.y" {yyval.el = Elem_insert(yyvsp[-1].el,yyvsp[0].el);; break;} case 56: #line 193 "src/gramatica.y" {yyval.el = NULL;; break;} case 57: #line 195 "src/gramatica.y" {yyval.el = Elem_new(PARA,yyvsp[-1].hash,nlines);; break;} case 58: #line 196 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 59: #line 199 "src/gramatica.y" {yyval.el = Elem_insert(yyvsp[-1].el,yyvsp[0].el);; break;} case 60: #line 200 "src/gramatica.y" {yyval.el=NULL;; break;} case 61: #line 202 "src/gramatica.y" {yyval.el = yyvsp[0].el;; break;} case 62: #line 203 "src/gramatica.y" {yyval.el = yyvsp[0].el;; break;} case 63: #line 204 "src/gramatica.y" {yyval.el = yyvsp[0].el;; break;} case 64: #line 205 "src/gramatica.y" {yyval.el = yyvsp[0].el;; break;} case 65: #line 207 "src/gramatica.y" {yyval.el = Elem_new(COMANDO,yyvsp[-1].hash,nlines);; break;} case 66: #line 208 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 67: #line 211 "src/gramatica.y" {yyval.el = Elem_new(REALCADO,yyvsp[-1].hash,nlines);; break;} case 68: #line 212 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 69: #line 215 "src/gramatica.y" { yyval.el = Elem_new(REF,yyvsp[-2].hash,nlines);; break;} case 70: #line 218 "src/gramatica.y" {yyval.el = Elem_new(FIGURA,yyvsp[-1].hash,nlines);; break;} case 71: #line 219 "src/gramatica.y" { yyvsp[-5].el = Set_next(yyvsp[-5].el,yyvsp[-4].el); yyval.el = Set_content(yyvsp[-6].el,yyvsp[-5].el);; break;} case 72: #line 223 "src/gramatica.y" { yyval.el = Elem_new(GRAFICO,yyvsp[-2].hash,nlines);; break;} case 73: #line 226 "src/gramatica.y" {yyval.el = Elem_new(CODPROGRAMA,yyvsp[-1].hash,nlines);; break;} case 74: #line 227 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 75: #line 230 "src/gramatica.y" {yyval.el = Elem_new(LISTA,yyvsp[-1].hash,nlines);; break;} case 76: #line 231 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 77: #line 234 "src/gramatica.y" {yyval.el = Elem_insert(yyvsp[-1].el,yyvsp[0].el);; break;} case 78: #line 235 "src/gramatica.y" {yyval.el = NULL;; break;} case 79: #line 237 "src/gramatica.y" {yyval.el = Elem_new(ITEM,yyvsp[-1].hash,nlines);; break;} case 80: #line 238 "src/gramatica.y" { yyval.el = Set_content(yyvsp[-5].el,yyvsp[-4].el);; break;} case 81: #line 241 "src/gramatica.y" {yyval.el = Elem_new(EXEMPLO,yyvsp[-1].hash,nlines);; break;} case 82: #line 242 "src/gramatica.y" { yyvsp[-5].el = Set_next(yyvsp[-5].el,yyvsp[-4].el); yyval.el = Set_content(yyvsp[-6].el,yyvsp[-5].el);; break;} case 83: #line 246 "src/gramatica.y" { yyval.el = Elem_insert(yyvsp[-1].el,yyvsp[0].el);; break;} case 84: #line 248 "src/gramatica.y" {yyval.el = NULL;; break;} case 85: #line 250 "src/gramatica.y" {yyval.el = yyvsp[0].el; break;} case 86: #line 251 "src/gramatica.y" {yyval.el = yyvsp[0].el; break;} case 87: #line 252 "src/gramatica.y" {yyval.el = yyvsp[0].el; break;} case 88: #line 254 "src/gramatica.y" {yyval.el = Elem_texto_new(yyvsp[0].gstr); ; break;} case 89: #line 257 "src/gramatica.y" { char *pt; pt = strrchr(yyvsp[0].str,'"'); *pt = '\0'; g_hash_table_insert(yyvsp[-3].hash,g_string_down(g_string_new(yyvsp[-2].str)),g_string_new(&yyvsp[0].str[1])); yyval.hash = yyvsp[-3].hash;; break;} case 90: #line 263 "src/gramatica.y" {yyval.hash = g_hash_table_new(Gstr2int,Compgstr);; break;} } /* the action file gets copied in in place of this dollarsign */ #line 542 "/usr/lib/bison.simple" yyvsp -= yylen; yyssp -= yylen; #ifdef YYLSP_NEEDED yylsp -= yylen; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif *++yyvsp = yyval; #ifdef YYLSP_NEEDED yylsp++; if (yylen == 0) { yylsp->first_line = yylloc.first_line; yylsp->first_column = yylloc.first_column; yylsp->last_line = (yylsp-1)->last_line; yylsp->last_column = (yylsp-1)->last_column; yylsp->text = 0; } else { yylsp->last_line = (yylsp+yylen-1)->last_line; yylsp->last_column = (yylsp+yylen-1)->last_column; } #endif /* Now "shift" the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTBASE] + *yyssp; if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; yyerrlab: /* here on detecting error */ if (! yyerrstatus) /* If not already recovering from an error, report this error. */ { ++yynerrs; #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; if (yyn > YYFLAG && yyn < YYLAST) { int size = 0; char *msg; int x, count; count = 0; /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) size += strlen(yytname[x]) + 15, count++; msg = (char *) malloc(size + 15); if (msg != 0) { strcpy(msg, "parse error"); if (count < 5) { count = 0; for (x = (yyn < 0 ? -yyn : 0); x < (sizeof(yytname) / sizeof(char *)); x++) if (yycheck[x + yyn] == x) { strcat(msg, count == 0 ? ", expecting `" : " or `"); strcat(msg, yytname[x]); strcat(msg, "'"); count++; } } yyerror(msg); free(msg); } else yyerror ("parse error; also virtual memory exceeded"); } else #endif /* YYERROR_VERBOSE */ yyerror("parse error"); } goto yyerrlab1; yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ /* return failure if at end of input */ if (yychar == YYEOF) YYABORT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); #endif yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ yyerrstatus = 3; /* Each real token shifted decrements this */ goto yyerrhandle; yyerrdefault: /* current state does not do anything special for the error token. */ #if 0 /* This is wrong; only states that explicitly want error tokens should shift them. */ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ if (yyn) goto yydefault; #endif yyerrpop: /* pop the current state because it cannot handle the error token */ if (yyssp == yyss) YYABORT; yyvsp--; yystate = *--yyssp; #ifdef YYLSP_NEEDED yylsp--; #endif #if YYDEBUG != 0 if (yydebug) { short *ssp1 = yyss - 1; fprintf (stderr, "Error: state stack now"); while (ssp1 != yyssp) fprintf (stderr, " %d", *++ssp1); fprintf (stderr, "\n"); } #endif yyerrhandle: yyn = yypact[yystate]; if (yyn == YYFLAG) goto yyerrdefault; yyn += YYTERROR; if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) goto yyerrdefault; yyn = yytable[yyn]; if (yyn < 0) { if (yyn == YYFLAG) goto yyerrpop; yyn = -yyn; goto yyreduce; } else if (yyn == 0) goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; #if YYDEBUG != 0 if (yydebug) fprintf(stderr, "Shifting error token, "); #endif *++yyvsp = yylval; #ifdef YYLSP_NEEDED *++yylsp = yylloc; #endif yystate = yyn; goto yynewstate; yyacceptlab: /* YYACCEPT comes here. */ if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 0; yyabortlab: /* YYABORT comes here. */ if (yyfree_stacks) { free (yyss); free (yyvs); #ifdef YYLSP_NEEDED free (yyls); #endif } return 1; } #line 267 "src/gramatica.y" int yyerror(char* msg) { g_warning("line: %d,%s and found text '%s'",nlines,msg,yytext); exit(1); }