Beispiel #1
0
symbol_table::symbol_table(analyze_context* pContext)
{
    pContext_ = pContext;
    temp_seed_ = 0;
    // push the global table
    push_level();
}
Beispiel #2
0
void add_else()
  {
  int psave,c;
  get_command(f,&c);
  if (c!=-2) error("Chybn� syntaxe p�kazu else. O�ek�v� se '{'");
  was_sub=0;
  if (get_last_level()!=open_level) error("Else bez if");
  add_short(171);
  psave=prog_pos;
  add_short(0);
  pop_and_fill(prog_pos,open_level);
  push_level(open_level,psave);
  open_level++;
  }
Beispiel #3
0
void add_if_jump()
  {
  char c=1;
  switch(iff_mode)
     {
     case IF_NOT_JUMP:add_short(169);break;
     case IF_JUMP:add_short(170);break;
     case IF_ELSE:c=0;break;
     }
  if (c)
     {
     push_level(open_level,prog_pos);
     add_short(0);
     }
  iff_mode=0;
  was_sub=0;
  }
Beispiel #4
0
void
#line 228 "./cwebdir/ctang-w2c.ch"
 get_output P1H(void)
#line 394 "./cwebdir/ctangle.w"
{
sixteen_bits a;
restart:if(stack_ptr==stack)return;
if(cur_byte==cur_end){
cur_val= -((int)cur_section);
pop_level(1);
if(cur_val==0)goto restart;
out_char(section_number);return;
}
a= *cur_byte++;
if(out_state==verbatim&&a!=string&&a!=constant&&a!='\n')
C_putc(a);
else if(a<0200)out_char(a);
else{
a= (a-0200)*0400+*cur_byte++;
switch(a/024000){
case 0:cur_val= a;out_char(identifier);break;
case 1:if(a==output_defs_flag)output_defs();
else/*33:*/
#line 423 "./cwebdir/ctangle.w"

{
a-= 024000;
if((a+name_dir)->equiv!=(char*)text_info)push_level(a+name_dir);
else if(a!=0){
printf("\n! Not present: <");
print_section_name(a+name_dir);err_print(">");

}
goto restart;
}

/*:33*/
#line 412 "./cwebdir/ctangle.w"
;
break;
default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val;
out_char(section_number);
}
}
}
Beispiel #5
0
void
#line 268 "./cwebdir/ctang-w2c.ch"
 output_defs P1H(void)
#line 608 "./cwebdir/ctangle.w"
{
sixteen_bits a;
push_level(NULL);
for(cur_text= text_info+1;cur_text<text_ptr;cur_text++)
if(cur_text->text_link==0){
cur_byte= cur_text->tok_start;
cur_end= (cur_text+1)->tok_start;
C_printf("%s","#define ");
out_state= normal;
protect= 1;
while(cur_byte<cur_end){
a= *cur_byte++;
if(cur_byte==cur_end&&a=='\n')break;
if(out_state==verbatim&&a!=string&&a!=constant&&a!='\n')
C_putc(a);

else if(a<0200)out_char(a);
else{
a= (a-0200)*0400+*cur_byte++;
if(a<024000){
cur_val= a;out_char(identifier);
}
else if(a<050000){confusion("macro defs have strange char");}
else{
cur_val= a-050000;cur_section= cur_val;out_char(section_number);
}

}
}
protect= 0;
flush_buffer();
}
pop_level(0);
}
// If started is true, we have already started one
void Parser::start_a_cell(bool started)
{
  if(!started) {
    the_stack.push_pop_cell(push_only);
    push_level(bt_cell);
  }
  remove_initial_space_and_back_input();
  symcodes S = cur_cmd_chr.get_cmd();
  if(S==unimp_cmd && cur_cmd_chr.get_chr()==omit_code) {
    get_token();
    the_stack.mark_omit_cell();
  } else if(S==end_cmd) { // has to be \end{tabular}
    the_stack.mark_omit_cell();
  } else if(S==multicolumn_cmd) {
    the_stack.mark_omit_cell();
    get_token();
    unprocessed_xml.remove_last_space();
    Xid cid = the_stack.get_top_id();
    new_array_object.run(cid,false);
  } else {
    TokenList L= the_stack.get_u_or_v(true);
    back_input(L);
  }
}
Beispiel #7
0
static int mk_level_placeholder(lua_State * L) { return push_level(L, mk_level_placeholder()); }
Beispiel #8
0
static int parse_level(lua_State * L) {  return push_level(L, gparser.parse_level(to_rbp(L, 1))); }