Browse Source

prebuild bison

David Rose 21 years ago
parent
commit
96e4161169
1 changed files with 216 additions and 244 deletions
  1. 216 244
      direct/src/dcparser/dcParser.cxx.prebuilt

+ 216 - 244
direct/src/dcparser/dcParser.cxx.prebuilt

@@ -56,6 +56,8 @@
 #include "dcClass.h"
 #include "dcAtomicField.h"
 #include "dcMolecularField.h"
+#include "dcSimpleType.h"
+#include "dcPacker.h"
 
 // Because our token type contains objects of type string, which
 // require correct copy construction (and not simply memcpying), we
@@ -69,7 +71,8 @@ static DCFile *dc_file = (DCFile *)NULL;
 static DCClass *current_class = (DCClass *)NULL;
 static DCAtomicField *current_atomic = (DCAtomicField *)NULL;
 static DCMolecularField *current_molecular = (DCMolecularField *)NULL;
-static DCAtomicField::ElementType atomic_element;
+static DCAtomicField::ElementType atomic_element(new DCSimpleType(ST_invalid));
+static DCPacker default_value_packer;
 
 ////////////////////////////////////////////////////////////////////
 // Defining the interface to the parser.
@@ -92,12 +95,12 @@ dc_cleanup_parser() {
 
 
 
-#define	YYFINAL		122
+#define	YYFINAL		121
 #define	YYFLAG		-32768
 #define	YYNTBASE	51
 
 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
-#define YYTRANSLATE(x) ((unsigned)(x) <= 293 ? yytranslate[x] : 82)
+#define YYTRANSLATE(x) ((unsigned)(x) <= 293 ? yytranslate[x] : 84)
 
 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
 static const char yytranslate[] =
@@ -141,40 +144,38 @@ static const short yyprhs[] =
       28,    30,    34,    37,    38,    44,    46,    48,    50,    54,
       56,    59,    61,    65,    67,    70,    73,    76,    77,    84,
       86,    88,    90,    92,    96,    97,   101,   103,   107,   110,
-     114,   118,   122,   126,   132,   134,   137,   139,   141,   143,
-     147,   149,   151,   153,   155,   159,   163,   167,   169,   171,
-     173,   175,   177,   179,   181,   183,   185,   187,   189,   191,
-     193,   195,   197,   199,   201,   203,   205,   207,   210,   213,
-     216,   219,   222,   225,   228,   231,   234,   235,   240,   242,
-     246
+     111,   116,   118,   120,   122,   124,   125,   130,   134,   138,
+     142,   144,   147,   149,   151,   153,   157,   159,   161,   163,
+     165,   167,   169,   171,   173,   175,   177,   179,   181,   183,
+     185,   187,   189,   191,   193,   195,   197,   200,   203,   206,
+     209,   212,   215,   218,   221,   224,   225,   230,   232,   236
 };
 static const short yyrhs[] =
 {
-      81,     0,    51,    40,     0,    51,    52,     0,    51,    57,
+      83,     0,    51,    40,     0,    51,    52,     0,    51,    57,
        0,     0,     8,     7,    53,    61,    41,    63,    42,     0,
        7,     0,     7,     0,    55,    43,     7,     0,    55,     0,
       56,    44,    55,     0,    10,    56,     0,     0,     9,    56,
       10,    58,    59,     0,    60,     0,    45,     0,    55,     0,
-      60,    46,    55,     0,    81,     0,    47,    62,     0,    54,
-       0,    62,    46,    54,     0,    81,     0,    63,    40,     0,
-      63,    64,     0,    63,    78,     0,     0,     7,    48,    65,
-      67,    49,    77,     0,     7,     0,    81,     0,    68,     0,
-      69,     0,    68,    46,    69,     0,     0,    76,    70,    71,
-       0,    81,     0,    71,    43,     3,     0,    71,     7,     0,
-      71,    50,     3,     0,    71,    50,     4,     0,    71,    50,
-       5,     0,    71,    50,     6,     0,    71,    50,    41,    72,
-      42,     0,    81,     0,    74,    73,     0,    81,     0,    46,
-       0,    75,     0,    74,    46,    75,     0,     3,     0,     4,
-       0,     5,     0,     6,     0,     3,    45,     3,     0,     4,
-      45,     3,     0,     6,    45,     3,     0,    11,     0,    12,
+      60,    46,    55,     0,    83,     0,    47,    62,     0,    54,
+       0,    62,    46,    54,     0,    83,     0,    63,    40,     0,
+      63,    64,     0,    63,    80,     0,     0,     7,    48,    65,
+      67,    49,    79,     0,     7,     0,    83,     0,    68,     0,
+      69,     0,    68,    46,    69,     0,     0,    78,    70,    71,
+       0,    83,     0,    71,    43,     3,     0,    71,     7,     0,
+       0,    71,    50,    72,    73,     0,     3,     0,     4,     0,
+       5,     0,     6,     0,     0,    41,    74,    75,    42,     0,
+       3,    45,     3,     0,     4,    45,     3,     0,     6,    45,
+       3,     0,    83,     0,    77,    76,     0,    83,     0,    46,
+       0,    73,     0,    77,    46,    73,     0,    11,     0,    12,
        0,    13,     0,    14,     0,    15,     0,    16,     0,    17,
        0,    18,     0,    19,     0,    20,     0,    21,     0,    22,
        0,    23,     0,    24,     0,    25,     0,    26,     0,    27,
-       0,    28,     0,    29,     0,    81,     0,    77,    31,     0,
-      77,    32,     0,    77,    33,     0,    77,    34,     0,    77,
-      35,     0,    77,    36,     0,    77,    37,     0,    77,    38,
-       0,    77,    39,     0,     0,     7,    47,    79,    80,     0,
-      66,     0,    80,    46,    66,     0,     0
+       0,    28,     0,    29,     0,    83,     0,    79,    31,     0,
+      79,    32,     0,    79,    33,     0,    79,    34,     0,    79,
+      35,     0,    79,    36,     0,    79,    37,     0,    79,    38,
+       0,    79,    39,     0,     0,     7,    47,    81,    82,     0,
+      66,     0,    82,    46,    66,     0,     0
 };
 
 #endif
