file reorg, pathnames.h, paths.h
[unix-history] / usr / src / old / dbx / operators.c
index 7d48f25..5af5166 100644 (file)
@@ -1,6 +1,14 @@
-/* Copyright (c) 1982 Regents of the University of California */
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
 
 
-static char sccsid[] = "@(#)operators.c 1.2 %G%";
+#ifndef lint
+static char sccsid[] = "@(#)operators.c        5.1 (Berkeley) %G%";
+#endif not lint
+
+static char rcsid[] = "$Header: operators.c,v 1.5 84/12/26 10:41:01 linton Exp $";
 
 /*
  * Tree node classes.
 
 /*
  * Tree node classes.
@@ -18,7 +26,7 @@ typedef struct {
 
 typedef enum {
     O_NOP,
 
 typedef enum {
     O_NOP,
-    O_NAME, O_SYM, O_LCON, O_FCON, O_SCON,
+    O_NAME, O_SYM, O_LCON, O_CCON, O_FCON, O_SCON,
     O_RVAL, O_INDEX, O_INDIR, O_DOT,
     O_COMMA,
 
     O_RVAL, O_INDEX, O_INDIR, O_DOT,
     O_COMMA,
 
@@ -36,6 +44,7 @@ typedef enum {
     O_CATCH,           /* catch a signal before program does */
     O_CHFILE,          /* change (or print) the current source file */
     O_CONT,            /* continue execution */
     O_CATCH,           /* catch a signal before program does */
     O_CHFILE,          /* change (or print) the current source file */
     O_CONT,            /* continue execution */
+    O_DEBUG,           /* invoke a dbx internal debugging routine */
     O_DELETE,          /* remove a trace/stop */
     O_DUMP,            /* dump out variables */
     O_EDIT,            /* edit a file (or function) */
     O_DELETE,          /* remove a trace/stop */
     O_DUMP,            /* dump out variables */
     O_EDIT,            /* edit a file (or function) */
@@ -69,13 +78,24 @@ typedef enum {
     O_PRINTIFCHANGED,  /* print the value of the argument if it has changed */
     O_PRINTRTN,                /* print out the routine and value that just returned */
     O_PRINTSRCPOS,     /* print out the current source position */
     O_PRINTIFCHANGED,  /* print the value of the argument if it has changed */
     O_PRINTRTN,                /* print out the routine and value that just returned */
     O_PRINTSRCPOS,     /* print out the current source position */
-    O_PROCRTN,         /* CALLPROC completed */
+    O_PROCRTN,         /* call completed */
     O_QLINE,           /* filename, line number */
     O_STOPIFCHANGED,   /* stop if the value of the argument has changed */
     O_STOPX,           /* stop execution */
     O_TRACEON,         /* begin tracing source line, variable, or all lines */
     O_TRACEOFF,                /* end tracing source line, variable, or all lines */
 
     O_QLINE,           /* filename, line number */
     O_STOPIFCHANGED,   /* stop if the value of the argument has changed */
     O_STOPX,           /* stop execution */
     O_TRACEON,         /* begin tracing source line, variable, or all lines */
     O_TRACEOFF,                /* end tracing source line, variable, or all lines */
 
+    O_TYPERENAME,      /* state the type of an expression */
+    O_RERUN,           /* re-run program with the same arguments as before */
+    O_RETURN,          /* continue execution until procedure returns */
+    O_UP,              /* move current function up the call stack */
+    O_DOWN,            /* move current function down the call stack */
+    O_CALLPROC,                /* call command */
+    O_SEARCH,          /* regular expression pattern search through source */
+    O_SET,             /* set a debugger variable */
+    O_UNSET,           /* unset a debugger variable */
+    O_UNALIAS,         /* remove an alias */
+
     O_LASTOP
 } Operator;
 
     O_LASTOP
 } Operator;
 
