TeX in C
Explore TeX with modern c compiler.
lexer.c 文件参考
#include <stdlib.h>
#include <math.h>
#include "charset.h"
#include "print.h"
#include "printout.h"
#include "io.h"
#include "expand.h"
#include "error.h"
#include "hash.h"
#include "mem.h"
#include "box.h"
#include "texmath.h"
#include "align.h"
#include "page.h"
#include "lexer.h"
lexer.c 的引用(Include)关系图:

宏定义

#define CHECK_OUTER
 
#define process_cmd    if (_cur_cmd >= OUTER_CALL) CHECK_OUTER;
 
#define Process_cs
 

函数

UChar get_maxinstack ()
 
void lexer_semantic_init ()
 [#215] 更多...
 
void print_mode (Integer m)
 
void pushnest (void)
 [#216] enter a new semantic level, save the old. 更多...
 
void popnest (void)
 [#217] leave a semantic level, re-enter the old. 更多...
 
void showactivities (void)
 [#218] displays what TEX is working on, at all levels. 更多...
 
void showtokenlist (Integer p, Integer q, Integer l)
 [p117#292] 更多...
 
void token_show (Pointer p)
 [p118#295] display a token list, given a pointer to its reference count. 更多...
 
void print_meaning (EightBits _cmd, HalfWord _chr)
 [p118#296] displays cur cmd and cur chr in symbolic form, including the expansion of a macro or mark. 更多...
 
void showcurcmdchr (void)
 [p120#299] displays the current command. 更多...
 
void runaway (void)
 [#306] uses scanner status to print a warning message when a subfile has ended, and at certain other crucial times. 更多...
 
void showcontext (void)
 [#311] prints where the scanner is. 更多...
 
void begintokenlist (HalfWord p, QuarterWord t)
 
void endtokenlist (void)
 [#324] leave a token-list input level 更多...
 
void backinput (void)
 [#325] undoes one token of input 更多...
 
void backerror (void)
 [#327] back up one token and call error 更多...
 
void inserror (void)
 [#327] back up one inserted token and call error 更多...
 
void beginfilereading (void)
 [#328] starts a new level of input for lines of characters to be read from a file, or as an insertion from the terminal. 更多...
 
void endfilereading (void)
 [#329] variables must be downdated when such a level of input is finished 更多...
 
void clearforerrorprompt (void)
 [#330] removes completed error-inserted lines from memory 更多...
 
Boolean init_lexer (void)
 [#331] 初始化变量 更多...
 
static int check_outer_validity (int local_curcs)
 [P134#336] 更多...
 
static int hex_to_cur_chr (int c, int cc)
 
static void _get_next_helper (Boolean no_new_control_sequence)
 
void get_next (void)
 
void firm_up_the_line (void)
 [#363] If the user has set the pausing parameter to some positive value, and if nonstop mode has not beenselected. 更多...
 
void get_token (void)
 [#365] 更多...
 
HalfWord _pack_tok (Pointer _cs, EightBits _cmd, HalfWord _chr)
 [p143#365] 辅助函数 更多...
 

变量

ListStateRecord nest [NEST_SIZE+1]
 [ #211~219: PART 16: THE SEMANTIC NEST ] 更多...
 
UChar nest_ptr
 
UChar max_nest_stack
 
ListStateRecord cur_list
 
Int16 shown_mode
 
EightBits curcmd
 [#297]: current command set by get_next a command code from the long list of codes given above. 更多...
 
HalfWord curchr
 [#297]: operand of current command a character code or other modifier of the command code. 更多...
 
Pointer curcs
 [#297]: control sequence found here, zero if none found the eqtb location of the current control sequence. 更多...
 
HalfWord curtok
 [#297]: packed representative of curcmd and curchr. 更多...
 
InStateRecord inputstack [STACK_SIZE+1]
 [#301]: 更多...
 
UChar inputptr
 [#301]: first unused location of input stack. 更多...
 
static UChar maxinstack
 [#301]: largest value of input ptr when pushing. 更多...
 
InStateRecord cur_input
 xref[]: 35, 36, 87, 301, 302, 311, 321, 322, 534, 1131, error, open_log_file 更多...
 
static UChar inopen
 [#304] the number of lines in the buffer, less one 更多...
 
char openparens
 the number of open text files xref[2, only tex.c]: start_input, final_cleanup 更多...
 
Integer line
 current line number in the current source file. 更多...
 
FILE * inputfile [MAX_IN_OPEN]
 xref[]: start_input 更多...
 
static Integer linestack [MAX_IN_OPEN]
 
char scanner_status
 [#305] can a subfile end now? 更多...
 
Pointer warning_index
 [#305] identifier relevant to non-normal scanner status 更多...
 
Pointer defref
 [#305] reference count of token list being defined 更多...
 
Pointer paramstack [PARAM_SIZE+1]
 [#308] token list pointers for parameters. / xref[only tex.c]: macrocall 更多...
 
int paramptr
 [#308] first unused entry in param stack. / xref[only tex.c]: macrocall 更多...
 
Integer maxparamstack
 [#308] largest value of param ptr, will be ≤ param size + 9 . / xref[only tex.c]: macrocall 更多...
 
Integer align_state
 [#309] group level with respect to current alignment. 更多...
 
UChar baseptr
 [#310] shallowest level shown by show context. 更多...
 
Pointer parloc
 
HalfWord partoken
 
Boolean force_eof
 

函数说明

◆ _pack_tok()

HalfWord _pack_tok ( Pointer  _cs,
EightBits  _cmd,
HalfWord  _chr 
)

[p143#365] 辅助函数

◆ get_maxinstack()

UChar get_maxinstack ( )