@@ -183,16 +184,15 @@ static const short yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
 static const short yyrline[] =
 {
-       0,    93,    95,    96,    97,   100,   100,   116,   130,   132,
-     138,   140,   146,   151,   151,   158,   160,   166,   171,   177,
-     179,   182,   189,   197,   199,   200,   201,   204,   204,   215,
-     231,   233,   236,   238,   241,   241,   253,   255,   259,   263,
-     269,   275,   281,   287,   297,   299,   302,   304,   307,   309,
-     312,   319,   325,   331,   337,   346,   355,   366,   371,   375,
-     379,   383,   387,   391,   395,   399,   403,   407,   411,   415,
-     419,   423,   427,   431,   435,   439,   445,   447,   451,   455,
-     459,   463,   467,   471,   475,   479,   485,   485,   496,   503,
-     516
+       0,    96,    98,    99,   100,   103,   103,   119,   133,   135,
+     141,   143,   149,   154,   154,   161,   163,   169,   174,   180,
+     182,   185,   192,   200,   202,   203,   204,   207,   207,   218,
+     234,   236,   239,   241,   244,   244,   255,   257,   266,   270,
+     270,   285,   290,   294,   298,   302,   302,   310,   316,   322,
+     330,   332,   335,   337,   340,   342,   345,   350,   354,   358,
+     362,   366,   370,   374,   378,   382,   386,   390,   394,   398,
+     402,   406,   410,   414,   418,   424,   426,   430,   434,   438,
+     442,   446,   450,   454,   458,   464,   464,   475,   482,   495
 };
 #endif
 
@@ -216,9 +216,9 @@ static const char *const yytname[] =
   "import_symbol_list_or_star", "import_symbol_list", "dclass_derivation", 
   "base_list", "dclass_fields", "atomic_field", "@3", "atomic_name", 
   "parameter_list", "nonempty_parameter_list", "atomic_element", "@4", 