@@ -113,13 +133,14 @@ public Opinfo opinfo[] ={
 /* O_NAME */           -1,     LEAF,           0,
 /* O_SYM */            -1,     LEAF,           0,
 /* O_LCON */           -1,     LEAF,           0,
 /* O_NAME */           -1,     LEAF,           0,
 /* O_SYM */            -1,     LEAF,           0,
 /* O_LCON */           -1,     LEAF,           0,
+/* O_CCON */           -1,     LEAF,           0,
 /* O_FCON */           -1,     LEAF,           0,
 /* O_SCON */           -1,     LEAF,           0,
 /* O_RVAL */           1,      UNARY,          0,
 /* O_FCON */           -1,     LEAF,           0,
 /* O_SCON */           -1,     LEAF,           0,
 /* O_RVAL */           1,      UNARY,          0,
-/* O_INDEX */          2,      BINARY,         0,
+/* O_INDEX */          2,      null,           0,
 /* O_INDIR */          1,      UNARY,          "^",
 /* O_DOT */            2,      null,           ".",
 /* O_INDIR */          1,      UNARY,          "^",
 /* O_DOT */            2,      null,           ".",
-/* O_COMMA */          2,      BINARY,         ",",
+/* O_COMMA */          2,      null,           ",",
 /* O_ITOF */           1,      UNARY|INTOP,    0,
 /* O_ADD */            2,      BINARY|INTOP,   "+",
 /* O_ADDF */           2,      BINARY|REALOP,  "+",
 /* O_ITOF */           1,      UNARY|INTOP,    0,
 /* O_ADD */            2,      BINARY|INTOP,   "+",
 /* O_ADDF */           2,      BINARY|REALOP,  "+",
@@ -148,13 +169,14 @@ public Opinfo opinfo[] ={
 /* O_NEF */            2,      BINARY|REALOP,  " <> ",
 
 /* O_ALIAS */          2,      null,           "alias",
 /* O_NEF */            2,      BINARY|REALOP,  " <> ",
 
 /* O_ALIAS */          2,      null,           "alias",
-/* O_ASSIGN */         2,      BINARY,         " := ",
+/* O_ASSIGN */         2,      null,           " := ",
 /* O_CALL */           2,      null,           "call",
 /* O_CATCH */          0,      null,           "catch",
 /* O_CHFILE */         0,      null,           "file",
 /* O_CONT */           0,      null,           "cont",
 /* O_CALL */           2,      null,           "call",
 /* O_CATCH */          0,      null,           "catch",
 /* O_CHFILE */         0,      null,           "file",
 /* O_CONT */           0,      null,           "cont",
-/* O_DELETE */         0,      null,           "delete",
-/* O_DUMP */           0,      null,           "dump",
+/* O_DEBUG */          0,      null,           "debug",
+/* O_DELETE */         1,      null,           "delete",
+/* O_DUMP */           1,      null,           "dump",
 /* O_EDIT */           0,      null,           "edit",
 /* O_FUNC */           1,      null,           "func",
 /* O_GRIPE */          0,      null,           "gripe",
 /* O_EDIT */           0,      null,           "edit",
 /* O_FUNC */           1,      null,           "func",
 /* O_GRIPE */          0,      null,           "gripe",
@@ -192,4 +214,14 @@ public Opinfo opinfo[] ={
 /* O_STOPX */          0,      null,           "stop",
 /* O_TRACEON */                1,      null,           "traceon",
 /* O_TRACEOFF */       1,      null,           "traceoff",
 /* O_STOPX */          0,      null,           "stop",
 /* O_TRACEON */                1,      null,           "traceon",
 /* O_TRACEOFF */       1,      null,           "traceoff",
+/* O_TYPERENAME */     2,      UNARY,          "type rename",
+/* O_RERUN */          0,      null,           "rerun",
+/* O_RETURN */         1,      null,           "return",
+/* O_UP */             1,      UNARY,          "up",
+/* O_DOWN */           1,      UNARY,          "down",
+/* O_CALLPROC */       2,      null,           "call",
+/* O_SEARCH */         2,      null,           "search",
+/* O_SET */            2,      null,           "set",
+/* O_UNSET */          1,      null,           "unset",
+/* O_UNALIAS */                1,      null,           "unalias",
 };
 };