tttm

git clone https://orangeshoelaces.net/git/tttm.git

0b8ad995e704b319e5e8a2cfc2399ba7e70b9b4c

Author: Vasily Kolobkov on 06/07/2016

Committer: Vasily Kolobkov on 06/07/2016

Fix error order

A TE_PARSE error is the only benign kind of error when parser will try
alternative parses. Others make it stop.

Stats

errors.c | 2 +-
errors.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/errors.c b/errors.c
index 35b9c59..27e56f9 100644
--- a/errors.c
+++ b/errors.c
@@ -1,10 +1,10 @@
 #include "errors.h"
 
 const char *errmsgs[] = {
+	[TE_PARSE]      = "input not recognized",
 	[TE_EOF]        = "unexpected eof",
 	[TE_TIMEOUT]    = "source read timed out",
 	[TE_BBOFLOW]    = "source back buffer overflown",
-	[TE_PARSE]      = "input not recognized",
 	[TE_BUFOFLOW]   = "response buffer overflown",
 	[TE_CACHEOFLOW] = "cache overflown",
 	[TE_PTOFLOW]    = "cannot fit parse tree within supplied space",
diff --git a/errors.h b/errors.h
index 3448016..91c85d8 100644
--- a/errors.h
+++ b/errors.h
@@ -1,11 +1,11 @@
 enum {
 	TE_OK = 0,
 
+	TE_PARSE,
 	TE_EOF,
 	TE_TIMEOUT,
 	TE_BBOFLOW,
 
-	TE_PARSE,
 	TE_BUFOFLOW,
 	TE_CACHEOFLOW,
 	TE_PTOFLOW,