File: lpcset.h

package info (click to toggle)
lua-lpeg 1.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 348 kB
  • sloc: ansic: 3,057; makefile: 53
file content (30 lines) | stat: -rw-r--r-- 736 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#if !defined(lpset_h)
#define lpset_h

#include "lpcset.h"
#include "lpcode.h"
#include "lptree.h"


/*
** Extra information for the result of 'charsettype'.  When result is
** IChar, 'offset' is the character.  When result is ISet, 'cs' is the
** supporting bit array (with offset included), 'offset' is the offset
** (in bytes), 'size' is the size (in bytes), and 'delt' is the default
** value for bytes outside the set.
*/
typedef struct {
  const byte *cs;
  int offset;
  int size;
  int deflt;
} charsetinfo;


int tocharset (TTree *tree, Charset *cs);
Opcode charsettype (const byte *cs, charsetinfo *info);
byte getbytefromcharset (const charsetinfo *info, int index);
void tree2cset (TTree *tree, charsetinfo *info);

#endif