diff options
author | Bruno Haible <bruno@clisp.org> | 2001-10-26 10:01:20 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2001-10-26 10:01:20 +0000 |
commit | 4ee9eb65d3945455fddcf70f71f15fbc4f77f916 (patch) | |
tree | 3ed19a2b828d742e5892e8723289de1565e73848 /src/po-hash-gen.c | |
parent | bcc925e8db2bf51fbc01170780bc4969c5c50099 (diff) | |
download | external_gettext-4ee9eb65d3945455fddcf70f71f15fbc4f77f916.zip external_gettext-4ee9eb65d3945455fddcf70f71f15fbc4f77f916.tar.gz external_gettext-4ee9eb65d3945455fddcf70f71f15fbc4f77f916.tar.bz2 |
Regenerated.
Diffstat (limited to 'src/po-hash-gen.c')
-rw-r--r-- | src/po-hash-gen.c | 55 |
1 files changed, 33 insertions, 22 deletions
diff --git a/src/po-hash-gen.c b/src/po-hash-gen.c index c229dad..68d8208 100644 --- a/src/po-hash-gen.c +++ b/src/po-hash-gen.c @@ -19,10 +19,13 @@ # include "config.h" #endif +/* Specification. */ +#include "po-hash.h" + #include <stdio.h> +#include <stdlib.h> -#include <system.h> -#include "po-hash.h" +#include "xmalloc.h" #include "po.h" /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc), @@ -73,13 +76,13 @@ #define yycheck po_hash_yycheck -#line 89 "po-hash-gen.y" +#line 92 "po-hash-gen.y" typedef union { char *string; - int number; + size_t number; } YYSTYPE; -#line 98 "po-hash-gen.y" +#line 101 "po-hash-gen.y" static const char *cur; @@ -154,20 +157,20 @@ static const char yytranslate[] = { 0, #if YYDEBUG != 0 static const short yyprhs[] = { 0, - 0, 1, 4, 8, 16, 25 + 0, 1, 4, 8, 10, 18, 27 }; static const short yyrhs[] = { -1, - 10, 11, 0, 3, 5, 4, 0, 7, 5, 3, - 6, 8, 5, 4, 0, 7, 5, 3, 6, 8, - 9, 5, 4, 0, 7, 5, 4, 0 + 10, 11, 0, 3, 5, 4, 0, 3, 0, 7, + 5, 3, 6, 8, 5, 4, 0, 7, 5, 3, + 6, 8, 9, 5, 4, 0, 7, 5, 4, 0 }; #endif #if YYDEBUG != 0 static const short yyrline[] = { 0, - 129, 130, 134, 140, 146, 152 + 132, 133, 137, 143, 149, 155, 161 }; #endif @@ -181,16 +184,16 @@ static const char * const yytname[] = { "$","error","$undefined.","STRING", #endif static const short yyr1[] = { 0, - 10, 10, 11, 11, 11, 11 + 10, 10, 11, 11, 11, 11, 11 }; static const short yyr2[] = { 0, - 0, 2, 3, 7, 8, 3 + 0, 2, 3, 1, 7, 8, 3 }; static const short yydefact[] = { 1, - 0, 0, 0, 2, 0, 0, 3, 0, 6, 0, - 0, 0, 0, 4, 0, 5, 0, 0 + 0, 4, 0, 2, 0, 0, 3, 0, 7, 0, + 0, 0, 0, 5, 0, 6, 0, 0 }; static const short yydefgoto[] = { 1, @@ -763,7 +766,7 @@ yyreduce: switch (yyn) { case 3: -#line 135 "po-hash-gen.y" +#line 138 "po-hash-gen.y" { /* GNU style */ po_callback_comment_filepos (yyvsp[-2].string, yyvsp[0].number); @@ -771,23 +774,31 @@ case 3: ; break;} case 4: -#line 141 "po-hash-gen.y" +#line 144 "po-hash-gen.y" +{ + /* GNU style, without line number (e.g. from Pascal .rst) */ + po_callback_comment_filepos (yyvsp[0].string, (size_t)(-1)); + free (yyvsp[0].string); + ; + break;} +case 5: +#line 150 "po-hash-gen.y" { /* SunOS style */ po_callback_comment_filepos (yyvsp[-4].string, yyvsp[0].number); free (yyvsp[-4].string); ; break;} -case 5: -#line 147 "po-hash-gen.y" +case 6: +#line 156 "po-hash-gen.y" { /* Solaris style */ po_callback_comment_filepos (yyvsp[-5].string, yyvsp[0].number); free (yyvsp[-5].string); ; break;} -case 6: -#line 153 "po-hash-gen.y" +case 7: +#line 162 "po-hash-gen.y" { /* GNU style, but STRING is `file'. Esoteric, but it happened. */ @@ -1016,7 +1027,7 @@ yyerrhandle: } return 1; } -#line 160 "po-hash-gen.y" +#line 169 "po-hash-gen.y" @@ -1026,7 +1037,7 @@ yylex () static char *buf; static size_t bufmax; size_t bufpos; - int n; + size_t n; int c; for (;;) |