~ubuntu-branches/ubuntu/precise/luatex/precise

« back to all changes in this revision

Viewing changes to src/texk/web2c/luatexdir/tokens.h

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2008-07-07 11:01:13 UTC
  • mfrom: (1.1.5 upstream) (4.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080707110113-1y7lam37zbbb7bbt
Tags: 0.28.0-1
* two new upstream releases, see the respective ANNOUCE files
* add luasocket license statement to debian/copyright
* activate the pdfluatex format
* prepare for latex based formats
  - add the ini files from TeX Live
  - add debian/formats file
  - adjust dh_installtex incantation
  the problem is that luatex dies when loading ukrhypmp.tex from 
  texlive-lang-cyrillic, but we don't want to conflict with it by now.
* policy 3.8.0, rename README.Debian-source to README.source, and add
  notes about quilt usage
* disable patch fix-pwd-inclusion (it was from svn)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: tokens.h 1013 2008-02-14 00:09:02Z oneiros $ */
2
 
 
 
1
/* tokens.h
 
2
   
 
3
   Copyright 2006-2008 Taco Hoekwater <taco@luatex.org>
 
4
 
 
5
   This file is part of LuaTeX.
 
6
 
 
7
   LuaTeX is free software; you can redistribute it and/or modify it under
 
8
   the terms of the GNU General Public License as published by the Free
 
9
   Software Foundation; either version 2 of the License, or (at your
 
10
   option) any later version.
 
11
 
 
12
   LuaTeX is distributed in the hope that it will be useful, but WITHOUT
 
13
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
14
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 
15
   License for more details.
 
16
 
 
17
   You should have received a copy of the GNU General Public License along
 
18
   with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
 
19
 
 
20
/* $Id: tokens.h 1230 2008-05-03 11:11:32Z oneiros $ */
3
21
 
4
22
#define token_list 0
5
23
#define cs_token_flag 0x1FFFFFFF
6
24
#define string_offset 0x200000
7
25
#define string_offset_bits 21
8
26
 
9
 
#define token_type index /* type of current token list */
10
 
#define param_start limit /* base of macro parameters in |param_stack| */
 
27
#define token_type index        /* type of current token list */
 
28
#define param_start limit       /* base of macro parameters in |param_stack| */
11
29
 
12
30
typedef enum {
13
 
  parameter=0,  /*  code for parameter */
14
 
  u_template=1,  /*  code for \<u_j> template */
15
 
  v_template=2,  /*  code for \<v_j> template */
16
 
  backed_up=3,  /*  code for text to be reread */
17
 
  inserted=4,  /*  code for inserted texts */
18
 
  macro=5,  /*  code for defined control sequences */
19
 
  output_text=6,  /*  code for output routines */
20
 
  every_par_text=7,  /*  code for \.{\\everypar}  */
21
 
  every_math_text=8,  /*  code for \.{\\everymath} */
22
 
  every_display_text=9,  /*  code for \.{\\everydisplay} */
23
 
  every_hbox_text=10,  /*  code for \.{\\everyhbox} */
24
 
  every_vbox_text=11,  /*  code for \.{\\everyvbox} */
25
 
  every_job_text=12,  /*  code for \.{\\everyjob}/ */
26
 
  every_cr_text=13,  /*  code for \.{\\everycr} */
27
 
  mark_text=14,  /*  code for \.{\\topmark}, etc. */
28
 
  every_eof_text=19 /* was calculated, value fetched from the generated C */
 
31
    parameter = 0,              /*  code for parameter */
 
32
    u_template = 1,             /*  code for \<u_j> template */
 
33
    v_template = 2,             /*  code for \<v_j> template */
 
34
    backed_up = 3,              /*  code for text to be reread */
 
35
    inserted = 4,               /*  code for inserted texts */
 
36
    macro = 5,                  /*  code for defined control sequences */
 
37
    output_text = 6,            /*  code for output routines */
 
38
    every_par_text = 7,         /*  code for \.{\\everypar}  */
 
39
    every_math_text = 8,        /*  code for \.{\\everymath} */
 
40
    every_display_text = 9,     /*  code for \.{\\everydisplay} */
 
41
    every_hbox_text = 10,       /*  code for \.{\\everyhbox} */
 
42
    every_vbox_text = 11,       /*  code for \.{\\everyvbox} */
 
43
    every_job_text = 12,        /*  code for \.{\\everyjob}/ */
 
44
    every_cr_text = 13,         /*  code for \.{\\everycr} */
 
45
    mark_text = 14,             /*  code for \.{\\topmark}, etc. */
 
46
    every_eof_text = 19         /* was calculated, value fetched from the generated C */
29
47
} token_types;
30
48
 
31
 
#undef link /* defined by cpascal.h */
 
49
#undef link                     /* defined by cpascal.h */
32
50
#define info(a)    fixmem[(a)].hhlh
33
51
#define link(a)    fixmem[(a)].hhrh
34
52
 
41
59
#define length(a) (str_start_macro((a)+1)-str_start_macro(a))
42
60
 
43
61
#if defined(index)
44
 
#undef index
 
62
#  undef index
45
63
#endif
46
64
 
47
 
#define loc      cur_input.loc_field       /* location of first unread character in |buffer| */
48
 
#define state    cur_input.state_field     /* current scanner state */
49
 
#define index    cur_input.index_field     /* reference for buffer information */
50
 
#define start    cur_input.start_field     /* starting position in |buffer| */
51
 
#define limit    cur_input.limit_field     /* end of current line in |buffer| */
52
 
#define nofilter cur_input.nofilter_field  /* is token filtering explicitly disallowed? */
53
 
#define name     cur_input.name_field      /* name of the current file */
54
 
#define current_ocp_lstack cur_input.ocp_lstack_field /* name of the current ocp */
55
 
#define current_ocp_no cur_input.ocp_no_field /* name of the current ocp */
56
 
 
57
 
#define max_char_code 15 /* largest catcode for individual characters */
58
 
 
59
 
typedef enum {  
60
 
  mid_line=1, /* |state| code when scanning a line of characters */
61
 
  skip_blanks=2+max_char_code, /* |state| code when ignoring blanks */
62
 
  new_line=3+max_char_code+max_char_code, /* |state| code at start of line */
63
 
} state_codes ;
64
 
 
65
 
 
66
 
extern void make_token_table (lua_State *L, int cmd, int chr, int cs);
67
 
 
68
 
 
 
65
#define loc      cur_input.loc_field    /* location of first unread character in |buffer| */
 
66
#define state    cur_input.state_field  /* current scanner state */
 
67
#define index    cur_input.index_field  /* reference for buffer information */
 
68
#define start    cur_input.start_field  /* starting position in |buffer| */
 
69
#define limit    cur_input.limit_field  /* end of current line in |buffer| */
 
70
#define nofilter cur_input.nofilter_field       /* is token filtering explicitly disallowed? */
 
71
#define name     cur_input.name_field   /* name of the current file */
 
72
#define current_ocp_lstack cur_input.ocp_lstack_field   /* name of the current ocp */
 
73
#define current_ocp_no cur_input.ocp_no_field   /* name of the current ocp */
 
74
 
 
75
#define max_char_code 15        /* largest catcode for individual characters */
 
76
 
 
77
typedef enum {
 
78
    mid_line = 1,               /* |state| code when scanning a line of characters */
 
79
    skip_blanks = 2 + max_char_code,    /* |state| code when ignoring blanks */
 
80
    new_line = 3 + max_char_code + max_char_code,       /* |state| code at start of line */
 
81
} state_codes;
 
82
 
 
83
 
 
84
extern void make_token_table(lua_State * L, int cmd, int chr, int cs);