-  "atomic_element_definition", "default_array", "maybe_comma", 
-  "default_array_def", "default_array_element", "type_token", 
-  "atomic_flags", "molecular_field", "@5", "molecular_atom_list", "empty", 0
+  "atomic_element_definition", "@5", "default_value", "@6", 
+  "default_array", "maybe_comma", "default_array_def", "type_token", 
+  "atomic_flags", "molecular_field", "@7", "molecular_atom_list", "empty", 0
 };
 #endif
 
@@ -228,13 +228,12 @@ static const short yyr1[] =
        0,    51,    51,    51,    51,    53,    52,    54,    55,    55,
       56,    56,    57,    58,    57,    59,    59,    60,    60,    61,
       61,    62,    62,    63,    63,    63,    63,    65,    64,    66,
-      67,    67,    68,    68,    70,    69,    71,    71,    71,    71,
-      71,    71,    71,    71,    72,    72,    73,    73,    74,    74,
-      75,    75,    75,    75,    75,    75,    75,    76,    76,    76,
-      76,    76,    76,    76,    76,    76,    76,    76,    76,    76,
-      76,    76,    76,    76,    76,    76,    77,    77,    77,    77,
-      77,    77,    77,    77,    77,    77,    79,    78,    80,    80,
-      81
+      67,    67,    68,    68,    70,    69,    71,    71,    71,    72,
+      71,    73,    73,    73,    73,    74,    73,    73,    73,    73,
+      75,    75,    76,    76,    77,    77,    78,    78,    78,    78,
+      78,    78,    78,    78,    78,    78,    78,    78,    78,    78,
+      78,    78,    78,    78,    78,    79,    79,    79,    79,    79,
+      79,    79,    79,    79,    79,    81,    80,    82,    82,    83
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -243,13 +242,12 @@ static const short yyr2[] =
        0,     1,     2,     2,     2,     0,     7,     1,     1,     3,
        1,     3,     2,     0,     5,     1,     1,     1,     3,     1,
        2,     1,     3,     1,     2,     2,     2,     0,     6,     1,
-       1,     1,     1,     3,     0,     3,     1,     3,     2,     3,
-       3,     3,     3,     5,     1,     2,     1,     1,     1,     3,
-       1,     1,     1,     1,     3,     3,     3,     1,     1,     1,
+       1,     1,     1,     3,     0,     3,     1,     3,     2,     0,
+       4,     1,     1,     1,     1,     0,     4,     3,     3,     3,
+       1,     2,     1,     1,     1,     3,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     0,     4,     1,     3,
-       0
+       1,     1,     1,     1,     1,     1,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     0,     4,     1,     3,     0
 };
 
 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
