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( ")" ); }
int op::fgetchar(FILE *fp) { fs->activate(fp); file_t *file = fstruct(fp); if (file == NULL) return -1; if (file->offset == file->size) return -1; file->offset++; return fs->readChar(); }
void Forall::PDDLPrint( std::ostream & s, unsigned indent, const TokenStruct< std::string > & ts, Domain & d ) { tabindent( s, indent ); s << "( FORALL\n"; TokenStruct< std::string > fstruct( ts ); tabindent( s, indent + 1 ); printParams( 0, s, fstruct, d ); if ( cond ) cond->PDDLPrint( s, indent + 1, fstruct, d ); else { tabindent( s, indent + 1 ); s << "()"; } if( cond1 ) { s << "\n"; cond1->PDDLPrint( s, indent + 1, fstruct, d ); } s << "\n"; tabindent( s, indent ); s << ")"; }
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( ")" ); }
static WCHAR *FormatPdfFileStructure(Doc doc) { ScopedMem<WCHAR> fstruct(doc.GetProperty(Prop_PdfFileStructure)); if (str::IsEmpty(fstruct.Get())) return NULL; WStrVec parts; parts.Split(fstruct, L",", true); WStrVec props; if (parts.Find(L"linearized") != -1) props.Push(str::Dup(_TR("Fast Web View"))); if (parts.Find(L"tagged") != -1) props.Push(str::Dup(_TR("Tagged PDF"))); if (parts.Find(L"PDFX") != -1) props.Push(str::Dup(L"PDF/X (ISO 15930)")); if (parts.Find(L"PDFA1") != -1) props.Push(str::Dup(L"PDF/A (ISO 19005)")); if (parts.Find(L"PDFE1") != -1) props.Push(str::Dup(L"PDF/E (ISO 24517)")); return props.Join(L", "); }
static WCHAR *FormatPdfFileStructure(Controller *ctrl) { ScopedMem<WCHAR> fstruct(ctrl->GetProperty(Prop_PdfFileStructure)); if (str::IsEmpty(fstruct.Get())) return nullptr; WStrVec parts; parts.Split(fstruct, L",", true); WStrVec props; if (parts.Contains(L"linearized")) props.Push(str::Dup(_TR("Fast Web View"))); if (parts.Contains(L"tagged")) props.Push(str::Dup(_TR("Tagged PDF"))); if (parts.Contains(L"PDFX")) props.Push(str::Dup(L"PDF/X (ISO 15930)")); if (parts.Contains(L"PDFA1")) props.Push(str::Dup(L"PDF/A (ISO 19005)")); if (parts.Contains(L"PDFE1")) props.Push(str::Dup(L"PDF/E (ISO 24517)")); return props.Join(L", "); }
int op::fclose(FILE *fp) { fs->readClose(); return fclose(fstruct(fp)->des); }