TeX in C
Explore TeX with modern c compiler.
PART 23: Maintaining the input stacks

宏定义

#define popinput()   (inputptr--, cur_input = inputstack[inputptr])
 
#define backlist(x)   begintokenlist((x), BACKED_UP)
 
#define inslist(x)   begintokenlist((x), INSERTED)
 

函数

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] 初始化变量 更多...
 

详细描述

宏定义说明

◆ backlist

#define backlist (   x)    begintokenlist((x), BACKED_UP)

◆ inslist

#define inslist (   x)    begintokenlist((x), INSERTED)

◆ popinput

#define popinput ( )    (inputptr--, cur_input = inputstack[inputptr])

函数说明

◆ backerror()

void backerror ( void  )

[#327] back up one token and call error

◆ backinput()

void backinput ( void  )

[#325] undoes one token of input

◆ beginfilereading()

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.

◆ begintokenlist()

void begintokenlist ( HalfWord  p,
QuarterWord  t 
)

◆ clearforerrorprompt()

void clearforerrorprompt ( void  )

[#330] removes completed error-inserted lines from memory

◆ endfilereading()

void endfilereading ( void  )

[#329] variables must be downdated when such a level of input is finished

◆ endtokenlist()

void endtokenlist ( void  )

[#324] leave a token-list input level

◆ init_lexer()

Boolean init_lexer ( void  )

[#331] 初始化变量

[#331]: Initialize the input routines

◆ inserror()

void inserror ( void  )

[#327] back up one inserted token and call error