aboutsummaryrefslogtreecommitdiff
path: root/pkg/utilities/nttools/texpand/lexoper.h
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/utilities/nttools/texpand/lexoper.h
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'pkg/utilities/nttools/texpand/lexoper.h')
-rw-r--r--pkg/utilities/nttools/texpand/lexoper.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkg/utilities/nttools/texpand/lexoper.h b/pkg/utilities/nttools/texpand/lexoper.h
new file mode 100644
index 00000000..a4011143
--- /dev/null
+++ b/pkg/utilities/nttools/texpand/lexoper.h
@@ -0,0 +1,29 @@
+
+# LEXOPER.H -- Operators and identifiers used by the lexical analyzer
+
+# The value of the operator type is also its priority
+
+define ENDOPR 1
+define SEPOPR 2
+define IMPOPR 3
+define OROPR 4
+define ANDOPR 5
+define EQOPR 6
+define IDOPR 7
+
+# Pseudo-identifiers placed on the id stack
+
+define NAME 1 # Any identifier
+define NO_IDENT 0 # No identifier on stack
+define PHRASE -1 # idents joined by equals or ands
+define CLAUSE -2 # idents joined by equals, ands, or ors
+
+# Rule base data structure
+
+define RB_LENGTH (SZ_LINE / SZ_INT32 + 5)
+
+define RB_FILE Memi[$1]
+define RB_NLINE Memi[$1+1]
+define RB_INDEX Memi[$1+2]
+define RB_LINE Memc[P2C($1+3)]
+define RB_CHARPTR (P2C($1+3) + RB_INDEX($1) - 1)