aboutsummaryrefslogtreecommitdiff
path: root/lptypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'lptypes.h')
-rw-r--r--lptypes.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/lptypes.h b/lptypes.h
index 503f1f0..3f1041e 100644
--- a/lptypes.h
+++ b/lptypes.h
@@ -1,7 +1,7 @@
1/* 1/*
2** $Id: lptypes.h,v 1.8 2013/04/12 16:26:38 roberto Exp $ 2** $Id: lptypes.h,v 1.11 2015/03/04 16:38:00 roberto Exp $
3** LPeg - PEG pattern matching for Lua 3** LPeg - PEG pattern matching for Lua
4** Copyright 2007, Lua.org & PUC-Rio (see 'lpeg.html' for license) 4** Copyright 2007-2014, Lua.org & PUC-Rio (see 'lpeg.html' for license)
5** written by Roberto Ierusalimschy 5** written by Roberto Ierusalimschy
6*/ 6*/
7 7
@@ -19,7 +19,7 @@
19#include "lua.h" 19#include "lua.h"
20 20
21 21
22#define VERSION "0.12" 22#define VERSION "0.12.2"
23 23
24 24
25#define PATTERN_T "lpeg-pattern" 25#define PATTERN_T "lpeg-pattern"
@@ -29,7 +29,7 @@
29/* 29/*
30** compatibility with Lua 5.2 30** compatibility with Lua 5.2
31*/ 31*/
32#if (LUA_VERSION_NUM == 502) 32#if (LUA_VERSION_NUM >= 502)
33 33
34#undef lua_equal 34#undef lua_equal
35#define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ) 35#define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ)
@@ -56,7 +56,9 @@
56 56
57 57
58/* maximum number of rules in a grammar */ 58/* maximum number of rules in a grammar */
59#define MAXRULES 200 59#if !defined(MAXRULES)
60#define MAXRULES 1000
61#endif
60 62
61 63
62 64
@@ -107,6 +109,7 @@ typedef struct Charset {
107/* set 'b' bit in charset 'cs' */ 109/* set 'b' bit in charset 'cs' */
108#define setchar(cs,b) ((cs)[(b) >> 3] |= (1 << ((b) & 7))) 110#define setchar(cs,b) ((cs)[(b) >> 3] |= (1 << ((b) & 7)))
109 111
112
110/* labeled failure begin */ 113/* labeled failure begin */
111typedef int Labelset; 114typedef int Labelset;
112 115