@@ -257,84 +255,84 @@ static const short yyr2[] =
    error. */
 static const short yydefact[] =
 {
-      90,     0,     1,     0,     0,     0,     2,     3,     4,     5,
-       8,    10,     0,    12,    90,     0,    13,     0,     0,     0,
-      19,     9,     0,    11,     7,    21,    20,    90,    16,    17,
+      89,     0,     1,     0,     0,     0,     2,     3,     4,     5,
+       8,    10,     0,    12,    89,     0,    13,     0,     0,     0,
+      19,     9,     0,    11,     7,    21,    20,    89,    16,    17,
       14,    15,     0,     0,    23,     0,    22,     0,    24,     6,
-      25,    26,    18,    86,    27,     0,    90,    29,    88,    87,
-      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
-      67,    68,    69,    70,    71,    72,    73,    74,    75,     0,
-      31,    32,    34,    30,     0,    90,     0,    90,    89,    28,
-      76,    33,    35,    36,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    38,     0,     0,    37,    39,    40,    41,
-      42,    90,    50,    51,    52,    53,     0,    90,    48,    44,
-       0,     0,     0,    43,    47,    45,    46,    54,    55,    56,
-      49,     0,     0
+      25,    26,    18,    85,    27,     0,    89,    29,    87,    86,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,    68,    69,    70,    71,    72,    73,    74,     0,
+      31,    32,    34,    30,     0,    89,     0,    89,    88,    28,
+      75,    33,    35,    36,    76,    77,    78,    79,    80,    81,
+      82,    83,    84,    38,     0,    39,    37,     0,    41,    42,
+      43,    44,    45,    40,     0,     0,     0,    89,    47,    48,
+      49,    54,     0,    89,    50,    46,    53,    51,    52,    55,
+       0,     0
 };
 
 static const short yydefgoto[] =
 {
        1,     7,    14,    25,    11,    12,     8,    22,    30,    31,
       19,    26,    33,    40,    46,    48,    69,    70,    71,    77,
-      82,   106,   115,   107,   108,    72,    79,    41,    45,    49,
-       2
+      82,    97,   103,   107,   112,   117,   113,    72,    79,    41,
+      45,    49,     2
 };
 
 static const short yypact[] =
 {
-  -32768,     2,-32768,    27,    28,    28,-32768,-32768,-32768,-32768,
-  -32768,   -36,    -1,    -8,    -9,    32,-32768,    28,    33,     4,
-  -32768,-32768,     1,   -36,-32768,-32768,     5,-32768,-32768,   -36,
-  -32768,     6,    33,     7,-32768,    28,-32768,   -17,-32768,-32768,
-  -32768,-32768,   -36,-32768,-32768,    41,    53,-32768,-32768,     8,
+  -32768,     2,-32768,    12,    23,    23,-32768,-32768,-32768,-32768,
+  -32768,   -12,    -1,    -9,   -13,    29,-32768,    23,    31,     4,
+  -32768,-32768,     1,   -12,-32768,-32768,    -7,-32768,-32768,   -12,
+  -32768,     5,    31,     7,-32768,    23,-32768,   -30,-32768,-32768,
+  -32768,-32768,   -12,-32768,-32768,    33,    53,-32768,-32768,     6,
   -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,     9,
-      10,-32768,-32768,-32768,    41,-32768,    53,-32768,-32768,   -10,
+  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,     8,
+       9,-32768,-32768,-32768,    33,-32768,    53,-32768,-32768,   -10,
   -32768,-32768,    -6,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-  -32768,-32768,-32768,-32768,    47,     0,-32768,-32768,-32768,-32768,
-  -32768,    13,    12,    14,-32768,    15,    11,    16,-32768,-32768,
-      52,    80,    81,-32768,    13,-32768,-32768,-32768,-32768,-32768,
-  -32768,    85,-32768
+  -32768,-32768,-32768,-32768,    45,-32768,-32768,     0,    11,    13,
+  -32768,    14,-32768,-32768,    47,    50,    51,     0,-32768,-32768,
+  -32768,-32768,    18,    16,-32768,-32768,     0,-32768,-32768,-32768,
+      83,-32768
 };
 
 static const short yypgoto[] =
 {
-  -32768,-32768,-32768,    54,    -2,    83,-32768,-32768,-32768,-32768,
-  -32768,-32768,-32768,-32768,-32768,    17,-32768,-32768,    18,-32768,
-  -32768,-32768,-32768,-32768,   -25,-32768,-32768,-32768,-32768,-32768,
-     -14
+  -32768,-32768,-32768,    52,    -2,    80,-32768,-32768,-32768,-32768,
+  -32768,-32768,-32768,-32768,-32768,    15,-32768,-32768,    10,-32768,
+  -32768,-32768,  -100,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+  -32768,-32768,   -14
 };
 
 
