summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/luapeg/lpeg.h
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-03-21 09:16:59 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-03-21 09:16:59 +0000
commit388463b9fa865c3b2311508c41647b0f3c532031 (patch)
tree1cdfbf5552d0783ecbcc52017e49567e5042af33 /Build/source/texk/web2c/luatexdir/luapeg/lpeg.h
parentabd0b00a4e8c1ac6f5b20c7474d70ef579129991 (diff)
Import MetaPost 1.800 and LuaTeX beta-0.75.0 from LuaTeX repository r4604
git-svn-id: svn://tug.org/texlive/trunk@29453 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luapeg/lpeg.h')
-rw-r--r--Build/source/texk/web2c/luatexdir/luapeg/lpeg.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luapeg/lpeg.h b/Build/source/texk/web2c/luatexdir/luapeg/lpeg.h
new file mode 100644
index 00000000000..13d7acefd39
--- /dev/null
+++ b/Build/source/texk/web2c/luatexdir/luapeg/lpeg.h
@@ -0,0 +1,38 @@
+/*
+** $Id: lpeg.h,v 1.1 2009/12/23 16:15:36 roberto Exp $
+** LPeg - PEG pattern matching for Lua
+** Copyright 2009, Lua.org & PUC-Rio (see 'lpeg.html' for license)
+** written by Roberto Ierusalimschy
+*/
+
+#ifndef lpeg_h
+#define lpeg_h
+
+#include "lua.h"
+
+
+#define KEYNEWPATT "lpeg.newpf"
+
+
+/*
+** type of extension functions that define new "patterns" for LPEG
+** It should return the new current position or NULL if match fails
+*/
+typedef const char *(*PattFunc) (const char *s, /* current position */
+ const char *e, /* string end */
+ const char *o, /* string start */
+ const void *ud); /* user data */
+
+/*
+** function to create new patterns based on 'PattFunc' functions.
+** This function is available at *registry[KEYNEWPATT]. (Notice
+** the extra indirection; the userdata at the registry points to
+** a variable that points to the function. In ANSI C a void* cannot
+** point to a function.)
+*/
+typedef void (*Newpf) (lua_State *L,
+ PattFunc f, /* pattern */
+ const void *ud, /* (user) data to be passed to 'f' */
+ size_t l); /* size of data to be passed to 'f' */
+
+#endif