3 Copyright 2009 Taco Hoekwater <taco@luatex.org>
5 This file is part of LuaTeX.
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.
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.
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/>.
26 int_val_level
= 0, /* integer values */
27 attr_val_level
, /* integer values */
28 dimen_val_level
, /* dimension values */
29 glue_val_level
, /* glue specifications */
30 mu_val_level
, /* math glue specifications */
31 dir_val_level
, /* directions */
32 ident_val_level
, /* font identifier */
33 tok_val_level
, /* token lists */
36 extern void scan_left_brace(void);
37 extern void scan_optional_equals(void);
39 extern int cur_val
; /* value returned by numeric scanners */
40 extern int cur_val1
; /* delcodes are sometimes 51 digits */
41 extern int cur_val_level
; /* the ``level'' of this value */
43 extern void scan_something_simple(halfword cmd
, halfword subitem
);
44 extern void scan_something_internal(int level
, boolean negative
);
46 extern void scan_limited_int(int max
, const char *name
);
48 # define scan_register_num() scan_limited_int(65535,"register code")
49 # define scan_mark_num() scan_limited_int(65535,"marks code")
50 # define scan_char_num() scan_limited_int(biggest_char,"character code")
51 # define scan_four_bit_int() scan_limited_int(15,NULL)
52 # define scan_math_family_int() scan_limited_int(255,"math family")
53 # define scan_real_fifteen_bit_int() scan_limited_int(32767,"mathchar")
54 # define scan_big_fifteen_bit_int() scan_limited_int(0x7FFFFFF,"extended mathchar")
55 # define scan_twenty_seven_bit_int() scan_limited_int(0777777777,"delimiter code")
57 extern void scan_fifteen_bit_int(void);
58 extern void scan_fifty_one_bit_int(void);
60 # define octal_token (other_token+'\'') /* apostrophe, indicates an octal constant */
61 # define hex_token (other_token+'"') /* double quote, indicates a hex constant */
62 # define alpha_token (other_token+'`') /* reverse apostrophe, precedes alpha constants */
63 # define point_token (other_token+'.') /* decimal point */
64 # define continental_point_token (other_token+',') /* decimal point, Eurostyle */
65 # define infinity 017777777777 /* the largest positive value that \TeX\ knows */
66 # define zero_token (other_token+'0') /* zero, the smallest digit */
67 # define A_token (letter_token+'A') /* the smallest special hex digit */
68 # define other_A_token (other_token+'A') /* special hex digit of type |other_char| */
71 extern void scan_int(void);
75 # define scan_normal_dimen() scan_dimen(false,false,false)
77 extern void scan_dimen(boolean mu
, boolean inf
, boolean shortcut
);
78 extern void scan_glue(int level
);
79 extern void scan_scaled(void);
81 extern halfword
the_toks(void);
82 extern str_number
the_scanned_result(void);
83 extern void set_font_dimen(void);
84 extern void get_font_dimen(void);
86 # define default_rule 26214 /* 0.4\thinspace pt */
88 extern halfword
scan_rule_spec(void);
90 extern void scan_font_ident(void);
91 extern void scan_general_text(void);
92 extern void get_x_or_protected(void);
93 extern halfword
scan_toks(boolean macrodef
, boolean xpand
);
95 extern void scan_normal_glue(void);
96 extern void scan_mu_glue(void);
98 /* extern int add_or_sub(int x, int y, int max_answer, boolean negative); */
99 /* extern int quotient(int n, int d); */
100 extern int fract(int x
, int n
, int d
, int max_answer
);
102 /* extern void scan_expr(void); */