-#define	YYLAST		94
+#define	YYLAST		99
 
 
 static const short yytable[] =
 {
-      20,    93,   121,    97,    98,    99,   100,    15,    10,    16,
-       3,     4,     5,    34,    37,    23,   102,   103,   104,   105,
+      20,    93,   120,    98,    99,   100,   101,   111,    10,    16,
+       3,     4,     5,    34,    37,    23,   119,    43,    44,     9,
       29,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      43,    44,    73,    42,     9,    10,    17,    94,    18,    21,
-      24,   101,     6,    17,    95,    27,    28,    38,    47,    39,
-      96,    32,    35,   113,    74,   117,    76,   110,    75,   111,
-     112,    80,   114,    83,    50,    51,    52,    53,    54,    55,
+      10,    15,    73,    42,    18,    17,    21,    94,    24,    32,
+      47,   102,     6,    17,    95,    27,    28,    38,    96,    39,
+     108,    35,    74,   109,   110,    76,   104,    75,   105,   106,
+     115,    80,   116,    83,    50,    51,    52,    53,    54,    55,
       56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
-      66,    67,    68,   118,   119,   122,    36,   109,    13,   120,
-       0,    78,     0,   116,    81
+      66,    67,    68,   121,    36,    13,    81,     0,     0,    78,
+       0,     0,     0,   114,     0,     0,     0,     0,     0,   118
 };
 
 static const short yycheck[] =
 {
-      14,     7,     0,     3,     4,     5,     6,    43,     7,    10,
-       8,     9,    10,    27,     7,    17,     3,     4,     5,     6,
+      14,     7,     0,     3,     4,     5,     6,   107,     7,    10,
+       8,     9,    10,    27,     7,    17,   116,    47,    48,     7,
       22,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      47,    48,    46,    35,     7,     7,    44,    43,    47,     7,
-       7,    41,    40,    44,    50,    41,    45,    40,     7,    42,
-       3,    46,    46,    42,    46,     3,    46,    45,    49,    45,
-      45,    75,    46,    77,    11,    12,    13,    14,    15,    16,
+       7,    43,    46,    35,    47,    44,     7,    43,     7,    46,
+       7,    41,    40,    44,    50,    41,    45,    40,     3,    42,
+       3,    46,    46,     3,     3,    46,    45,    49,    45,    45,
+      42,    75,    46,    77,    11,    12,    13,    14,    15,    16,
       17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-      27,    28,    29,     3,     3,     0,    32,   101,     5,   114,
-      -1,    74,    -1,   107,    76
+      27,    28,    29,     0,    32,     5,    76,    -1,    -1,    74,
+      -1,    -1,    -1,   107,    -1,    -1,    -1,    -1,    -1,   113
 };
 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
 #line 3 "/usr/share/bison/bison.simple"
