Beispiel #1
0
/*----------------------------------------------------------------------*/
int main()
{
//  char lu;

  construire_status_etat();
  construire_transition();

  if(automate()==ECHEC) printf("Non reconnu !\n"); else printf("Reconnu !\n");

return 0;
}
Beispiel #2
0
parser::parser(std::istream &file) :
  m_queue()
{
  lexer		lexer(file);
  struct lexer::token	*token;

  for (token = lexer.next_token(); token != NULL; token = lexer.next_token())
    {
      if (token->type != lexer::Separator)
	{
	  if (token->type != lexer::Identifier)
	    throw std::exception();
	  else
	    m_queue.push(automate(lexer, token));
	}
      delete token;
    }
}
Beispiel #3
0
int main(int argc, char** argv)
{
	try
	{
		CommandLineParser cmdLineParser(argc, argv);
		
		std::string fileName = cmdLineParser.getFileName();
		int options = cmdLineParser.getOptions();
		
		AutomateLutin automate(fileName, options);
		return automate.lecture();
	}
	catch (const std::exception& ex)
	{
		std::cerr << ex.what() << std::endl;
		return 1;
	}
	
    return 0;
}