~ubuntu-branches/ubuntu/intrepid/enigma/intrepid

« back to all changes in this revision

Viewing changes to lib-src/lua/lparser.h

  • Committer: Bazaar Package Importer
  • Author(s): Erich Schubert
  • Date: 2005-08-28 15:30:09 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050828153009-sky64kb6tcq37xt5
Tags: 0.92.1-1
* New upstream subversion checkout
* Remove menu.s3m, which we are allowed to distributed but not to modify
  also copyright notice is confusing... (Closes: #321669)
* Rebuild with new libzipios (Closes: #325405)
  I hope this works without a versioned build-dependency
* Added "enigma replaces enigma-data" for upgrades (Closes: #308558)
* Added notes about the fonts copyright.
* updated to policy 3.6.2.1 (no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
** $Id: lparser.h,v 1.1 2003/02/09 21:30:32 dheck Exp $
3
 
** LL(1) Parser and code generator for Lua
4
 
** See Copyright Notice in lua.h
5
 
*/
6
 
 
7
 
#ifndef lparser_h
8
 
#define lparser_h
9
 
 
10
 
#include "lobject.h"
11
 
#include "lzio.h"
12
 
 
13
 
 
14
 
/*
15
 
** Expression descriptor
16
 
*/
17
 
 
18
 
typedef enum {
19
 
  VGLOBAL,
20
 
  VLOCAL,
21
 
  VINDEXED,
22
 
  VEXP
23
 
} expkind;
24
 
 
25
 
typedef struct expdesc {
26
 
  expkind k;
27
 
  union {
28
 
    int index;  /* VGLOBAL: `kstr' index of global name; VLOCAL: stack index */
29
 
    struct {
30
 
      int t;  /* patch list of `exit when true' */
31
 
      int f;  /* patch list of `exit when false' */
32
 
    } l;
33
 
  } u;
34
 
} expdesc;
35
 
 
36
 
 
37
 
 
38
 
/* state needed to generate code for a given function */
39
 
typedef struct FuncState {
40
 
  Proto *f;  /* current function header */
41
 
  struct FuncState *prev;  /* enclosing function */
42
 
  struct LexState *ls;  /* lexical state */
43
 
  struct lua_State *L;  /* copy of the Lua state */
44
 
  int pc;  /* next position to code */
45
 
  int lasttarget;   /* `pc' of last `jump target' */
46
 
  int jlt;  /* list of jumps to `lasttarget' */
47
 
  short stacklevel;  /* number of values on activation register */
48
 
  short nactloc;  /* number of active local variables */
49
 
  short nupvalues;  /* number of upvalues */
50
 
  int lastline;  /* line where last `lineinfo' was generated */
51
 
  struct Breaklabel *bl;  /* chain of breakable blocks */
52
 
  expdesc upvalues[MAXUPVALUES];  /* upvalues */
53
 
  int actloc[MAXLOCALS];  /* local-variable stack (indices to locvars) */
54
 
} FuncState;
55
 
 
56
 
 
57
 
Proto *luaY_parser (lua_State *L, ZIO *z);
58
 
 
59
 
 
60
 
#endif