@@ -1044,7 +1042,7 @@ yyreduce:
   switch (yyn) {
 
 case 5:
-#line 102 "dcParser.yxx"
+#line 105 "dcParser.yxx"
 {
   current_class = new DCClass(yyvsp[0].str);
   if (!dc_file->add_class(current_class)) {
@@ -1058,7 +1056,7 @@ case 5:
 }
     break;
 case 7:
-#line 118 "dcParser.yxx"
+#line 121 "dcParser.yxx"
 {
   DCFile::ClassesByName::const_iterator ni;
   ni = dc_file->_classes_by_name.find(yyvsp[0].str);
@@ -1071,49 +1069,49 @@ case 7:
 }
     break;
 case 9:
-#line 133 "dcParser.yxx"
+#line 136 "dcParser.yxx"
 {
   yyval.str = yyvsp[-2].str + string("/") + yyvsp[0].str;
 }
     break;
 case 11:
-#line 141 "dcParser.yxx"
+#line 144 "dcParser.yxx"
 {
   yyval.str = yyvsp[-2].str + string(".") + yyvsp[0].str;
 }
     break;
 case 12:
-#line 148 "dcParser.yxx"
+#line 151 "dcParser.yxx"
 {
   dc_file->add_import_module(yyvsp[0].str);
 }
     break;
 case 13:
-#line 152 "dcParser.yxx"
+#line 155 "dcParser.yxx"
 {
   dc_file->add_import_module(yyvsp[-1].str);
 }
     break;
 case 16:
-#line 161 "dcParser.yxx"
+#line 164 "dcParser.yxx"
 {
   dc_file->add_import_symbol("*");
 }
     break;
 case 17:
-#line 168 "dcParser.yxx"
+#line 171 "dcParser.yxx"
 {
   dc_file->add_import_symbol(yyvsp[0].str);
 }
     break;
 case 18:
-#line 172 "dcParser.yxx"
+#line 175 "dcParser.yxx"
 {
   dc_file->add_import_symbol(yyvsp[0].str);
 }
     break;
 case 21:
-#line 184 "dcParser.yxx"
+#line 187 "dcParser.yxx"
 {
   if (yyvsp[0].u.dclass != (DCClass *)NULL) {
     current_class->add_parent(yyvsp[0].u.dclass);
@@ -1121,7 +1119,7 @@ case 21:
 }
     break;
 case 22:
-#line 190 "dcParser.yxx"
+#line 193 "dcParser.yxx"
 {
   if (yyvsp[0].u.dclass != (DCClass *)NULL) {
     current_class->add_parent(yyvsp[0].u.dclass);
@@ -1129,7 +1127,7 @@ case 22:
 }
     break;
 case 27:
-#line 206 "dcParser.yxx"
+#line 209 "dcParser.yxx"
 {
   current_atomic = new DCAtomicField(yyvsp[-1].str);
   if (!current_class->add_field(current_atomic)) {
@@ -1138,7 +1136,7 @@ case 27:
 }
     break;
 case 29:
-#line 217 "dcParser.yxx"
+#line 220 "dcParser.yxx"
 {
   DCField *field = current_class->get_field_by_name(yyvsp[0].str);
   yyval.u.atomic = (DCAtomicField *)NULL;
@@ -1153,307 +1151,281 @@ case 29:
 }
     break;
 case 34:
-#line 243 "dcParser.yxx"
+#line 246 "dcParser.yxx"
 {
-  atomic_element = DCAtomicField::ElementType();
-  atomic_element._type = yyvsp[0].u.subatomic;
+  atomic_element = DCAtomicField::ElementType(new DCSimpleType(yyvsp[0].u.subatomic));
 }
     break;
 case 35:
-#line 248 "dcParser.yxx"
+#line 250 "dcParser.yxx"
 {
   current_atomic->_elements.push_back(atomic_element);
 }
     break;
 case 37:
-#line 256 "dcParser.yxx"
+#line 258 "dcParser.yxx"
 {
-  atomic_element._divisor = yyvsp[0].u.integer;
+  if (atomic_element._type->as_simple_type() == NULL) {
+    yyerror("Invalid divisor on complex type");
+
+  } else {
+    atomic_element._type->as_simple_type()->set_divisor(yyvsp[0].u.integer);
+  }
 }
     break;
 case 38:
-#line 260 "dcParser.yxx"
+#line 267 "dcParser.yxx"
 {
   atomic_element._name = yyvsp[0].str;
 }
     break;
 case 39:
-#line 264 "dcParser.yxx"
+#line 271 "dcParser.yxx"
 {
-  if (!atomic_element.set_default_value(yyvsp[0].u.integer)) {
-    yyerror("Invalid default value: " + yyvsp[0].str);
-  }
+  default_value_packer.begin(atomic_element._type);
 }
     break;
 case 40:
-#line 270 "dcParser.yxx"
+#line 275 "dcParser.yxx"
 {
-  if (!atomic_element.set_default_value(yyvsp[0].u.real)) {
-    yyerror("Invalid default value: " + yyvsp[0].str);
+  if (!default_value_packer.end()) {
+    yyerror("Invalid default value for type");
+
+  } else {
+    atomic_element.set_default_value(default_value_packer.get_string());
   }
 }
     break;
 case 41:
-#line 276 "dcParser.yxx"
+#line 287 "dcParser.yxx"
 {
-  if (!atomic_element.set_default_value(yyvsp[0].str)) {
-    yyerror("Invalid default value: \"" + yyvsp[0].str + "\"");
-  }
+  default_value_packer.pack_value(yyvsp[0].u.integer);
 }
     break;
 case 42:
-#line 282 "dcParser.yxx"
+#line 291 "dcParser.yxx"
 {
-  if (!atomic_element.set_default_value_literal(yyvsp[0].str)) {
-    yyerror("Invalid default hex string value");
-  }
+  default_value_packer.pack_value(yyvsp[0].u.real);
 }
     break;
 case 43:
-#line 288 "dcParser.yxx"
+#line 295 "dcParser.yxx"
 {
-  if (!atomic_element.end_array()) {
-    yyerror("Array default value inappropriate");
-  } else {
-    atomic_element._has_default_value = true;
-  }
+  default_value_packer.pack_value(yyvsp[0].str);
 }
     break;
-case 50:
-#line 314 "dcParser.yxx"
+case 44:
+#line 299 "dcParser.yxx"
 {
-  if (!atomic_element.add_default_value(yyvsp[0].u.integer)) {
-    yyerror("Invalid default value: " + yyvsp[0].str);
-  }
-}
-    break;
-case 51:
-#line 320 "dcParser.yxx"
-{
-  if (!atomic_element.add_default_value(yyvsp[0].u.real)) {
-    yyerror("Invalid default value: " + yyvsp[0].str);
-  }
+  default_value_packer.pack_literal_value(yyvsp[0].str);
 }
     break;
-case 52:
-#line 326 "dcParser.yxx"
+case 45:
+#line 303 "dcParser.yxx"
 {
-  if (!atomic_element.add_default_value(yyvsp[0].str)) {
-    yyerror("Invalid default value: " + yyvsp[0].str);
-  }
+  default_value_packer.push();
 }
     break;
-case 53:
-#line 332 "dcParser.yxx"
+case 46:
+#line 307 "dcParser.yxx"
 {
-  if (!atomic_element.add_default_value_literal(yyvsp[0].str)) {
-    yyerror("Invalid hex literal in default array");
-  }
+  default_value_packer.pop();
 }
     break;
-case 54:
-#line 338 "dcParser.yxx"
+case 47:
+#line 311 "dcParser.yxx"
 {
   for (int i = 0; i < yyvsp[0].u.integer; i++) {
-    if (!atomic_element.add_default_value(yyvsp[-2].u.integer)) {
-      yyerror("Invalid default value: " + yyvsp[-2].str);
-      break;
-    }
+    default_value_packer.pack_value(yyvsp[-2].u.integer);
   }
 }
     break;
-case 55:
-#line 347 "dcParser.yxx"
+case 48:
+#line 317 "dcParser.yxx"
 {
   for (int i = 0; i < yyvsp[0].u.integer; i++) {
-    if (!atomic_element.add_default_value(yyvsp[-2].u.real)) {
-      yyerror("Invalid default value: " + yyvsp[-2].str);
-      break;
-    }
+    default_value_packer.pack_value(yyvsp[-2].u.real);
   }
 }
     break;
-case 56:
-#line 356 "dcParser.yxx"
+case 49:
+#line 323 "dcParser.yxx"
 {
   for (int i = 0; i < yyvsp[0].u.integer; i++) {
-    if (!atomic_element.add_default_value_literal(yyvsp[-2].str)) {
-      yyerror("Invalid hex literal in default array");
-      break;
-    }
+    default_value_packer.pack_literal_value(yyvsp[-2].str);
   }
 }
     break;
-case 57:
-#line 368 "dcParser.yxx"
+case 56:
+#line 347 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_int8;
 }
     break;
-case 58:
-#line 372 "dcParser.yxx"
+case 57:
+#line 351 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_int16;
 }
     break;
-case 59:
-#line 376 "dcParser.yxx"
+case 58:
+#line 355 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_int32;
 }
     break;
-case 60:
-#line 380 "dcParser.yxx"
+case 59:
+#line 359 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_int64;
 }
     break;
-case 61:
-#line 384 "dcParser.yxx"
+case 60:
+#line 363 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_uint8;
 }
     break;
-case 62:
-#line 388 "dcParser.yxx"
+case 61:
+#line 367 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_uint16;
 }
     break;
