void HTNMethod::SHOPparse( Filereader & f, TokenStruct< std::string > & ts, Domain & d ) {
	TokenStruct< std::string > astruct = f.parseTypedList( false );
	params = d.convertTypes( astruct.types );
	parseSHOPConditions( f, astruct, d );
	parseTaskList( f, astruct, d );

}
Beispiel #2
0
void Forall::SHOPparse( Filereader & f, TokenStruct< std::string > & ts, Domain & d ) {
	f.next();
	f.assert( "(" );

	TokenStruct< std::string > fs = f.parseTypedList( false );
	
	params = d.convertTypes( fs.types );
		
	TokenStruct< std::string > fstruct( ts );
	fstruct.append( fs );

	f.next();
	f.assert( "(" );
	if ( f.getChar() != ')' ) {
		cond = new And;
		cond->SHOPparse( f, fstruct, d );
	}
	else ++f.c;

	f.next();
	f.assert( "(" );
	if ( f.getChar() != ')' ) {
		cond1 = new And;
		cond1->SHOPparse( f, fstruct, d );
	}
	else ++f.c;

	f.next();
	f.assert( ")" );

}
Beispiel #3
0
void Action::parse( Filereader & f, TokenStruct< std::string > & ts, Domain & d ) {
	f.next();
	f.assert( ":PARAMETERS" );
	f.assert( "(" );

	TokenStruct< std::string > astruct = f.parseTypedList( true, d.types );
	params = d.convertTypes( astruct.types );

	parseConditions( f, astruct, d );
}
void Derived::parse( Filereader & f, TokenStruct< std::string > & ts, Domain & d ) {
	f.next();
	f.assert( "(" );
	name = f.getToken( d.preds );
	TokenStruct< std::string > dstruct = f.parseTypedList( true, d.types );
	params = d.convertTypes( dstruct.types );

	f.next();
	f.assert( "(" );
	cond = createCondition( f, d );
	cond->parse( f, dstruct, d );

	f.next();
	f.assert( ")" );
}
Beispiel #5
0
void Forall::parse( Filereader & f, TokenStruct< std::string > & ts, Domain & d ) {
	f.next();
	f.assert( "(" );

	TokenStruct< std::string > fs = f.parseTypedList( true, d.types );
	params = d.convertTypes( fs.types );
		
	TokenStruct< std::string > fstruct( ts );
	fstruct.append( fs );

	f.next();
	f.assert( "(" );
	if ( f.getChar() != ')' ) {
		cond = createCondition( f, d );
		cond->parse( f, fstruct, d );
	}
	else ++f.c;

	f.next();
	f.assert( ")" );
}