* parser-defs.h (struct exp_descriptor): New definition, containing
[deliverable/binutils-gdb.git] / gdb / parse.c
index 6166cf633b989814c4612a9fd0d4745446165a0e..da39866f759ea3f85379f948699906f77a7affdd 100644 (file)
 #include "gdb_assert.h"
 #include "block.h"
 
+/* Standard set of definitions for printing, dumping, prefixifying,
+ * and evaluating expressions.  */
+
+const struct exp_descriptor exp_descriptor_standard = 
+  {
+    print_subexp_standard,
+    operator_length_standard,
+    op_name_standard,
+    dump_subexp_body_standard,
+    evaluate_subexp_standard
+  };
 \f
 /* Symbols which architectures can redefine.  */
 
@@ -809,13 +820,23 @@ length_of_subexp (struct expression *expr, int endpos)
 
 void
 operator_length (struct expression *expr, int endpos, int *oplenp, int *argsp)
+{
+  expr->language_defn->la_exp_desc->operator_length (expr, endpos,
+                                                    oplenp, argsp);
+}
+
+/* Default value for operator_length in exp_descriptor vectors.  */
+
+void
+operator_length_standard (struct expression *expr, int endpos,
+                         int *oplenp, int *argsp)
 {
   int oplen = 1;
   int args = 0;
   int i;
 
   if (endpos < 1)
-    error ("?error in operator_length");
+    error ("?error in operator_length_standard");
 
   i = (int) expr->elts[endpos - 1].opcode;
 
This page took 0.023354 seconds and 4 git commands to generate.