summaryrefslogtreecommitdiff
path: root/sys/src/libregexp/regimpl.h
diff options
context:
space:
mode:
authorspew <devnull@localhost>2017-04-30 15:08:36 -0500
committerspew <devnull@localhost>2017-04-30 15:08:36 -0500
commitff8ae67b705129e20b4177aa4a0c85dab343e5bb (patch)
tree85fe52850271273a9ee6af85537f970808ac9655 /sys/src/libregexp/regimpl.h
parentc00c60d327168c25e56077c8310cf2380833e9be (diff)
libregexp: miscellaneous little cleanups
Diffstat (limited to 'sys/src/libregexp/regimpl.h')
-rw-r--r--sys/src/libregexp/regimpl.h26
1 files changed, 8 insertions, 18 deletions
diff --git a/sys/src/libregexp/regimpl.h b/sys/src/libregexp/regimpl.h
index 8785a27f0..8c8ac03a7 100644
--- a/sys/src/libregexp/regimpl.h
+++ b/sys/src/libregexp/regimpl.h
@@ -23,7 +23,7 @@ enum {
TSTAR,
TSUB,
- NSUBEXPM = 32
+ NSUBEXPM = 32,
};
typedef struct Parselex Parselex;
@@ -31,30 +31,22 @@ typedef struct Renode Renode;
struct Parselex {
/* Parse */
- Renode *next;
- Renode *nodes;
- int sub;
- int instrs;
+ Renode *next, *nodes;
+ int sub, instrs;
jmp_buf exitenv;
/* Lex */
void (*getnextr)(Parselex*);
- char *rawexp;
- char *orig;
+ char *rawexp, *orig;
Rune rune;
- Rune peek;
- int peeklex;
- int done;
- int literal;
+ int peek, peeklex, done, literal, nc;
Rune cpairs[400+2];
- int nc;
};
struct Renode {
int op;
Renode *left;
Rune r;
- union
- {
+ union {
Rune r1;
int sub;
Renode *right;
@@ -73,13 +65,11 @@ struct Reinst {
char op;
int gen;
Reinst *a;
- union
- {
+ union {
Rune r;
int sub;
};
- union
- {
+ union {
Rune r1;
Reinst *b;
};