Exemplo n.º 1
0
void parse(lexer& lexer)
{
 //clear
 
 clear();

 //empty

 if(lexer.is_empty())
  return;

 //string

 if(try_(lexer,&self::extract_string<fake>))
  return;

 //character

 if(try_(lexer,&self::extract_character<fake>))
  return;

 //c comment

 if(try_(lexer,&self::extract_c_comment<fake>))
  return;
  
 //cpp comment

 if(try_(lexer,&self::extract_cpp_comment<fake>))
  return;
  
 //unit
 
 check(try_(lexer,&self::extract_unit<fake>));
}