-case 63:
-#line 392 "dcParser.yxx"
+case 62:
+#line 371 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_uint32;
 }
     break;
-case 64:
-#line 396 "dcParser.yxx"
+case 63:
+#line 375 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_uint64;
 }
     break;
-case 65:
-#line 400 "dcParser.yxx"
+case 64:
+#line 379 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_float64;
 }
     break;
-case 66:
-#line 404 "dcParser.yxx"
+case 65:
+#line 383 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_string;
 }
     break;
-case 67:
-#line 408 "dcParser.yxx"
+case 66:
+#line 387 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_blob;
 }
     break;
-case 68:
-#line 412 "dcParser.yxx"
+case 67:
+#line 391 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_blob32;
 }
     break;
-case 69:
-#line 416 "dcParser.yxx"
+case 68:
+#line 395 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_int8array;
 }
     break;
-case 70:
-#line 420 "dcParser.yxx"
+case 69:
+#line 399 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_int16array;
 }
     break;
-case 71:
-#line 424 "dcParser.yxx"
+case 70:
+#line 403 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_int32array;
 }
     break;
-case 72:
-#line 428 "dcParser.yxx"
+case 71:
+#line 407 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_uint8array;
 }
     break;
-case 73:
-#line 432 "dcParser.yxx"
+case 72:
+#line 411 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_uint16array;
 }
     break;
