domnode-xml-parser.c 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284
  1. /* A Bison parser, made from ../../../src/sd/domnode-xml-parser.y
  2. by GNU bison 1.35. */
  3. #define YYBISON 1 /* Identify Bison output. */
  4. #define yyparse __sd_domnode_xml_parse
  5. #define yylex __sd_domnode_xml_lex
  6. #define yyerror __sd_domnode_xml_error
  7. #define yylval __sd_domnode_xml_lval
  8. #define yychar __sd_domnode_xml_char
  9. #define yydebug __sd_domnode_xml_debug
  10. #define yynerrs __sd_domnode_xml_nerrs
  11. # define ENDDEF 257
  12. # define EQ 258
  13. # define SLASH 259
  14. # define CLOSE 260
  15. # define END 261
  16. # define NAME 262
  17. # define VALUE 263
  18. # define DATA 264
  19. # define COMMENT 265
  20. # define START 266
  21. #line 1 "../../../src/sd/domnode-xml-parser.y"
  22. #include <assert.h>
  23. #include <stdio.h>
  24. #include <stdlib.h>
  25. #include <string.h>
  26. #include "error.h"
  27. #include "malloc.h"
  28. #include "domnode-xml.h"
  29. /* Generated by bison(1) */
  30. #include "domnode-xml-parser.h"
  31. /* Generated by flex(1) */
  32. #define YY_HEADER_NO_UNDEFS 1
  33. #include "domnode-xml-scanner.h"
  34. #define YYPARSE_PARAM __a_maker
  35. #define a_maker ((struct __sd_domnode_xml_maker*) YYPARSE_PARAM)
  36. #define YYLEX_PARAM (a_maker->scanner)
  37. #ifdef strdup
  38. # undef strdup
  39. #endif
  40. #define strdup sd_strdup
  41. #ifdef malloc
  42. # undef malloc
  43. #endif
  44. #define malloc sd_malloc
  45. #ifdef calloc
  46. # undef calloc
  47. #endif
  48. #define calloc sd_calloc
  49. #ifdef realloc
  50. # undef realloc
  51. #endif
  52. #define realloc sd_realloc
  53. #ifdef yyerror
  54. # undef yyerror
  55. #endif
  56. #define yyerror sd_error
  57. static void domnode_attribute(struct __sd_domnode_xml_maker*, const char*,
  58. const char*);
  59. #line 52 "../../../src/sd/domnode-xml-parser.y"
  60. #ifndef YYSTYPE
  61. typedef union { char *s; } yystype;
  62. # define YYSTYPE yystype
  63. # define YYSTYPE_IS_TRIVIAL 1
  64. #endif
  65. #ifndef YYDEBUG
  66. # define YYDEBUG 1
  67. #endif
  68. #define YYFINAL 27
  69. #define YYFLAG -32768
  70. #define YYNTBASE 13
  71. /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
  72. #define YYTRANSLATE(x) ((unsigned)(x) <= 266 ? yytranslate[x] : 23)
  73. /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
  74. static const char yytranslate[] =
  75. {
  76. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  77. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  78. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  79. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  80. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  81. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  82. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  83. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  84. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  85. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  86. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  87. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  88. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  89. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  90. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  91. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  92. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  93. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  94. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  95. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  96. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  97. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  98. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  99. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  100. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  101. 2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
  102. 6, 7, 8, 9, 10, 11, 12
  103. };
  104. #if YYDEBUG
  105. static const short yyprhs[] =
  106. {
  107. 0, 0, 4, 7, 8, 10, 11, 16, 19, 25,
  108. 28, 31, 34, 35, 37, 40, 41, 43
  109. };
  110. static const short yyrhs[] =
  111. {
  112. 14, 16, 14, 0, 14, 15, 0, 0, 11, 0,
  113. 0, 12, 17, 21, 18, 0, 5, 6, 0, 6,
  114. 19, 7, 20, 6, 0, 19, 10, 0, 19, 16,
  115. 0, 19, 15, 0, 0, 8, 0, 21, 22, 0,
  116. 0, 8, 0, 8, 4, 9, 0
  117. };
  118. #endif
  119. #if YYDEBUG
  120. /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
  121. static const short yyrline[] =
  122. {
  123. 0, 61, 65, 66, 70, 84, 84, 118, 126, 146,
  124. 156, 157, 158, 162, 169, 170, 174, 180
  125. };
  126. #endif
  127. #if (YYDEBUG) || defined YYERROR_VERBOSE
  128. /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
  129. static const char *const yytname[] =
  130. {
  131. "$", "error", "$undefined.", "ENDDEF", "EQ", "SLASH", "CLOSE", "END",
  132. "NAME", "VALUE", "DATA", "COMMENT", "START", "document", "misc",
  133. "comment", "element", "@1", "empty_or_content", "content", "name",
  134. "attribute_seq_opt", "attribute", 0
  135. };
  136. #endif
  137. /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  138. static const short yyr1[] =
  139. {
  140. 0, 13, 14, 14, 15, 17, 16, 18, 18, 19,
  141. 19, 19, 19, 20, 21, 21, 22, 22
  142. };
  143. /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
  144. static const short yyr2[] =
  145. {
  146. 0, 3, 2, 0, 1, 0, 4, 2, 5, 2,
  147. 2, 2, 0, 1, 2, 0, 1, 3
  148. };
  149. /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
  150. doesn't specify something else to do. Zero means the default is an
  151. error. */
  152. static const short yydefact[] =
  153. {
  154. 3, 0, 4, 5, 2, 3, 15, 1, 0, 0,
  155. 12, 16, 6, 14, 7, 0, 0, 0, 9, 11,
  156. 10, 17, 13, 0, 8, 0, 0, 0
  157. };
  158. static const short yydefgoto[] =
  159. {
  160. 25, 1, 4, 5, 6, 12, 15, 23, 8, 13
  161. };
  162. static const short yypact[] =
  163. {
  164. -32768, -10,-32768,-32768,-32768,-32768,-32768, -3, 1, 4,
  165. -32768, 7,-32768,-32768,-32768, -7, 3, 5,-32768,-32768,
  166. -32768,-32768,-32768, 8,-32768, 15, 16,-32768
  167. };
  168. static const short yypgoto[] =
  169. {
  170. -32768, 12, 6, 9,-32768,-32768,-32768,-32768,-32768,-32768
  171. };
  172. #define YYLAST 24
  173. static const short yytable[] =
  174. {
  175. 17, 2, 3, 18, 2, 3, 9, 10, 2, 11,
  176. 14, 16, 21, 22, 24, 26, 27, 7, 0, 0,
  177. 0, 19, 0, 0, 20
  178. };
  179. static const short yycheck[] =
  180. {
  181. 7, 11, 12, 10, 11, 12, 5, 6, 11, 8,
  182. 6, 4, 9, 8, 6, 0, 0, 5, -1, -1,
  183. -1, 15, -1, -1, 15
  184. };
  185. #define YYPURE 1
  186. /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
  187. #line 3 "/usr/share/bison/bison.simple"
  188. /* Skeleton output parser for bison,
  189. Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
  190. Foundation, Inc.
  191. This program is free software; you can redistribute it and/or modify
  192. it under the terms of the GNU General Public License as published by
  193. the Free Software Foundation; either version 2, or (at your option)
  194. any later version.
  195. This program is distributed in the hope that it will be useful,
  196. but WITHOUT ANY WARRANTY; without even the implied warranty of
  197. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  198. GNU General Public License for more details.
  199. You should have received a copy of the GNU General Public License
  200. along with this program; if not, write to the Free Software
  201. Foundation, Inc., 59 Temple Place - Suite 330,
  202. Boston, MA 02111-1307, USA. */
  203. /* As a special exception, when this file is copied by Bison into a
  204. Bison output file, you may use that output file without restriction.
  205. This special exception was added by the Free Software Foundation
  206. in version 1.24 of Bison. */
  207. /* This is the parser code that is written into each bison parser when
  208. the %semantic_parser declaration is not specified in the grammar.
  209. It was written by Richard Stallman by simplifying the hairy parser
  210. used when %semantic_parser is specified. */
  211. /* All symbols defined below should begin with yy or YY, to avoid
  212. infringing on user name space. This should be done even for local
  213. variables, as they might otherwise be expanded by user macros.
  214. There are some unavoidable exceptions within include files to
  215. define necessary library symbols; they are noted "INFRINGES ON
  216. USER NAME SPACE" below. */
  217. #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
  218. /* The parser invokes alloca or malloc; define the necessary symbols. */
  219. # if YYSTACK_USE_ALLOCA
  220. # define YYSTACK_ALLOC alloca
  221. # else
  222. # ifndef YYSTACK_USE_ALLOCA
  223. # if defined (alloca) || defined (_ALLOCA_H)
  224. # define YYSTACK_ALLOC alloca
  225. # else
  226. # ifdef __GNUC__
  227. # define YYSTACK_ALLOC __builtin_alloca
  228. # endif
  229. # endif
  230. # endif
  231. # endif
  232. # ifdef YYSTACK_ALLOC
  233. /* Pacify GCC's `empty if-body' warning. */
  234. # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
  235. # else
  236. # if defined (__STDC__) || defined (__cplusplus)
  237. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  238. # define YYSIZE_T size_t
  239. # endif
  240. # define YYSTACK_ALLOC malloc
  241. # define YYSTACK_FREE free
  242. # endif
  243. #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
  244. #if (! defined (yyoverflow) \
  245. && (! defined (__cplusplus) \
  246. || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
  247. /* A type that is properly aligned for any stack member. */
  248. union yyalloc
  249. {
  250. short yyss;
  251. YYSTYPE yyvs;
  252. # if YYLSP_NEEDED
  253. YYLTYPE yyls;
  254. # endif
  255. };
  256. /* The size of the maximum gap between one aligned stack and the next. */
  257. # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
  258. /* The size of an array large to enough to hold all stacks, each with
  259. N elements. */
  260. # if YYLSP_NEEDED
  261. # define YYSTACK_BYTES(N) \
  262. ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
  263. + 2 * YYSTACK_GAP_MAX)
  264. # else
  265. # define YYSTACK_BYTES(N) \
  266. ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
  267. + YYSTACK_GAP_MAX)
  268. # endif
  269. /* Copy COUNT objects from FROM to TO. The source and destination do
  270. not overlap. */
  271. # ifndef YYCOPY
  272. # if 1 < __GNUC__
  273. # define YYCOPY(To, From, Count) \
  274. __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
  275. # else
  276. # define YYCOPY(To, From, Count) \
  277. do \
  278. { \
  279. register YYSIZE_T yyi; \
  280. for (yyi = 0; yyi < (Count); yyi++) \
  281. (To)[yyi] = (From)[yyi]; \
  282. } \
  283. while (0)
  284. # endif
  285. # endif
  286. /* Relocate STACK from its old location to the new one. The
  287. local variables YYSIZE and YYSTACKSIZE give the old and new number of
  288. elements in the stack, and YYPTR gives the new location of the
  289. stack. Advance YYPTR to a properly aligned location for the next
  290. stack. */
  291. # define YYSTACK_RELOCATE(Stack) \
  292. do \
  293. { \
  294. YYSIZE_T yynewbytes; \
  295. YYCOPY (&yyptr->Stack, Stack, yysize); \
  296. Stack = &yyptr->Stack; \
  297. yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
  298. yyptr += yynewbytes / sizeof (*yyptr); \
  299. } \
  300. while (0)
  301. #endif
  302. #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
  303. # define YYSIZE_T __SIZE_TYPE__
  304. #endif
  305. #if ! defined (YYSIZE_T) && defined (size_t)
  306. # define YYSIZE_T size_t
  307. #endif
  308. #if ! defined (YYSIZE_T)
  309. # if defined (__STDC__) || defined (__cplusplus)
  310. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  311. # define YYSIZE_T size_t
  312. # endif
  313. #endif
  314. #if ! defined (YYSIZE_T)
  315. # define YYSIZE_T unsigned int
  316. #endif
  317. #define yyerrok (yyerrstatus = 0)
  318. #define yyclearin (yychar = YYEMPTY)
  319. #define YYEMPTY -2
  320. #define YYEOF 0
  321. #define YYACCEPT goto yyacceptlab
  322. #define YYABORT goto yyabortlab
  323. #define YYERROR goto yyerrlab1
  324. /* Like YYERROR except do call yyerror. This remains here temporarily
  325. to ease the transition to the new meaning of YYERROR, for GCC.
  326. Once GCC version 2 has supplanted version 1, this can go. */
  327. #define YYFAIL goto yyerrlab
  328. #define YYRECOVERING() (!!yyerrstatus)
  329. #define YYBACKUP(Token, Value) \
  330. do \
  331. if (yychar == YYEMPTY && yylen == 1) \
  332. { \
  333. yychar = (Token); \
  334. yylval = (Value); \
  335. yychar1 = YYTRANSLATE (yychar); \
  336. YYPOPSTACK; \
  337. goto yybackup; \
  338. } \
  339. else \
  340. { \
  341. yyerror ("syntax error: cannot back up"); \
  342. YYERROR; \
  343. } \
  344. while (0)
  345. #define YYTERROR 1
  346. #define YYERRCODE 256
  347. /* YYLLOC_DEFAULT -- Compute the default location (before the actions
  348. are run).
  349. When YYLLOC_DEFAULT is run, CURRENT is set the location of the
  350. first token. By default, to implement support for ranges, extend
  351. its range to the last symbol. */
  352. #ifndef YYLLOC_DEFAULT
  353. # define YYLLOC_DEFAULT(Current, Rhs, N) \
  354. Current.last_line = Rhs[N].last_line; \
  355. Current.last_column = Rhs[N].last_column;
  356. #endif
  357. /* YYLEX -- calling `yylex' with the right arguments. */
  358. #if YYPURE
  359. # if YYLSP_NEEDED
  360. # ifdef YYLEX_PARAM
  361. # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
  362. # else
  363. # define YYLEX yylex (&yylval, &yylloc)
  364. # endif
  365. # else /* !YYLSP_NEEDED */
  366. # ifdef YYLEX_PARAM
  367. # define YYLEX yylex (&yylval, YYLEX_PARAM)
  368. # else
  369. # define YYLEX yylex (&yylval)
  370. # endif
  371. # endif /* !YYLSP_NEEDED */
  372. #else /* !YYPURE */
  373. # define YYLEX yylex ()
  374. #endif /* !YYPURE */
  375. /* Enable debugging if requested. */
  376. #if YYDEBUG
  377. # ifndef YYFPRINTF
  378. # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  379. # define YYFPRINTF fprintf
  380. # endif
  381. # define YYDPRINTF(Args) \
  382. do { \
  383. if (yydebug) \
  384. YYFPRINTF Args; \
  385. } while (0)
  386. /* Nonzero means print parse trace. It is left uninitialized so that
  387. multiple parsers can coexist. */
  388. int yydebug;
  389. #else /* !YYDEBUG */
  390. # define YYDPRINTF(Args)
  391. #endif /* !YYDEBUG */
  392. /* YYINITDEPTH -- initial size of the parser's stacks. */
  393. #ifndef YYINITDEPTH
  394. # define YYINITDEPTH 200
  395. #endif
  396. /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
  397. if the built-in stack extension method is used).
  398. Do not make this value too large; the results are undefined if
  399. SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
  400. evaluated with infinite-precision integer arithmetic. */
  401. #if YYMAXDEPTH == 0
  402. # undef YYMAXDEPTH
  403. #endif
  404. #ifndef YYMAXDEPTH
  405. # define YYMAXDEPTH 10000
  406. #endif
  407. #ifdef YYERROR_VERBOSE
  408. # ifndef yystrlen
  409. # if defined (__GLIBC__) && defined (_STRING_H)
  410. # define yystrlen strlen
  411. # else
  412. /* Return the length of YYSTR. */
  413. static YYSIZE_T
  414. # if defined (__STDC__) || defined (__cplusplus)
  415. yystrlen (const char *yystr)
  416. # else
  417. yystrlen (yystr)
  418. const char *yystr;
  419. # endif
  420. {
  421. register const char *yys = yystr;
  422. while (*yys++ != '\0')
  423. continue;
  424. return yys - yystr - 1;
  425. }
  426. # endif
  427. # endif
  428. # ifndef yystpcpy
  429. # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
  430. # define yystpcpy stpcpy
  431. # else
  432. /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
  433. YYDEST. */
  434. static char *
  435. # if defined (__STDC__) || defined (__cplusplus)
  436. yystpcpy (char *yydest, const char *yysrc)
  437. # else
  438. yystpcpy (yydest, yysrc)
  439. char *yydest;
  440. const char *yysrc;
  441. # endif
  442. {
  443. register char *yyd = yydest;
  444. register const char *yys = yysrc;
  445. while ((*yyd++ = *yys++) != '\0')
  446. continue;
  447. return yyd - 1;
  448. }
  449. # endif
  450. # endif
  451. #endif
  452. #line 315 "/usr/share/bison/bison.simple"
  453. /* The user can define YYPARSE_PARAM as the name of an argument to be passed
  454. into yyparse. The argument should have type void *.
  455. It should actually point to an object.
  456. Grammar actions can access the variable by casting it
  457. to the proper pointer type. */
  458. #ifdef YYPARSE_PARAM
  459. # if defined (__STDC__) || defined (__cplusplus)
  460. # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
  461. # define YYPARSE_PARAM_DECL
  462. # else
  463. # define YYPARSE_PARAM_ARG YYPARSE_PARAM
  464. # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
  465. # endif
  466. #else /* !YYPARSE_PARAM */
  467. # define YYPARSE_PARAM_ARG
  468. # define YYPARSE_PARAM_DECL
  469. #endif /* !YYPARSE_PARAM */
  470. /* Prevent warning if -Wstrict-prototypes. */
  471. #ifdef __GNUC__
  472. # ifdef YYPARSE_PARAM
  473. int yyparse (void *);
  474. # else
  475. int yyparse (void);
  476. # endif
  477. #endif
  478. /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
  479. variables are global, or local to YYPARSE. */
  480. #define YY_DECL_NON_LSP_VARIABLES \
  481. /* The lookahead symbol. */ \
  482. int yychar; \
  483. \
  484. /* The semantic value of the lookahead symbol. */ \
  485. YYSTYPE yylval; \
  486. \
  487. /* Number of parse errors so far. */ \
  488. int yynerrs;
  489. #if YYLSP_NEEDED
  490. # define YY_DECL_VARIABLES \
  491. YY_DECL_NON_LSP_VARIABLES \
  492. \
  493. /* Location data for the lookahead symbol. */ \
  494. YYLTYPE yylloc;
  495. #else
  496. # define YY_DECL_VARIABLES \
  497. YY_DECL_NON_LSP_VARIABLES
  498. #endif
  499. /* If nonreentrant, generate the variables here. */
  500. #if !YYPURE
  501. YY_DECL_VARIABLES
  502. #endif /* !YYPURE */
  503. //int
  504. //yyparse (YYPARSE_PARAM_ARG)
  505. //YYPARSE_PARAM_DECL
  506. int yyparse(struct __sd_domnode_xml_maker*YYPARSE_PARAM)
  507. {
  508. /* If reentrant, generate the variables here. */
  509. #if YYPURE
  510. YY_DECL_VARIABLES
  511. #endif /* !YYPURE */
  512. register int yystate;
  513. register int yyn;
  514. int yyresult;
  515. /* Number of tokens to shift before error messages enabled. */
  516. int yyerrstatus;
  517. /* Lookahead token as an internal (translated) token number. */
  518. int yychar1 = 0;
  519. /* Three stacks and their tools:
  520. `yyss': related to states,
  521. `yyvs': related to semantic values,
  522. `yyls': related to locations.
  523. Refer to the stacks thru separate pointers, to allow yyoverflow
  524. to reallocate them elsewhere. */
  525. /* The state stack. */
  526. short yyssa[YYINITDEPTH];
  527. short *yyss = yyssa;
  528. register short *yyssp;
  529. /* The semantic value stack. */
  530. YYSTYPE yyvsa[YYINITDEPTH];
  531. YYSTYPE *yyvs = yyvsa;
  532. register YYSTYPE *yyvsp;
  533. #if YYLSP_NEEDED
  534. /* The location stack. */
  535. YYLTYPE yylsa[YYINITDEPTH];
  536. YYLTYPE *yyls = yylsa;
  537. YYLTYPE *yylsp;
  538. #endif
  539. #if YYLSP_NEEDED
  540. # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
  541. #else
  542. # define YYPOPSTACK (yyvsp--, yyssp--)
  543. #endif
  544. YYSIZE_T yystacksize = YYINITDEPTH;
  545. /* The variables used to return semantic value and location from the
  546. action routines. */
  547. YYSTYPE yyval;
  548. #if YYLSP_NEEDED
  549. YYLTYPE yyloc;
  550. #endif
  551. /* When reducing, the number of symbols on the RHS of the reduced
  552. rule. */
  553. int yylen;
  554. YYDPRINTF ((stderr, "Starting parse\n"));
  555. yystate = 0;
  556. yyerrstatus = 0;
  557. yynerrs = 0;
  558. yychar = YYEMPTY; /* Cause a token to be read. */
  559. /* Initialize stack pointers.
  560. Waste one element of value and location stack
  561. so that they stay on the same level as the state stack.
  562. The wasted elements are never initialized. */
  563. yyssp = yyss;
  564. yyvsp = yyvs;
  565. #if YYLSP_NEEDED
  566. yylsp = yyls;
  567. #endif
  568. goto yysetstate;
  569. /*------------------------------------------------------------.
  570. | yynewstate -- Push a new state, which is found in yystate. |
  571. `------------------------------------------------------------*/
  572. yynewstate:
  573. /* In all cases, when you get here, the value and location stacks
  574. have just been pushed. so pushing a state here evens the stacks.
  575. */
  576. yyssp++;
  577. yysetstate:
  578. *yyssp = yystate;
  579. if (yyssp >= yyss + yystacksize - 1)
  580. {
  581. /* Get the current used size of the three stacks, in elements. */
  582. YYSIZE_T yysize = yyssp - yyss + 1;
  583. #ifdef yyoverflow
  584. {
  585. /* Give user a chance to reallocate the stack. Use copies of
  586. these so that the &'s don't force the real ones into
  587. memory. */
  588. YYSTYPE *yyvs1 = yyvs;
  589. short *yyss1 = yyss;
  590. /* Each stack pointer address is followed by the size of the
  591. data in use in that stack, in bytes. */
  592. # if YYLSP_NEEDED
  593. YYLTYPE *yyls1 = yyls;
  594. /* This used to be a conditional around just the two extra args,
  595. but that might be undefined if yyoverflow is a macro. */
  596. yyoverflow ("parser stack overflow",
  597. &yyss1, yysize * sizeof (*yyssp),
  598. &yyvs1, yysize * sizeof (*yyvsp),
  599. &yyls1, yysize * sizeof (*yylsp),
  600. &yystacksize);
  601. yyls = yyls1;
  602. # else
  603. yyoverflow ("parser stack overflow",
  604. &yyss1, yysize * sizeof (*yyssp),
  605. &yyvs1, yysize * sizeof (*yyvsp),
  606. &yystacksize);
  607. # endif
  608. yyss = yyss1;
  609. yyvs = yyvs1;
  610. }
  611. #else /* no yyoverflow */
  612. # ifndef YYSTACK_RELOCATE
  613. goto yyoverflowlab;
  614. # else
  615. /* Extend the stack our own way. */
  616. if (yystacksize >= YYMAXDEPTH)
  617. goto yyoverflowlab;
  618. yystacksize *= 2;
  619. if (yystacksize > YYMAXDEPTH)
  620. yystacksize = YYMAXDEPTH;
  621. {
  622. short *yyss1 = yyss;
  623. union yyalloc *yyptr =
  624. (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
  625. if (! yyptr)
  626. goto yyoverflowlab;
  627. YYSTACK_RELOCATE (yyss);
  628. YYSTACK_RELOCATE (yyvs);
  629. # if YYLSP_NEEDED
  630. YYSTACK_RELOCATE (yyls);
  631. # endif
  632. # undef YYSTACK_RELOCATE
  633. if (yyss1 != yyssa)
  634. YYSTACK_FREE (yyss1);
  635. }
  636. # endif
  637. #endif /* no yyoverflow */
  638. yyssp = yyss + yysize - 1;
  639. yyvsp = yyvs + yysize - 1;
  640. #if YYLSP_NEEDED
  641. yylsp = yyls + yysize - 1;
  642. #endif
  643. YYDPRINTF ((stderr, "Stack size increased to %lu\n",
  644. (unsigned long int) yystacksize));
  645. if (yyssp >= yyss + yystacksize - 1)
  646. YYABORT;
  647. }
  648. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  649. goto yybackup;
  650. /*-----------.
  651. | yybackup. |
  652. `-----------*/
  653. yybackup:
  654. /* Do appropriate processing given the current state. */
  655. /* Read a lookahead token if we need one and don't already have one. */
  656. /* yyresume: */
  657. /* First try to decide what to do without reference to lookahead token. */
  658. yyn = yypact[yystate];
  659. if (yyn == YYFLAG)
  660. goto yydefault;
  661. /* Not known => get a lookahead token if don't already have one. */
  662. /* yychar is either YYEMPTY or YYEOF
  663. or a valid token in external form. */
  664. if (yychar == YYEMPTY)
  665. {
  666. YYDPRINTF ((stderr, "Reading a token: "));
  667. yychar = YYLEX;
  668. }
  669. /* Convert token to internal form (in yychar1) for indexing tables with */
  670. if (yychar <= 0) /* This means end of input. */
  671. {
  672. yychar1 = 0;
  673. yychar = YYEOF; /* Don't call YYLEX any more */
  674. YYDPRINTF ((stderr, "Now at end of input.\n"));
  675. }
  676. else
  677. {
  678. yychar1 = YYTRANSLATE (yychar);
  679. #if YYDEBUG
  680. /* We have to keep this `#if YYDEBUG', since we use variables
  681. which are defined only if `YYDEBUG' is set. */
  682. if (yydebug)
  683. {
  684. YYFPRINTF (stderr, "Next token is %d (%s",
  685. yychar, yytname[yychar1]);
  686. /* Give the individual parser a way to print the precise
  687. meaning of a token, for further debugging info. */
  688. # ifdef YYPRINT
  689. YYPRINT (stderr, yychar, yylval);
  690. # endif
  691. YYFPRINTF (stderr, ")\n");
  692. }
  693. #endif
  694. }
  695. yyn += yychar1;
  696. if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
  697. goto yydefault;
  698. yyn = yytable[yyn];
  699. /* yyn is what to do for this token type in this state.
  700. Negative => reduce, -yyn is rule number.
  701. Positive => shift, yyn is new state.
  702. New state is final state => don't bother to shift,
  703. just return success.
  704. 0, or most negative number => error. */
  705. if (yyn < 0)
  706. {
  707. if (yyn == YYFLAG)
  708. goto yyerrlab;
  709. yyn = -yyn;
  710. goto yyreduce;
  711. }
  712. else if (yyn == 0)
  713. goto yyerrlab;
  714. if (yyn == YYFINAL)
  715. YYACCEPT;
  716. /* Shift the lookahead token. */
  717. YYDPRINTF ((stderr, "Shifting token %d (%s), ",
  718. yychar, yytname[yychar1]));
  719. /* Discard the token being shifted unless it is eof. */
  720. if (yychar != YYEOF)
  721. yychar = YYEMPTY;
  722. *++yyvsp = yylval;
  723. #if YYLSP_NEEDED
  724. *++yylsp = yylloc;
  725. #endif
  726. /* Count tokens shifted since error; after three, turn off error
  727. status. */
  728. if (yyerrstatus)
  729. yyerrstatus--;
  730. yystate = yyn;
  731. goto yynewstate;
  732. /*-----------------------------------------------------------.
  733. | yydefault -- do the default action for the current state. |
  734. `-----------------------------------------------------------*/
  735. yydefault:
  736. yyn = yydefact[yystate];
  737. if (yyn == 0)
  738. goto yyerrlab;
  739. goto yyreduce;
  740. /*-----------------------------.
  741. | yyreduce -- Do a reduction. |
  742. `-----------------------------*/
  743. yyreduce:
  744. /* yyn is the number of a rule to reduce with. */
  745. yylen = yyr2[yyn];
  746. /* If YYLEN is nonzero, implement the default value of the action:
  747. `$$ = $1'.
  748. Otherwise, the following line sets YYVAL to the semantic value of
  749. the lookahead token. This behavior is undocumented and Bison
  750. users should not rely upon it. Assigning to YYVAL
  751. unconditionally makes the parser a bit smaller, and it avoids a
  752. GCC warning that YYVAL may be used uninitialized. */
  753. yyval = yyvsp[1-yylen];
  754. #if YYLSP_NEEDED
  755. /* Similarly for the default location. Let the user run additional
  756. commands if for instance locations are ranges. */
  757. yyloc = yylsp[1-yylen];
  758. YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
  759. #endif
  760. #if YYDEBUG
  761. /* We have to keep this `#if YYDEBUG', since we use variables which
  762. are defined only if `YYDEBUG' is set. */
  763. if (yydebug)
  764. {
  765. int yyi;
  766. YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
  767. yyn, yyrline[yyn]);
  768. /* Print the symbols being reduced, and their result. */
  769. for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
  770. YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
  771. YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
  772. }
  773. #endif
  774. switch (yyn) {
  775. case 4:
  776. #line 71 "../../../src/sd/domnode-xml-parser.y"
  777. {
  778. sd_domnode_t* node = (sd_domnode_t*)sd_stack_peek(a_maker->elements);
  779. if (node) {
  780. sd_debug("COMMENT: add comment '%s' to node '%s'\n", yyvsp[0].s, node->name);
  781. sd_list_append(node->children, __sd_domnode_new("#comment", yyvsp[0].s, 0));
  782. /* $1 was obtain with strdup() */
  783. free(yyvsp[0].s);
  784. }
  785. ;
  786. break;}
  787. case 5:
  788. #line 85 "../../../src/sd/domnode-xml-parser.y"
  789. {
  790. sd_domnode_t* parent = (sd_domnode_t*)sd_stack_peek(a_maker->elements);
  791. sd_domnode_t* node = __sd_domnode_new(yyvsp[0].s, 0, 1);
  792. #ifdef __SD_DEBUG__
  793. {
  794. static void* __debug = 0;
  795. if (! __debug) {
  796. __debug = getenv("SD_DEBUG");
  797. if (__debug)
  798. yydebug = 1;
  799. else
  800. __debug = (void*) 0x1;
  801. }
  802. }
  803. #endif
  804. if (parent) {
  805. sd_debug("START: add child '%s' to node '%s'\n", yyvsp[0].s, parent->name);
  806. sd_list_append(parent->children, node);
  807. } else {
  808. sd_debug("START: add root'%s'\n", yyvsp[0].s);
  809. a_maker->root = node;
  810. }
  811. sd_stack_push(a_maker->elements, node);
  812. free(yyvsp[0].s);
  813. ;
  814. break;}
  815. case 7:
  816. #line 119 "../../../src/sd/domnode-xml-parser.y"
  817. {
  818. sd_domnode_t* node = (sd_domnode_t*)sd_stack_peek(a_maker->elements);
  819. assert(node != 0);
  820. sd_debug("END: simple node '%s'\n", node->name);
  821. sd_stack_pop(a_maker->elements);
  822. ;
  823. break;}
  824. case 8:
  825. #line 127 "../../../src/sd/domnode-xml-parser.y"
  826. {
  827. sd_domnode_t* node = (sd_domnode_t*)sd_stack_peek(a_maker->elements);
  828. assert(node != 0);
  829. sd_debug("END: node '%s'\n", yyvsp[-1].s);
  830. if (strcmp(node->name, yyvsp[-1].s)) {
  831. yyerror("got </%s> instead of </%s>\n", yyvsp[-1].s, node->name);
  832. YYERROR;
  833. }
  834. /* $4 was obtain with strdup() */
  835. free(yyvsp[-1].s);
  836. sd_stack_pop(a_maker->elements);
  837. ;
  838. break;}
  839. case 9:
  840. #line 147 "../../../src/sd/domnode-xml-parser.y"
  841. {
  842. sd_domnode_t* node = (sd_domnode_t*)sd_stack_peek(a_maker->elements);
  843. assert(node != 0);
  844. sd_debug("CONTENT: add cvalue '%s' to node '%s'\n", yyvsp[0].s, node->name);
  845. /* $2 was obtain with strdup() */
  846. node->value = yyvsp[0].s;
  847. ;
  848. break;}
  849. case 13:
  850. #line 163 "../../../src/sd/domnode-xml-parser.y"
  851. {
  852. yyval.s = yyvsp[0].s;
  853. ;
  854. break;}
  855. case 16:
  856. #line 175 "../../../src/sd/domnode-xml-parser.y"
  857. {
  858. domnode_attribute(a_maker, yyvsp[0].s, "");
  859. /* $1 was obtain with strdup() */
  860. free(yyvsp[0].s);
  861. ;
  862. break;}
  863. case 17:
  864. #line 181 "../../../src/sd/domnode-xml-parser.y"
  865. {
  866. domnode_attribute(a_maker, yyvsp[-2].s, yyvsp[0].s);
  867. /* $1 was obtain with strdup() */
  868. free(yyvsp[-2].s);
  869. /* $3 was obtain with strdup() */
  870. free(yyvsp[0].s);
  871. ;
  872. break;}
  873. }
  874. #line 705 "/usr/share/bison/bison.simple"
  875. yyvsp -= yylen;
  876. yyssp -= yylen;
  877. #if YYLSP_NEEDED
  878. yylsp -= yylen;
  879. #endif
  880. #if YYDEBUG
  881. if (yydebug)
  882. {
  883. short *yyssp1 = yyss - 1;
  884. YYFPRINTF (stderr, "state stack now");
  885. while (yyssp1 != yyssp)
  886. YYFPRINTF (stderr, " %d", *++yyssp1);
  887. YYFPRINTF (stderr, "\n");
  888. }
  889. #endif
  890. *++yyvsp = yyval;
  891. #if YYLSP_NEEDED
  892. *++yylsp = yyloc;
  893. #endif
  894. /* Now `shift' the result of the reduction. Determine what state
  895. that goes to, based on the state we popped back to and the rule
  896. number reduced by. */
  897. yyn = yyr1[yyn];
  898. yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  899. if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  900. yystate = yytable[yystate];
  901. else
  902. yystate = yydefgoto[yyn - YYNTBASE];
  903. goto yynewstate;
  904. /*------------------------------------.
  905. | yyerrlab -- here on detecting error |
  906. `------------------------------------*/
  907. yyerrlab:
  908. /* If not already recovering from an error, report this error. */
  909. if (!yyerrstatus)
  910. {
  911. ++yynerrs;
  912. #ifdef YYERROR_VERBOSE
  913. yyn = yypact[yystate];
  914. if (yyn > YYFLAG && yyn < YYLAST)
  915. {
  916. YYSIZE_T yysize = 0;
  917. char *yymsg;
  918. int yyx, yycount;
  919. yycount = 0;
  920. /* Start YYX at -YYN if negative to avoid negative indexes in
  921. YYCHECK. */
  922. for (yyx = yyn < 0 ? -yyn : 0;
  923. yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
  924. if (yycheck[yyx + yyn] == yyx)
  925. yysize += yystrlen (yytname[yyx]) + 15, yycount++;
  926. yysize += yystrlen ("parse error, unexpected ") + 1;
  927. yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
  928. yymsg = (char *) YYSTACK_ALLOC (yysize);
  929. if (yymsg != 0)
  930. {
  931. char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
  932. yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
  933. if (yycount < 5)
  934. {
  935. yycount = 0;
  936. for (yyx = yyn < 0 ? -yyn : 0;
  937. yyx < (int) (sizeof (yytname) / sizeof (char *));
  938. yyx++)
  939. if (yycheck[yyx + yyn] == yyx)
  940. {
  941. const char *yyq = ! yycount ? ", expecting " : " or ";
  942. yyp = yystpcpy (yyp, yyq);
  943. yyp = yystpcpy (yyp, yytname[yyx]);
  944. yycount++;
  945. }
  946. }
  947. yyerror (yymsg);
  948. YYSTACK_FREE (yymsg);
  949. }
  950. else
  951. yyerror ("parse error; also virtual memory exhausted");
  952. }
  953. else
  954. #endif /* defined (YYERROR_VERBOSE) */
  955. yyerror ("parse error");
  956. }
  957. goto yyerrlab1;
  958. /*--------------------------------------------------.
  959. | yyerrlab1 -- error raised explicitly by an action |
  960. `--------------------------------------------------*/
  961. yyerrlab1:
  962. if (yyerrstatus == 3)
  963. {
  964. /* If just tried and failed to reuse lookahead token after an
  965. error, discard it. */
  966. /* return failure if at end of input */
  967. if (yychar == YYEOF)
  968. YYABORT;
  969. YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
  970. yychar, yytname[yychar1]));
  971. yychar = YYEMPTY;
  972. }
  973. /* Else will try to reuse lookahead token after shifting the error
  974. token. */
  975. yyerrstatus = 3; /* Each real token shifted decrements this */
  976. goto yyerrhandle;
  977. /*-------------------------------------------------------------------.
  978. | yyerrdefault -- current state does not do anything special for the |
  979. | error token. |
  980. `-------------------------------------------------------------------*/
  981. yyerrdefault:
  982. #if 0
  983. /* This is wrong; only states that explicitly want error tokens
  984. should shift them. */
  985. /* If its default is to accept any token, ok. Otherwise pop it. */
  986. yyn = yydefact[yystate];
  987. if (yyn)
  988. goto yydefault;
  989. #endif
  990. /*---------------------------------------------------------------.
  991. | yyerrpop -- pop the current state because it cannot handle the |
  992. | error token |
  993. `---------------------------------------------------------------*/
  994. yyerrpop:
  995. if (yyssp == yyss)
  996. YYABORT;
  997. yyvsp--;
  998. yystate = *--yyssp;
  999. #if YYLSP_NEEDED
  1000. yylsp--;
  1001. #endif
  1002. #if YYDEBUG
  1003. if (yydebug)
  1004. {
  1005. short *yyssp1 = yyss - 1;
  1006. YYFPRINTF (stderr, "Error: state stack now");
  1007. while (yyssp1 != yyssp)
  1008. YYFPRINTF (stderr, " %d", *++yyssp1);
  1009. YYFPRINTF (stderr, "\n");
  1010. }
  1011. #endif
  1012. /*--------------.
  1013. | yyerrhandle. |
  1014. `--------------*/
  1015. yyerrhandle:
  1016. yyn = yypact[yystate];
  1017. if (yyn == YYFLAG)
  1018. goto yyerrdefault;
  1019. yyn += YYTERROR;
  1020. if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
  1021. goto yyerrdefault;
  1022. yyn = yytable[yyn];
  1023. if (yyn < 0)
  1024. {
  1025. if (yyn == YYFLAG)
  1026. goto yyerrpop;
  1027. yyn = -yyn;
  1028. goto yyreduce;
  1029. }
  1030. else if (yyn == 0)
  1031. goto yyerrpop;
  1032. if (yyn == YYFINAL)
  1033. YYACCEPT;
  1034. YYDPRINTF ((stderr, "Shifting error token, "));
  1035. *++yyvsp = yylval;
  1036. #if YYLSP_NEEDED
  1037. *++yylsp = yylloc;
  1038. #endif
  1039. yystate = yyn;
  1040. goto yynewstate;
  1041. /*-------------------------------------.
  1042. | yyacceptlab -- YYACCEPT comes here. |
  1043. `-------------------------------------*/
  1044. yyacceptlab:
  1045. yyresult = 0;
  1046. goto yyreturn;
  1047. /*-----------------------------------.
  1048. | yyabortlab -- YYABORT comes here. |
  1049. `-----------------------------------*/
  1050. yyabortlab:
  1051. yyresult = 1;
  1052. goto yyreturn;
  1053. /*---------------------------------------------.
  1054. | yyoverflowab -- parser overflow comes here. |
  1055. `---------------------------------------------*/
  1056. yyoverflowlab:
  1057. yyerror ("parser stack overflow");
  1058. yyresult = 2;
  1059. /* Fall through. */
  1060. yyreturn:
  1061. #ifndef yyoverflow
  1062. if (yyss != yyssa)
  1063. YYSTACK_FREE (yyss);
  1064. #endif
  1065. return yyresult;
  1066. }
  1067. #line 190 "../../../src/sd/domnode-xml-parser.y"
  1068. #undef a_maker
  1069. /******************************************************************************/
  1070. static void domnode_attribute(struct __sd_domnode_xml_maker* a_maker,
  1071. const char* a_name, const char* a_value)
  1072. {
  1073. sd_domnode_t* node = (sd_domnode_t*)sd_stack_peek(a_maker->elements);
  1074. assert(node != 0);
  1075. sd_debug("ATTR: add atrribute '%s'='%s' to node '%s'\n", a_name, a_value,
  1076. node->name);
  1077. sd_list_append(node->attrs, __sd_domnode_new(a_name, a_value, 0));
  1078. }