-case 74:
-#line 436 "dcParser.yxx"
+case 73:
+#line 415 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_uint32array;
 }
     break;
-case 75:
-#line 440 "dcParser.yxx"
+case 74:
+#line 419 "dcParser.yxx"
 {
   yyval.u.subatomic = ST_uint32uint8array;
 }
     break;
-case 77:
-#line 448 "dcParser.yxx"
+case 76:
+#line 427 "dcParser.yxx"
 {
   current_atomic->_flags |= DCAtomicField::F_required;
 }
     break;
-case 78:
-#line 452 "dcParser.yxx"
+case 77:
+#line 431 "dcParser.yxx"
 {
   current_atomic->_flags |= DCAtomicField::F_broadcast;
 }
     break;
-case 79:
-#line 456 "dcParser.yxx"
+case 78:
+#line 435 "dcParser.yxx"
 {
   current_atomic->_flags |= DCAtomicField::F_p2p;
 }
     break;
-case 80:
-#line 460 "dcParser.yxx"
+case 79:
+#line 439 "dcParser.yxx"
 {
   current_atomic->_flags |= DCAtomicField::F_ram;
 }
     break;
-case 81:
-#line 464 "dcParser.yxx"
+case 80:
+#line 443 "dcParser.yxx"
 {
   current_atomic->_flags |= DCAtomicField::F_db;
 }
     break;
-case 82:
-#line 468 "dcParser.yxx"
+case 81:
+#line 447 "dcParser.yxx"
 {
   current_atomic->_flags |= DCAtomicField::F_clsend;
 }
     break;
-case 83:
-#line 472 "dcParser.yxx"
+case 82:
+#line 451 "dcParser.yxx"
 {
   current_atomic->_flags |= DCAtomicField::F_clrecv;
 }
     break;
-case 84:
-#line 476 "dcParser.yxx"
+case 83:
+#line 455 "dcParser.yxx"
 {
   current_atomic->_flags |= DCAtomicField::F_ownsend;
 }
     break;
-case 85:
-#line 480 "dcParser.yxx"
+case 84:
+#line 459 "dcParser.yxx"
 {
   current_atomic->_flags |= DCAtomicField::F_airecv;
 }
     break;
-case 86:
-#line 487 "dcParser.yxx"
+case 85:
+#line 466 "dcParser.yxx"
 {
   current_molecular = new DCMolecularField(yyvsp[-1].str);
   if (!current_class->add_field(current_molecular)) {
@@ -1461,16 +1433,16 @@ case 86:
   }
 }
     break;
-case 88:
-#line 498 "dcParser.yxx"
+case 87:
+#line 477 "dcParser.yxx"
 {
   if (yyvsp[0].u.atomic != (DCAtomicField *)NULL) {
     current_molecular->_fields.push_back(yyvsp[0].u.atomic);
   }
 }
     break;
-case 89:
-#line 504 "dcParser.yxx"
+case 88:
+#line 483 "dcParser.yxx"
 {
   if (yyvsp[0].u.atomic != (DCAtomicField *)NULL) {
     current_molecular->_fields.push_back(yyvsp[0].u.atomic);
@@ -1715,4 +1687,4 @@ yyreturn:
 #endif
   return yyresult;
 }
-#line 518 "dcParser.yxx"
+#line 497 "dcParser.yxx"