§1  IWF Metadata Harvester III  INTRODUCTION 1

1. Introduction. [LDF 2006.10.18.]

2. Copyright and licenses. [LDF 2006.10.23.]

The IWF Metadata Harvester is a package for metadata harvesting.

Copyright \begin{matrix}c \\ ◯ \end{matrix} 2006, 2007 IWF Wissen und Medien gGmbH

The author is Laurence D. Finston.

The IWF Metadata Harvester is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

The IWF Metadata Harvester is distributed in the hope that it will be useful, but WITHOUT ANY WAR-RANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the section ⟨ GNU General Public License 716 ⟩ for more details.

You should have received a copy of the GNU General Public License along with the IWF Metadata Harvester; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

See the section ⟨ GNU Free Documentation License 717 ⟩ for the copying conditions that apply to this document.

You should have received a copy of the GNU Free Documentation License along with the IWF Metadata Harvester Manual; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

The IWF Metadata Harvester is available for downloading from the following FTP server:

ftp://ftp.gwdg.de/pub/gnu2/iwfmdh/

Please send bug reports to lfinsto1@gwdg.de

The author can be contacted at:

Laurence D. Finston Kreuzbergring 41 D-37075 Göttingen Germany

Email: lfinsto1@gwdg.de
      s246794@stud.uni-goettingen.de

3. Formatting commands. [LDF 2006.10.18.] This section contains formatting commands. They don’t appear in the TEX output of CWEAVE.

4. File Lists. [LDF 2006.10.18.]

5. Source Files. [LDF 2006.10.18.]

2  LOGICAL AND HIERARCHICAL ORDER  IWF Metadata Harvester III §6

6. Logical and Hierarchical Order. [LDF 2006.10.18.]

⟨ nonwin.web 9 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Main header file when using The GNU Compiler Collection
⟨ stdafx.web 18 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Main header file when using Microsoft Visual Studio
⟨ querytyp.web 45 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . Query Type
⟨ qtgensql.web 120 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . Query Type ::generate sql string definition
⟨ dtsrctyp.web 155 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . Datasource Type
⟨ dttmtype.web 25 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date Time Type
⟨ idtype.web 184 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Id Type
⟨ scnrtype.web 209 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . Scanner Type
⟨ scanner.web 245 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . Type declarations and the yylex function
⟨ scantest.web 696 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . The tmain function when using Microsoft Visual Studio
⟨ parser.w 359 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The parser
⟨ main.web 701 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The main function when using The GNU Compiler Collection

7. Parser files. [LDF 2006.11.16.] Log

[2006.11.16.] Added this section.

⟨ parser.w 359 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The main parser input file.
⟨ grpstmnt.w 398 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Group statements.
⟨ declrtns.w 401 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Declarations.
⟨ variabls.w 422 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Variables.
⟨ assign.w 446 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Assignment.
⟨ commands.w 565 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Commands.
⟨ dttmexp.w 625 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Datetime expressions.
⟨ queryexp.w 579 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Query expressions.
⟨ dtsrcexp.w 603 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Datasource expressions.

§8  IWF Metadata Harvester III  ALPHABETICAL ORDER 3

8. Alphabetical Order. [LDF 2006.09.27.]

⟨ assign.w 446 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Assignment.
⟨ commands.w 565 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Commands.
⟨ declrtns.w 401 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Declarations.
⟨ dtsrcexp.w 603 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Datasource expressions.
⟨ dtsrctyp.web 155 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . Datasource Type
⟨ dttmexp.w 625 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Datetime expressions.
⟨ dttmtype.web 25 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date Time Type
⟨ grpstmnt.w 398 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Group statements.
⟨ idtype.web 184 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Id Type
⟨ main.web 701 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The main function when using The GNU Compiler Collection
⟨ nonwin.web 9 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Main header file when using The GNU Compiler Collection
⟨ parser.w 359 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The parser
⟨ qtgensql.web 120 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . Query Type ::generate sql string definition
⟨ queryexp.w 579 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Query expressions.
⟨ querytyp.web 45 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . Query Type
⟨ scanner.web 245 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . Type declarations and the yylex function
⟨ scantest.web 696 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . The tmain function when using Microsoft Visual Studio
⟨ scnrtype.web 209 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . Scanner Type
⟨ stdafx.web 18 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Main header file when using Microsoft Visual Studio
⟨ variabls.w 422 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Variables.

4  ALPHABETICAL ORDER  IWF Metadata Harvester III §8

9. Non-Windows Code (nonwin.web). [LDF 2006.10.20.]

Log

[LDF 2006.10.20.] Created this file.

[LDF 2006.11.03.] Now including unistd.h in order to be be able to use getopt .

⟨ nonwin.web 9 ⟩ ≡

static char id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 6, 8, and 17. This code is used in section 17.

10. Include files. ⟨ Include files 10 ⟩ ≡ #include #include #include #include #include #include #include #include #include #include #include #if 0 /∗ 1 ∗/ #include #endif #include #include #include #include #include #include #include

See also sections 20, 26, 46, 121, 156, 185, 210, 246, 360, 646, 697, and 702. This code is used in sections 16, 24, 43, 118, 154, 182, 207, 243, 357, 643, 695, 700, and 715.

11. Type declarations. [LDF 2006.10.20.]

Log

[LDF 2006.10.20.] Added this section.

12. Mutex Type. [LDF 2006.10.20.]

Log

[LDF 2006.10.20.] Added this type declaration.

§12  IWF Metadata Harvester III  MUTEX TYPE  5

⟨ Mutex Type declaration 12 ⟩ ≡

struct Mutex Type { int Lock (void) {

return 0; } ; int Unlock (void) {

return 0; } ;

};

This code is used in section 16.

13. Forward declarations. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

⟨ Forward declarations 13 ⟩ ≡ class Query Type; typedef Query Type ∗Query Node; class Scanner Type; typedef Scanner Type ∗Scanner Node;

See also sections 28, 48, 158, 187, 212, and 248. This code is used in sections 16, 43, 44, 118, 119, 182, 183, 207, 208, 243, 244, 357, and 358.

14. extern declarations for global variables. [LDF 2006.10.19.]

Log

[LDF 2006.10.19.] Added this section.

[LDF 2006.11.23.] Added extern declarations of ofstream tex file strm, Mutex Type tex mutex , unsigned short tex file ctr , and string tex filename str .

[LDF 2006.11.30.] Added extern declaration of const string copyright tex str .

[LDF 2006.11.30.] Added extern declaration of Mutex Type time mutex .

⟨ extern declarations for global variables 14 ⟩ ≡ extern Mutex Type cerr mutex ; extern Mutex Type cout mutex ; extern Mutex Type time mutex ; extern ofstream tex file strm; extern Mutex Type tex mutex ; extern unsigned short tex file ctr ; extern string tex filename str ; extern string copyright tex str ; extern int yydebug ;

See also section 21.

6 EXTERN DECLARATIONS FOR GLOBAL VARIABLES IWF Metadata Harvester III §14

This code is used in sections 16 and 24.

15. Putting Non-Win together. [LDF 2006.10.20.]

16. This is what’s written to nonwin.h. ⟨ 16 ⟩ ≡

⟨ Include files 10 ⟩ using namespace std; ⟨ Mutex Type declaration 12 ⟩ ⟨ Forward declarations 13 ⟩ ⟨ extern declarations for global variables 14 ⟩

§17  IWF Metadata Harvester III  PUTTING NON-WIN TOGETHER 7

17. This is what isn’t compiled. The file nonwin.c isn’t compiled, but including ⟨ nonwin.web 9 ⟩ here prevents CWEAVE from issuing a warning. [LDF 2006.10.24.]

  ⟨ nonwin.web 9 ⟩

18. stdafx (stdafx.web). [LDF 2006.10.17.]

Log

[LDF 2006.10.17.] Created this file.

⟨ stdafx.web 18 ⟩ ≡

static char id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 6 and 8. This code is used in section 23.

19. Preprocessor macro calls. [LDF 2006.10.17.] ⟨ Preprocessor macro calls 19 ⟩ ≡ #ifdef #pragma once #endif

See also sections 27, 47, 157, 186, 211, 247, and 647. This code is used in sections 24, 44, 119, 183, 208, 244, and 358.

20. Include files in stdafx.h. [LDF 2006.10.17.] ⟨ Include files 10 ⟩ +≡ #include #include #define /∗ einige CString-Konstruktoren sind explizit ∗/ #ifndef #define /∗ Selten verwendete Teile der Windows-Header nicht einbinden ∗/ #endif #include #include /∗ MFC-Kern- und Standardkomponenten ∗/ #include /∗ MFC-Erweiterungen ∗/ #include

/∗ MFC-Untersttzung fr allgemeine Steuerelemente von Internet Explorer 4 ∗/ #ifndef #include /∗ MFC-Untersttzung fr allgemeine Windows-Steuerelemente ∗/ #endif /∗ ∗/ #define /∗ einige CString-Konstruktoren sind explizit ∗/ #include #include #include #include #include #include #include #include #include #include #include

8  INCLUDE FILES IN STDAFX.H  IWF Metadata Harvester III §20

#include #include #include #include #include #include

21. extern declarations for global variables. [LDF 2006.10.19.]

Log

[LDF 2006.10.19.] Added this section.

⟨ extern declarations for global variables 14 ⟩ +≡ extern ofstream log strm; extern CMutex log strm mutex ; extern CMutex cerr mutex ; extern CMutex cout mutex ; extern ifstream in strm;

22. Putting stdafx.web together.

23. This is what’s compiled. [LDF Undated.] #include

  ⟨ stdafx.web 18 ⟩

§24  IWF Metadata Harvester III  PUTTING STDAFX.WEB TOGETHER 9

24. This is what’s written to stdafx.h. ⟨ 24 ⟩ ≡

⟨ Preprocessor macro calls 19 ⟩

⟨ Include files 10 ⟩

⟨ extern declarations for global variables 14 ⟩

25. Date Time Type (dttmtype.web). [LDF 2006.10.17.]

Log

[LDF 2006.10.31.] Created this file.

⟨ dttmtype.web 25 ⟩ ≡

static char id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 6 and 8. This code is used in section 43.

26. Include files. ⟨ Include files 10 ⟩ +≡ #include #ifdef #include #else #include #endif #include

10  PREPROCESSOR MACRO CALLS  IWF Metadata Harvester III §28

27. Preprocessor macro calls. ⟨ Preprocessor macro calls 19 ⟩ +≡ #ifdef #pragma once #endif 28. Forward declarations. [LDF 2006.10.31.] ⟨ Forward declarations 13 ⟩ +≡

class Query Type; class Date Time Type; typedef Date Time Type ∗Date Time Node; namespace Scan Parse {

int datetime assignment func 0 (void ∗v, Date Time Node &curr date time node, int specifier , int

op, void ∗val , int type); int datetime assignment func 1 (void ∗v, Date Time Node &d, int op, void ∗&vec);

};

29. class Date Time Type declaration. [LDF 2006.10.17.]

Log

!! BUG FIX: Made function declarations public.

[LDF 2006.12.18.] Added friend declaration for yyparse.

[LDF 2006.12.18.] Added friend declaration for Scan Parse ::datetime assignment func 0 .

[LDF 2006.12.18.] Added friend declaration for Scan Parse ::datetime assignment func 1 .

⟨ Declare class Date Time Type 29 ⟩ ≡

class Date Time Type { friend class Query Type; friend int Scan Parse ::datetime assignment func 0 (void ∗v, Date Time Node

&curr date time node, int specifier , int op, void ∗val , int type); friend int Scan Parse ::datetime assignment func 1 (void ∗v, Date Time Node &d, int op, void

∗&vec); friend int yyparse(void ∗); friend ostream&operator≪(ostream & o, Date Time Type &d); short ∗year range begin; short ∗year range end ; short ∗year ; unsigned short ∗month; unsigned short ∗day ; unsigned short ∗hour ; unsigned short ∗minute; float ∗second ;

public: ⟨ Declare Date Time Type functions 32 ⟩ };

This code is used in sections 43 and 44.

30. Date Time Type functions. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

31. Constructors and setting functions. [LDF 2006.10.31.]

§31  IWF Metadata Harvester III  CONSTRUCTORS AND SETTING FUNCTIONS 11

Log

[2006.10.31.] Added this section.

32. Default constructor. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this function.

⟨ Declare Date Time Type functions 32 ⟩ ≡

Date Time Type(void);

See also sections 34, 36, and 40. This code is used in section 29.

33. ⟨ Define Date Time Type functions 33 ⟩ ≡

Date Time Type ::Date Time Type(void)

{ year range begin = 0; year range end = 0; year = 0; month = 0; day = 0; hour = 0; minute = 0; second = 0; return;

} /∗ End of the default Date Time Type constructor definition. ∗/

See also sections 35, 37, and 41. This code is used in section 43.

34. Destructor. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this function.

12  DESTRUCTOR  IWF Metadata Harvester III §35

⟨ Declare Date Time Type functions 32 ⟩ +≡ ∼Date Time Type(void); 35. ⟨ Define Date Time Type functions 33 ⟩ +≡

Date Time Type ::∼Date Time Type(void) {

delete year range begin; delete year range end ; delete year ; delete month; delete day ; delete hour ; delete minute; delete second ; return;

} /∗ End of the default Date Time Type destructor definition. ∗/

36. Assignment. [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this function.

§37  IWF Metadata Harvester III  ASSIGNMENT 13

⟨ Declare Date Time Type functions 32 ⟩ +≡ Date Time Node operator=(const Date Time Type &d); 37. ⟨ Define Date Time Type functions 33 ⟩ +≡

Date Time Node Date Time Type ::operator=(const Date Time Type &d) {

#if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm; #ifdef

temp strm ≪ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( );

#endif

if (this ≡ &d) { #ifdef

temp strm ≪ ␣ ␣ ≪ endl ≪

␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( );

#endif

return this ; } if (year range begin ∧ d.year range begin) {

∗year range begin = ∗d.year range begin; } else if (year range begin ∧ ¬d.year range begin) {

delete year range begin;

year range begin = 0; } else if (¬year range begin ∧ d.year range begin) {

year range begin = new short(∗d.year range begin); } if (year range end ∧ d.year range end ) {

∗year range end = ∗d.year range end ; } else if (year range end ∧ ¬d.year range end ) {

delete year range end ;

year range end = 0; } else if (¬year range end ∧ d.year range end ) {

year range end = new short(∗d.year range end ); } if (year ∧ d.year ) {

14  ASSIGNMENT  IWF Metadata Harvester III §37

∗year = ∗d.year ; } else if (year ∧ ¬d.year ) { delete year ; year = 0;

} else if (¬year ∧ d.year ) {

year = new short(∗d.year ); } if (month ∧ d.month) {

∗month = ∗d.month; } else if (month ∧ ¬d.month) {

delete month;

month = 0; } else if (¬month ∧ d.month) {

month = new unsigned short(∗d.month); } if (day ∧ d.day ) {

∗day = ∗d.day ; } else if (day ∧ ¬d.day ) {

delete day ;

day = 0; } else if (¬day ∧ d.day ) {

day = new unsigned short(∗d.day ); } if (hour ∧ d.hour ) {

∗hour = ∗d.hour ; } else if (hour ∧ ¬d.hour ) {

delete hour ;

hour = 0; } else if (¬hour ∧ d.hour ) {

hour = new unsigned short(∗d.hour ); } if (minute ∧ d.minute) {

∗minute = ∗d.minute; } else if (minute ∧ ¬d.minute) {

delete minute;

minute = 0; } else if (¬minute ∧ d.minute) {

minute = new unsigned short(∗d.minute); } if (second ∧ d.second ) {

∗second = ∗d.second ; } else if (second ∧ ¬d.second ) {

delete second ;

second = 0; } else if (¬second ∧ d.second ) {

second = new float(∗d.second ); }

#ifdef temp strm ≪ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( );

#endif

return this ; } /∗ End of the default Date Time Type assignment operator definition. ∗/

38. Output operator. [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this function.

⟨ Declare non-member functions for Date Time Type 38 ⟩ ≡

ostream & operator≪(ostream & o, Date Time Type &d);

This code is used in sections 43 and 44.

16  OUTPUT OPERATOR  IWF Metadata Harvester III §39

39. ⟨ Define non-member functions for Date Time Type 39 ⟩ ≡

ostream & operator≪(ostream & o, Date Time Type &d) {

#if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm; #ifdef

temp strm ≪ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( );

#endif o ≪ ␣ ␣ ; if (d.year range begin) o ≪ ∗d.year range begin; else o ≪ ; o ≪ endl ; o ≪ ␣ ␣ ; if (d.year range end ) o ≪ ∗d.year range end ; else o ≪ ; o ≪ endl ; o ≪ ␣ ␣ ; if (d.year ) o ≪ ∗d.year ; else o ≪ ; o ≪ endl ; o ≪ ␣ ␣ ; if (d.month) o ≪ ∗d.month; else o ≪ ; o ≪ endl ; o ≪ ␣ ␣ ; if (d.day ) o ≪ ∗d.day ; else o ≪ ; o ≪ endl ; o ≪ ␣ ␣ ; if (d.hour ) o ≪ ∗d.hour ; else o ≪ ; o ≪ endl ; o ≪ ␣ ␣ ; if (d.minute) o ≪ ∗d.minute; else o ≪ ; o ≪ endl ; o ≪ ␣ ␣ ; if (d.second ) o ≪ ∗d.second ; else o ≪ ; o ≪ endl ; return o;

} /∗ End of operator≪ definition. ∗/

This code is used in section 43.

§40  IWF Metadata Harvester III  SHOW 17

40. Show. [LDF 2006.12.15.] Log

[2006.12.15.] Added this function. ⟨ Declare Date Time Type functions 32 ⟩ +≡

18  SHOW  IWF Metadata Harvester III §41

int show (string s = ); 41. ⟨ Define Date Time Type functions 33 ⟩ +≡

int Date Time Type ::show (string s) {

stringstream temp strm; temp strm ≪ s ≪ endl ≪ ␣ ␣ ␣ ; if (year range begin ≡ 0) temp strm ≪ ; else temp strm ≪ ∗static cast⟨short ∗⟩(year range begin); temp strm ≪ endl ; temp strm ≪ ␣␣ ␣ ; if (year range end ≡ 0) temp strm ≪ ; else temp strm ≪ ∗static cast⟨short ∗⟩(year range end ); temp strm ≪ endl ; temp strm ≪ ␣␣ ␣ ; if (year ≡ 0) temp strm ≪ ; else temp strm ≪ ∗static cast⟨short ∗⟩(year ); temp strm ≪ endl ; temp strm ≪ ␣␣ ␣ ; if (month ≡ 0) temp strm ≪ ; else temp strm ≪ ∗static cast⟨unsigned short ∗⟩(month); temp strm ≪ endl ; temp strm ≪ ␣␣ ␣ ; if (day ≡ 0) temp strm ≪ ; else temp strm ≪ ∗static cast⟨unsigned short ∗⟩(day ); temp strm ≪ endl ; temp strm ≪ ␣␣ ␣ ; if (hour ≡ 0) temp strm ≪ ; else temp strm ≪ ∗static cast⟨unsigned short ∗⟩(hour ); temp strm ≪ endl ; temp strm ≪ ␣␣ ␣ ; if (minute ≡ 0) temp strm ≪ ; else temp strm ≪ ∗static cast⟨unsigned short ∗⟩(minute); temp strm ≪ endl ; temp strm ≪ ␣␣ ␣ ; if (second ≡ 0) temp strm ≪ ; else temp strm ≪ ∗static cast⟨float ∗⟩(second ); temp strm ≪ endl ; cerr ≪ temp strm.str ( ); temp strm.str ( ); return 0;

} /∗ End of the default Date Time Type ::show definition. ∗/

42. Putting Date Time Type together. [LDF 2006.10.31.]

§43  IWF Metadata Harvester III  PUTTING DATE TIME TYPE TOGETHER 19

43. This is what’s compiled.

⟨ Include files 10 ⟩

⟨ dttmtype.web 25 ⟩

using namespace std; ⟨ Forward declarations 13 ⟩ ⟨ Declare class Date Time Type 29 ⟩ ⟨ Declare non-member functions for Date Time Type 38 ⟩ ⟨ Define Date Time Type functions 33 ⟩ ⟨ Define non-member functions for Date Time Type 39 ⟩

20  PUTTING DATE TIME TYPE TOGETHER  IWF Metadata Harvester III §44

44. This is what’s written to dttmtype.h. ⟨ 44 ⟩ ≡

⟨ Preprocessor macro calls 19 ⟩

using namespace std;

⟨ Forward declarations 13 ⟩

⟨ Declare class Date Time Type 29 ⟩

⟨ Declare non-member functions for Date Time Type 38 ⟩

45. Query Type (querytyp.web). [LDF 2006.10.17.]

Log

[LDF 2006.10.31.] Created this file.

⟨ querytyp.web 45 ⟩ ≡

static char id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 6 and 8. This code is used in section 118.

46. Include files. ⟨ Include files 10 ⟩ +≡ #include #ifdef #include #else #include #endif #include #include #include #include #include

47. Preprocessor macro calls. ⟨ Preprocessor macro calls 19 ⟩ +≡ #ifdef #pragma once #endif

48. Forward declarations. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this section.

⟨ Forward declarations 13 ⟩ +≡ class Scanner Type; typedef Scanner Type ∗Scanner Node; class Query Type; typedef Query Type ∗Query Node; class Id Type;

§48  IWF Metadata Harvester III  FORWARD DECLARATIONS 21

typedef Id Type ∗Id Node;

49. class Query Type declaration. . [LDF 2006.10.17.] The forward declaration of Query Type is needed in order to be able to define Query Node using

typedef . [LDF 2006.10.31.]

Log

[LDF 2006.10.31.] Added typedef Query Type ∗Query Node.

[LDF 2006.10.31.] Working on this declaration.

[LDF 2006.11.13.] Removed Query Node next . It was redundant, since and node serves the same purpose.

[LDF 2006.11.13.] Added vector⟨unsigned short⟩ target types and static map⟨unsigned short, string⟩ target type map.

[LDF 2006.11.13.] Added unsigned short field type and static map⟨unsigned short, string⟩ field type map.

[LDF 2006.11.21.] Added string name and Id Node id node.

[LDF 2006.11.22.] Added unsigned short query ctr .

[LDF 2006.12.12.] Changed unsigned short array match values to the non-array unsigned short match value.

[LDF 2006.12.12.] Added static map⟨unsigned short, string⟩ match value map.

⟨ Declare class Query Type 49 ⟩ ≡ class Query Type; typedef Query Type ∗Query Node; class Query Type { ⟨ friend declarations for class

Query Type 51 ⟩

private: unsigned short query type; unsigned short field type; unsigned short value type; vector⟨unsigned short⟩ target types ; static map⟨unsigned short, string⟩ query type map; static map⟨unsigned short, string⟩ field type map; static map⟨unsigned short, string⟩ value type map; static map⟨unsigned short, string⟩ target type map; static map⟨unsigned short, string⟩ match value map; Id Node id node; bool negated ; string name; void ∗value; Query Node up; Query Node and node; Query Node or node; Query Node xor node; unsigned short match value;

See also section 50. This code is used in sections 118 and 119.

22 CLASS QUERY TYPE DECLARATION IWF Metadata Harvester III §50

50. ⟨ Declare class Query Type 49 ⟩ +≡

Scanner Node scanner node;

unsigned short query ctr ; public: ⟨ Declare static Query Type constants 53 ⟩

⟨ Declare static Query Type variables 74 ⟩

⟨ Declare Query Type functions 82 ⟩

} ;

51. friend declarations for class Query Type. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

[LDF 2006.11.01.] Changed the name of Scan Parse ::start local query func to Scan Parse ::start local database query func and the name of Scan Parse ::end local query func to Scan Parse ::end query func.

[LDF 2006.11.01.] Added the friend declaration of Scan Parse ::declare variable func.

[LDF 2006.11.01.] Added the char ∗name argument to Scan Parse ::declare variable func.

[LDF 2006.11.02.] Changed the return value of Scan Parse ::declare variable func from int to Id Node.

[LDF 2006.11.02.] Added the friend declaration of Scan Parse ::variable func.

[LDF 2006.11.02.] Added the friend declaration of Scan Parse ::query assignment func 0 .

[LDF 2006.11.14.] Added the friend declaration of yyparse.

[LDF 2006.12.15.] Added the friend declaration of Scan Parse ::datetime assignment func 0 .

[LDF 2006.12.18.] Added the friend declaration of Scan Parse ::datetime assignment func 1 .

[LDF 2006.12.19.] Added the friend declaration of Scan Parse ::query assignment func 1 .

⟨ friend declarations for class Query Type 51 ⟩ ≡ friend int yyparse(void ∗); friend void ∗Scan Parse ::variable func(void ∗v, char ∗name); friend Id Node Scan Parse ::declare variable func(void ∗v, const unsigned short type, char

∗name); friend void ∗Scan Parse ::query assignment func 0 (void ∗v, void ∗object , unsigned int

assignment type, unsigned int arg 0 , unsigned int arg 1 , void ∗value, bool negate); friend int Scan Parse ::query assignment func 1 (Scanner Node scanner node, Id Node

&curr id node, void ∗&field specifier , int assignment operator , int negation optional , int match term optional , void ∗&v, int type);

friend int Scan Parse ::start local database query func(void ∗v);

friend int Scan Parse ::end query func(void ∗v);

friend int Scan Parse ::datetime assignment func 0 (void ∗v, Date Time Node

&curr date time node, int specifier , int op, void ∗val , int type); friend int Scan Parse ::datetime assignment func 1 (void ∗v, Date Time Node &d, int op, void

∗&vec);

This code is used in section 49.

§53 IWF Metadata Harvester III DECLARE STATIC QUERY TYPE CONSTANTS AND VARIABLES 23

52. Declare static Query Type constants and variables. [LDF 2006.10.31.] 53. Types for value type, field type, query type, and target type. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

⟨ Declare static Query Type constants 53 ⟩ ≡

static const unsigned short ;

See also sections 55, 58, 60, 61, 62, 69, 71, and 78. This code is used in section 50.

54. ⟨ Initialize static Query Type constants 54 ⟩ ≡

const unsigned short Query Type :: = 0;

See also sections 56, 63, 64, 66, 67, 68, 70, 72, and 79. This code is used in section 118.

55. Types for query type. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

[LDF 2006.11.13.] Added static const unsigned short .

⟨ Declare static Query Type constants 53 ⟩ +≡ static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ;

56. ⟨ Initialize static Query Type constants 54 ⟩ +≡

const unsigned short Query Type :: = 1;

const unsigned short Query Type :: = 2;

const unsigned short Query Type :: = 3;

24 DECLARE STATIC QUERY TYPE CONSTANTS AND VARIABLES IWF Metadata Harvester III §57

const unsigned short Query Type :: = 4; 57. Types for field type. [LDF 2006.11.13.]

Log

[LDF 2006.11.13.] Added this section with the declarations of  ,  ,  ,

and .

[LDF 2006.12.05.] Added static const unsigned short .

[LDF 2006.12.07.] Added the static const unsigned shorts  ,  ,
,  ,  , and  .

[LDF 2006.12.12.] Added the static const unsigned short ,

[LDF 2006.12.12.] Added the static const unsigned short .

[LDF 2006.12.12.] Added static const unsigned shorts to refer to additional tables from the OAI database (dc test).

[LDF 2006.12.12.] Added static const unsigned shorts to refer to additional tables from the PICA database (PICA DB).

58. Tables. [LDF 2006.12.13.] ⟨ Declare static Query Type constants 53 ⟩ +≡

static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ;

59. Columns. [LDF 2006.12.13.] 60. Authors. [LDF 2006.12.13.] ⟨ Declare static Query Type constants 53 ⟩ +≡

static const unsigned short ; static const unsigned short ; static const unsigned short ;

61. Contributors. [LDF 2006.12.14.] ⟨ Declare static Query Type constants 53 ⟩ +≡

static const unsigned short ; static const unsigned short ; static const unsigned short ;

62. Records. [LDF 2006.12.14.] ⟨ Declare static Query Type constants 53 ⟩ +≡

static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ;

63. Initialization. [LDF 2006.12.13.] ⟨ Initialize static Query Type constants 54 ⟩ +≡ 64. Tables. [LDF 2006.12.13.] ⟨ Initialize static Query Type constants 54 ⟩ +≡

const unsigned short Query Type :: = 1; const unsigned short Query Type :: = 2; const unsigned short Query Type :: = 3; const unsigned short Query Type :: = 4; const unsigned short Query Type :: = 5; const unsigned short Query Type :: = 6; const unsigned short Query Type :: = 7; const unsigned short Query Type :: = 8; const unsigned short Query Type :: = 9; const unsigned short Query Type :: = 10; const unsigned short Query Type :: = 11; const unsigned short Query Type :: = 12; const unsigned short Query Type :: = 13; const unsigned short Query Type :: = 14; const unsigned short Query Type :: = 15; const unsigned short Query Type :: = 16; const unsigned short Query Type :: = 17; const unsigned short Query Type :: = 18; const unsigned short Query Type :: = 19; const unsigned short Query Type :: = 20; const unsigned short Query Type :: = 21; const unsigned short Query Type :: = 22; const unsigned short Query Type :: = 23; const unsigned short Query Type :: = 24; const unsigned short Query Type :: = 25; const unsigned short Query Type :: = 26; const unsigned short Query Type :: = 27; const unsigned short Query Type :: = 28;

65. Columns. [LDF 2006.12.13.]

66. Authors. [LDF 2006.12.13.] ⟨ Initialize static Query Type constants 54 ⟩ +≡

const unsigned short Query Type :: = 200; const unsigned short Query Type :: = 201; const unsigned short Query Type :: = 202;

67. Contributors. [LDF 2006.12.13.] ⟨ Initialize static Query Type constants 54 ⟩ +≡

const unsigned short Query Type :: = 203; const unsigned short Query Type :: = 204; const unsigned short Query Type :: = 205; 68. Records. [LDF 2006.12.14.] ⟨ Initialize static Query Type constants 54 ⟩ +≡

const unsigned short Query Type :: = 500; const unsigned short Query Type :: = 501; const unsigned short Query Type :: = 502; const unsigned short Query Type :: = 503; const unsigned short Query Type :: = 504; const unsigned short Query Type :: = 505; const unsigned short Query Type :: = 506; const unsigned short Query Type :: = 507; const unsigned short Query Type :: = 508; const unsigned short Query Type :: = 509; const unsigned short Query Type :: = 510; const unsigned short Query Type :: = 501; const unsigned short Query Type :: = 512;

69. Types for value type. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

⟨ Declare static Query Type constants 53 ⟩ +≡ static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ;

70. ⟨ Initialize static Query Type constants 54 ⟩ +≡

const unsigned short Query Type :: = 1; const unsigned short Query Type :: = 2; const unsigned short Query Type :: = 3; const unsigned short Query Type :: = 4;

71. Types for target types . [LDF 2006.11.13.]

Log

[LDF 2006.11.13.] Added this section with the declarations of the static const unsigned shorts ,

,  , and  .

⟨ Declare static Query Type constants 53 ⟩ +≡ static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; 72. ⟨ Initialize static Query Type constants 54 ⟩ +≡

const unsigned short Query Type :: = 1; const unsigned short Query Type :: = 2; const unsigned short Query Type :: = 3; const unsigned short Query Type :: = 4;

73. Flags. [LDF 2006.12.13.]

Log

[2006.12.13.] Added this section.

⟨ Preprocessor macro definitions 73 ⟩ ≡ #define 96

This code is used in sections 118 and 119.

74. ⟨ Declare static Query Type variables 74 ⟩ ≡

static bitset <  >  ;

See also section 75. This code is used in section 50.

§75  IWF Metadata Harvester III  FLAGS 29

75. Tables. [LDF 2006.12.13.] ⟨ Declare static Query Type variables 74 ⟩ +≡

static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;
static bitset <  >  ;

30  FLAGS  IWF Metadata Harvester III §76

76. ⟨ Initialize static Query Type variables 76 ⟩ ≡

bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;
bitset <  > Query Type ::  ;

See also section 77. This code is used in section 118.

§77  IWF Metadata Harvester III  INITIALIZE STATIC QUERY TYPE VARIABLES 31

77. Initialize static Query Type variables. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

[LDF 2006.11.13.] Added declaration of target type map.

[LDF 2006.11.13.] Added declaration of field type map.

[LDF 2006.12.12.] Added declaration of match value map.

⟨ Initialize static Query Type variables 76 ⟩ +≡ map⟨unsigned short, string⟩ Query Type ::query type map; map⟨unsigned short, string⟩ Query Type ::field type map; map⟨unsigned short, string⟩ Query Type ::value type map; map⟨unsigned short, string⟩ Query Type ::target type map; map⟨unsigned short, string⟩ Query Type ::match value map;

78. Constants for match value. [LDF 2006.12.11.]

Log

[LDF 2006.12.11.] Added this section with the declarations of the static const unsigned shorts and .

[LDF 2006.12.12.] Added unsigned short .

⟨ Declare static Query Type constants 53 ⟩ +≡ static const unsigned short ; static const unsigned short ; static const unsigned short ;

79. ⟨ Initialize static Query Type constants 54 ⟩ +≡

const unsigned short Query Type :: = 1; const unsigned short Query Type :: = 2; const unsigned short Query Type :: = 3;

80. Query Type functions. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

32  DEFAULT CONSTRUCTOR  IWF Metadata Harvester III §82

81. Constructor and setting functions. [LDF 2006.10.31.] 82. Default constructor. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this function.

⟨ Declare Query Type functions 82 ⟩ ≡

Query Type(void);

See also sections 84, 86, 91, 95, 97, 101, 106, 110, and 111. This code is used in section 50.

83. ⟨ Define Query Type functions 83 ⟩ ≡

Query Type ::Query Type(void) {

query type = ; field type = ; value type = ; negated = false; id node = 0; value = 0; up = 0; and node = 0; or node = 0; xor node = 0; query ctr = 0; match value = ; scanner node = 0; return;

} /∗ End of default Query Type constructor definition. ∗/

See also sections 85, 87, 88, 89, 90, 92, 93, 94, 96, 98, 99, 100, 102, 103, 104, 107, 108, 109, 112, 113, 114, 115, 116, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, and 152.

This code is used in sections 118 and 154.

84. Set. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this function.

[LDF 2006.11.13.] Added unsigned short ffield and ttarget arguments. Made all arguments optional, except the first one, i.e., qquery type.

⟨ Declare Query Type functions 82 ⟩ +≡

int set(unsigned short qquery type, unsigned short ffield type = 0, unsigned short vvalue type = 0, unsigned short ttarget type = 0, bool nnegated = false, void ∗vvalue = 0, Query Node uup = 0, Query Node aand node = 0, Query Node oor node = 0, Query Node xxor node = 0, Scanner Node sscanner node = 0);

§85  IWF Metadata Harvester III  SET 33

85. ⟨ Define Query Type functions 83 ⟩ +≡

int Query Type ::set(unsigned short qquery type, unsigned short ffield type, unsigned short vvalue type, unsigned short target type, bool nnegated , void ∗vvalue, Query Node uup, Query Node aand node, Query Node oor node, Query Node xxor node, Scanner Node sscanner node)

{ match value = ; return 0;

} /∗ End of Query Type ::set definition. ∗/

86. Destructor. [LDF 2006.10.31.]

To Do

[LDF 2006.12.12.] Change the way some values are handled, depending on the field type. I’ve added dummy code for new fields that assumes that all of the associated values are pointers to string. This will probably not be the case.

Log

[2006.10.31.] Added this function.

[LDF 2006.11.14.] [LDF 2006.11.14.] !! BUG FIX: No longer writing debugging output to scanner node log strm. This caused a “General Protection Fault” using GCC under Windows XP.

[LDF 2006.12.12.] Added code to account for additional static const unsigned shorts that refer to tables in the OAI database (dc test).

[LDF 2006.12.12.] Added code to account for the tokens that refer to additional tables in the PICA database (PICA DB).

⟨ Declare Query Type functions 82 ⟩ +≡ ∼Query Type(void);

87. ⟨ Define Query Type functions 83 ⟩ +≡

Query Type ::∼Query Type(void){ #if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm; #ifdef

temp strm ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( );

#endif 88. Please note that the Query Node up isn’t deleted! [LDF 2006.11.03.]

To Do

[LDF 2006.11.03.] Cast value to correct type and delete it.

⟨ Define Query Type functions 83 ⟩ +≡ up = 0; if (value ≠ 0) {

if (field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨field type ≡ ∨field type ≡ ∨field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡

∨field type ≡  ∨field type ≡  ∨field type ≡
∨ field type ≡  ∨ field type ≡  ∨ field type ≡

∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ) {

delete static cast⟨string ∗⟩(value); } else if (field type ≡ ∨field type ≡ ∨field type ≡

∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ∨ field type ≡ ) {

delete static cast⟨int ∗⟩(value); } else if (field type ≡ ∨ field type ≡

∨ field type ≡ ) { delete static cast⟨Date Time Node⟩(value);

§89  IWF Metadata Harvester III  DESTRUCTOR 35

} } /∗ if (value ≠ 0) ∗/ value = 0; delete and node; and node = 0; delete or node; or node = 0; delete xor node; xor node = 0; 89. ⟨ Define Query Type functions 83 ⟩ +≡ #ifdef

temp strm ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( );

#endif

90. DO NOT delete scanner node! [LDF 2006.10.31.] ⟨ Define Query Type functions 83 ⟩ +≡

scanner node = 0;

return; } /∗ End of ∼Query Type definition. ∗/

91. Assignment. [LDF 2006.11.15.]

Log

[2006.11.15.] Added this function.

⟨ Declare Query Type functions 82 ⟩ +≡ Query Node operator=(const Query Type &q); 92. ⟨ Define Query Type functions 83 ⟩ +≡

Query Node Query Type ::operator=(const Query Type &q){ #if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm;

scanner node = q.scanner node;

query ctr = q.query ctr ; #ifdef

temp strm ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

if (this ≡ &q) {

#ifdef

temp strm ≪ ␣ ␣ ≪ endl ≪

␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return this ; } 93.

Log

[LDF 2006.11.21.] Added this section. Now setting name to q.name.

⟨ Define Query Type functions 83 ⟩ +≡ name = q.name; if (value ≠ 0 ∧ value type ≠ q.value type) {

if (value type ≡ Query Type :: ) {

delete static cast⟨string ∗⟩(value); } else if (value type ≡ Query Type :: ) {

delete static cast⟨int ∗⟩(value); } else if (value type ≡ Query Type :: ) {

delete static cast⟨float ∗⟩(value); } else if (value type ≡ Query Type :: ) {

delete static cast⟨Date Time Node⟩(value); } value = 0;

} /∗ if (value ≠ 0 ∧ value type ≠ q.value type) ∗/ query type = q.query type; field type = q.field type; value type = q.value type; negated = q.negated ; target types .clear ( ); for (vector⟨unsigned short⟩::const iterator iter = q.target types .begin( ); iter ≠ q.target types .end ( );

++iter ) target types .push back (∗iter ); if (q.value ≠ 0 ∧ value type ≡ ) {

if (value ≡ 0) value = static cast⟨void ∗⟩(new string);

∗static cast⟨string ∗⟩(value) = ∗static cast⟨string ∗⟩(q.value); } /∗ if ∗/ else if (q.value ≠ 0 ∧ value type ≡ ) {

if (value ≡ 0) value = static cast⟨void ∗⟩(new int);

∗static cast⟨int ∗⟩(value) = ∗static cast⟨int ∗⟩(q.value); } else if (q.value ≠ 0 ∧ value type ≡ ) {

if (value ≡ 0) value = static cast⟨void ∗⟩(new float);

∗static cast⟨float ∗⟩(value) = ∗static cast⟨float ∗⟩(q.value); } else if (q.value ≠ 0 ∧ value type ≡ ) {

if (value ≡ 0) value = static cast⟨void ∗⟩(new Date Time Type);

∗static cast⟨Date Time Node⟩(value) = ∗static cast⟨Date Time Node⟩(q.value); } else {

value type = ;

value = 0; } scanner node = q.scanner node; delete and node; and node = 0; delete or node; or node = 0; delete xor node; xor node = 0; if (q.and node) {

and node = new Query Type; ∗and node = ∗q.and node; and node up = this ;

} if (q.or node) {

or node = new Query Type; ∗or node = ∗q.or node; or node up = this ;

} if (q.xor node) {

xor node = new Query Type; ∗xor node = ∗q.xor node; xor node up = this ;

} #ifdef

temp strm ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

§94  IWF Metadata Harvester III  ASSIGNMENT 39

94. ⟨ Define Query Type functions 83 ⟩ +≡

match value = q.match value;

return this ; } /∗ End of Query Type ::operator=(const Query Type q) definition. ∗/

95. Initialize type maps. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this function. [LDF 2006.11.13.] Added code for initializing target type map. [LDF 2006.11.13.] Added code for initializing field type map. [LDF 2006.12.12.] Added code for . [LDF 2006.12.12.] Added code for initializing match value map. [LDF 2006.12.12.] Added code for additional static const unsigned shorts that refer to tables in the OAI database (dc test). [LDF 2006.12.12.] Added code to account for for additional static const unsigned shorts that refer to tables in the PICA database (PICA DB).

40  INITIALIZE TYPE MAPS  IWF Metadata Harvester III §96

⟨ Declare Query Type functions 82 ⟩ +≡ static int initialize type maps (void); 96. ⟨ Define Query Type functions 83 ⟩ +≡

int Query Type ::initialize type maps (void) {

query type map[  ] =  ;
query type map[  ] =  ;
query type map[  ] =  ;
query type map[  ] =  ;
query type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;

field type map[ ] =

;

field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
field type map[  ] =  ;
value type map[  ] =  ;
value type map[  ] =  ;

§96  IWF Metadata Harvester III  INITIALIZE TYPE MAPS 41
value type map[  ] =  ;
value type map[  ] =  ;
value type map[  ] =  ;
target type map[  ] =  ;
target type map[  ] =  ;
target type map[  ] =  ;
target type map[  ] =  ;
match value map[  ] =  ;
match value map[  ] =  ;
match value map[  ] =  ;
match value map[  ] =  ;

return 0; } /∗ End of Query Type ::initialize type maps definition. ∗/

97. Initialize flags. [LDF 2006.12.13.]

Log

[2006.12.13.] Added this function.

⟨ Declare Query Type functions 82 ⟩ +≡ static int initialize flags (void);

98. ⟨ Define Query Type functions 83 ⟩ +≡

42  INITIALIZE FLAGS  IWF Metadata Harvester III §99

int Query Type ::initialize flags (void){ int shift value = 0; 99. ⟨ Define Query Type functions 83 ⟩ +≡

= 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++};

§99  IWF Metadata Harvester III  INITIALIZE FLAGS 43

= 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; = 1; ≪= shift value^{++}; 100. Error handling. too small. [LDF 2006.12.13.] ⟨ Define Query Type functions 83 ⟩ +≡

if (shift value > ) {

cerr ≪ ␣␣ ␣ ≪ endl ≪ ␣ ␣ ≪ endl ≪

␣ ␣ ␣ ␣ ≪ endl ≪

        ␣        ␣     ␣      ␣     ␣  ≪ endl ≪  ␣        ␣  ␣         ␣ ;

getchar ( ); return 1;

} /∗ if (shift value > ) ∗/

return 0; } /∗ Query Type ::initialize flags ∗/

101. Set field specifier. [LDF 2006.11.15.]

Log

[2006.11.15.] Added this function.

[LDF 2006.12.12.] Added code for .

[LDF 2006.12.12.] Added code for more static const unsigned shorts that refer to tables in the OAI database (dc test).

[LDF 2006.12.12.] Added code for more static const unsigned shorts that refer to tables in the PICA database (PICA DB).

[LDF 2006.12.13.] Changed the name of this function from set field type to set field specifier .

§102  IWF Metadata Harvester III  SET FIELD SPECIFIER 45

⟨ Declare Query Type functions 82 ⟩ +≡ int set field specifier (void ∗v, bool traverse = false, Scanner Node sscanner node = 0); 102. ⟨ Define Query Type functions 83 ⟩ +≡

int Query Type ::set field specifier (void ∗v, bool traverse, Scanner Node sscanner node){ #if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm; deque < int > ∗field specifier = static cast ⟨ deque < int >∗> (v); unsigned int table = (∗field specifier )[0]; unsigned int column; if (table ≡ ) field type = ; else if (table ≡ ) {

if (field specifier size( ) ≡ 1) field type = ; else /∗ field specifier size( ) ≠ 1 ∗/ {

column = (∗field specifier )[1];

if (column ≡  ) field type =  ;
else if (column ≡  ) field type =  ;
else if (column ≡  ) field type =  ;

} /∗ else (field specifier size( ) ≠ 1) ∗/

}  /∗ else if (table ≡  ) ∗/
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;

else if (table ≡ ) { if (field specifier size( ) ≡ 1) field type = ; else /∗ (field specifier size( ) ≠ 1) ∗/ {

column = (∗field specifier )[1];

if (column ≡  ) field type =  ;
else if (column ≡  ) field type =  ;
else if (column ≡  ) field type =  ;

} /∗ else ((field specifier size( ) ≠ 1)) ∗/

}  /∗ else if (table ≡  ) ∗/
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;

else if (table ≡ )

field type = ;

else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;

46  SET FIELD SPECIFIER  IWF Metadata Harvester III §103

103. table ≡ .

Log

[2006.12.14.] Added this section.

⟨ Define Query Type functions 83 ⟩ +≡

else

if (table ≡ ) { if (field specifier size( ) ≡ 1) field type = ; else /∗ (field specifier size( ) ≠ 1) ∗/ {

column = (∗field specifier )[1]; if (column ≡ ) field type = ; else if (column ≡ ) field type = ; else if (column ≡ )

field type = ; else if (column ≡ ) field type = ; else if (column ≡ )

field type = ; else if (column ≡ ) field type = ; else if (column ≡ )

field type = ;

else if (column ≡  ) field type =  ;
else if (column ≡  ) field type =  ;

else if (column ≡ )

field type = ; else if (column ≡ ) field type = ; else if (column ≡ )

field type = ; else if (column ≡ )

field type = ; } /∗ else ((field specifier size( ) ≠ 1)) ∗/

}  /∗ else if (table ≡  ) ∗/

104. ⟨ Define Query Type functions 83 ⟩ +≡

else

if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;
else if (table ≡  ) field type =  ;

else field type = ; if (traverse) {

if (and node) and node set field specifier (v, true, scanner node); if (or node) or node set field specifier (v, true, scanner node); if (xor node) xor node set field specifier (v, true, scanner node);

} return 0;

#undef } /∗ End of Query Type ::set field specifier definition. ∗/

105. Functions for generating strings. [LDF 2006.11.21.]

Log

[LDF 2006.11.21.] Added this section.

106. Generate TEX string. [LDF 2006.11.21.]

Log

[2006.11.21.] Added this function.

48  GENERATE TEX STRING  IWF Metadata Harvester III §107

⟨ Declare Query Type functions 82 ⟩ +≡ string generate tex string (Scanner Node scanner node, stringstream ∗tex strm); 107. ⟨ Define Query Type functions 83 ⟩ +≡

string Query Type ::generate tex string (Scanner Node scanner node, stringstream ∗tex strm){ #if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm; #ifdef

temp strm ≪ ␣ ≪ endl ≪

␣ ␣ ≪ query ctr ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

§108  IWF Metadata Harvester III  GENERATE TEX STRING 49

108. ⟨ Define Query Type functions 83 ⟩ +≡

if (query ctr ≡ 0) ∗tex strm ≪  ≪ name ≪  ≪ endl ;
∗tex strm ≪  ≪ query type map[query type] ≪  ≪ endl ;
∗tex strm ≪  ≪ field type map[field type] ≪  ≪ endl ;
∗tex strm ≪  ≪ value type map[value type] ≪  ≪ endl ;

∗tex strm ≪ ; if (target types .size( ) ≤ 0) ∗tex strm ≪ ; else if (target types .size( ) ≡ 1) {

∗tex strm ≪ target type map[target types [0]]; } else {

∗tex strm ≪ ;

int i = 0;

for (vector⟨unsigned short⟩::iterator iter = target types .begin( ); iter ≠ target types .end ( );

++iter ) { if (i^{++} > 0) ∗tex strm ≪ ≪ endl ; ∗tex strm ≪ ≪ target type map[∗iter ] ≪ ;

} /∗ for ∗/

∗tex strm ≪ ; } /∗ else ∗/ ∗tex strm ≪ ≪ endl ; if (value type ≡ ) {

∗tex strm ≪ ≪ ∗static cast⟨string ∗⟩(value) ≪ ≪ endl ; } else if (value type ≡ ) {

∗tex strm ≪ ≪ ∗static cast⟨int ∗⟩(value) ≪ ≪ endl ; } else if (value type ≡ ) {

∗tex strm ≪ ≪ ∗static cast⟨float ∗⟩(value) ≪ ≪ endl ; } else if (value type ≡ ) { ∗tex strm ≪ ≪

# if 0 /∗ 1 ∗/ ∗static cast⟨Date Time Node⟩(value) # endif ≪ ≪ endl ; } ∗tex strm ≪ ; if (up) ∗tex strm ≪ up query ctr ; else ∗tex strm ≪ ; ∗tex strm ≪ endl ; ∗tex strm ≪ ; if (and node) ∗tex strm ≪ and node query ctr ; else ∗tex strm ≪ ; ∗tex strm ≪ endl ; ∗tex strm ≪ ; if (or node) ∗tex strm ≪ or node query ctr ; else ∗tex strm ≪ ; ∗tex strm ≪ endl ; ∗tex strm ≪ ; if (or node) ∗tex strm ≪ xor node query ctr ; else ∗tex strm ≪ ; ∗tex strm ≪ endl ; ∗tex strm ≪ ≪ endl ≪ ≪ query ctr ≪ ≪ negated ≪ ≪ endl ≪ ≪ endl ; if (and node) { ∗tex strm ≪ ; ∗tex strm ≪ ≪ ≪ ; and node generate tex string (scanner node, tex strm);

} if (or node) {

∗tex strm ≪ ;

∗tex strm ≪ ≪ ≪ ; or node generate tex string (scanner node, tex strm);

} if (xor node) {

∗tex strm ≪ ;

∗tex strm ≪ ≪ ≪ ; xor node generate tex string (scanner node, tex strm);

}

109. Return string. [LDF 2006.11.21.] ⟨ Define Query Type functions 83 ⟩ +≡ #ifdef

temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

§110  IWF Metadata Harvester III  GENERATE SQL STRING 51

#endif return tex strm str ( ); } /∗ Query Type ::generate tex string ∗/ 110. Generate SQL string. [LDF 2006.12.01.]

Log

[LDF 2006.12.01.] Added this function.

[LDF 2006.12.12.] Added code for .

[LDF 2006.12.12.] Added code to account for static const unsigned shorts that refer to additional tables in the OAI database (dc test).

[LDF 2006.12.14.] Moved the definition of this function from this file (querytyp.web) to qtgensql.web.

⟨ Declare Query Type functions 82 ⟩ +≡

int generate sql string (Scanner Node scanner node, int database type, stringstream ∗sql strm, stringstream ∗select strm, stringstream ∗from strm, stringstream ∗where strm 0 , stringstream ∗where strm 1 , bool ∗first select , bool ∗first from, bool ∗first where, bitset < > ∗field flags , string ∗return str );

111. Show. [LDF 2006.10.31.] As well as simply showing the Query Type object, this function is meant to serve as an example of

traversing it. This is somewhat complicated, because of all of the Query Nodes it contains, and the complex way in which they’re linked. [LDF 2006.10.31.]

The Scanner Node scanner node data member of the Query Type object may already be non-null. However, show has an optional Scanner Node argument, just in case it doesn’t. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this function.

[LDF 2006.11.14.] Added the optional int level ctr argument with default 0.

[LDF 2006.12.12.] Added code to account for additional fields that refer to tables in the PICA database (PICA DB).

⟨ Declare Query Type functions 82 ⟩ +≡ int show (string s = , Scanner Node sscanner node = 0);

112. ⟨ Define Query Type functions 83 ⟩ +≡

int Query Type ::show (string s, Scanner Node sscanner node){ stringstream temp strm; if (scanner node ≡ 0 ∧ sscanner node ≠ 0) scanner node = sscanner node; 113. query type, field type, value type, and target type. [LDF 2006.10.31.]

Log

[LDF 2006.11.13.] Added code for showing target types .

[LDF 2006.11.21.] Now showing name.

[LDF 2006.12.12.] Added code to account for static const unsigned shorts that refer to additional tables in the OAI database (dc test).

⟨ Define Query Type functions 83 ⟩ +≡

temp strm ≪  ␣  ␣ ≪ name ≪ endl ≪  ␣  ␣ ≪ query type map[query type] ≪
endl ≪  ␣  ␣ ≪ field type map[field type] ≪ endl ≪  ␣  ␣ ≪

value type map[value type] ≪ endl ≪ ␣ ␣ ≪ match value map[match value] ≪ endl ;

int i = 0; for (vector⟨unsigned short⟩::iterator iter = target types .begin( ); iter ≠ target types .end ( ); ^{++}iter )

temp strm ≪ ≪ i^{++} ≪ ␣ ␣ ≪ target type map[∗iter ] ≪ endl ; if (value ≠ 0) {

if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

§113  IWF Metadata Harvester III  SHOW 53

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ␣ ≪ ∗static cast⟨int ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨int ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨int

∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨int ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string

∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨int ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨int ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨int ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨int

∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨int

∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ≪ endl ≪

∗static cast⟨Date Time Node⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ≪ endl ≪

∗static cast⟨Date Time Node⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ endl ≪

∗static cast⟨Date Time Node⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else if (field type ≡ )

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; else temp strm ≪ ␣ ␣ ␣ ␣ ≪ endl ;

} /∗ if (value ≠ 0) ∗/ else {

temp strm ≪ ␣␣ ␣ ≪ endl ; } if (up ∧ up value ∧ up value type ≡ ) {

temp strm ≪ ␣ ␣ ≪ ∗static cast⟨string ∗⟩(up value) ≪ endl ; }

114. Output the contents of temp strm. [LDF 2006.10.31.] ⟨ Define Query Type functions 83 ⟩ +≡

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( ); if (scanner node ≠ 0 ∧ scanner node log strm.is open( )) scanner node log strm ≪ temp strm; 115. Show subsidiary nodes recursively. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this section.

⟨ Define Query Type functions 83 ⟩ +≡

if (and node ≠ 0) { temp strm ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( ); if (scanner node ≠ 0 ∧ scanner node log strm.is open( )) scanner node log strm ≪ temp strm; and node show ( , sscanner node);

} if (or node ≠ 0) {

temp strm ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( ); if (scanner node ≠ 0 ∧ scanner node log strm.is open( )) scanner node log strm ≪ temp strm; or node show ( , sscanner node);

} if (xor node ≠ 0) {

temp strm ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( ); if (scanner node ≠ 0 ∧ scanner node log strm.is open( )) scanner node log strm ≪ temp strm; xor node show ( , sscanner node);

} temp strm ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( );

116. ⟨ Define Query Type functions 83 ⟩ +≡

return 0; } /∗ End of Query Type ::show definition. ∗/

117. Putting Query Type together. [LDF 2006.10.31.]

56  PUTTING QUERY TYPE TOGETHER  IWF Metadata Harvester III §118

118. This is what’s compiled.

⟨ Include files 10 ⟩

⟨ querytyp.web 45 ⟩

using namespace std; using namespace Scan Parse; ⟨ Preprocessor macro definitions 73 ⟩ ⟨ Forward declarations 13 ⟩ ⟨ Declare class Query Type 49 ⟩ ⟨ Initialize static Query Type constants 54 ⟩ ⟨ Initialize static Query Type variables 76 ⟩ ⟨ Define Query Type functions 83 ⟩

§119  IWF Metadata Harvester III  PUTTING QUERY TYPE TOGETHER 57

119. This is what’s written to querytyp.h. ⟨ 119 ⟩ ≡ #ifndef #define 1

⟨ Preprocessor macro definitions 73 ⟩

⟨ Preprocessor macro calls 19 ⟩

using namespace std;

⟨ Forward declarations 13 ⟩

⟨ Declare class Query Type 49 ⟩

#endif  /∗  is defined. ∗/

120. Query Type::generate sql string definition (qtgensql.web). [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Created this file.

⟨ qtgensql.web 120 ⟩ ≡

static char id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 6 and 8. This code is used in section 154.

121. Include files. ⟨ Include files 10 ⟩ +≡ #include #ifdef #include #else #include #endif #include #include #include #include #include #include

122. Generate SQL string. [LDF 2006.12.01.]

Log

[LDF 2006.12.01.] Added this function.

[LDF 2006.12.12.] Added code for .

[LDF 2006.12.12.] Added code to account for static const unsigned shorts that refer to additional tables in the OAI database (dc test).

[LDF 2006.12.14.] Moved the definition of this function from querytyp.web to this file (qtgensql.web).

58  GENERATE SQL STRING  IWF Metadata Harvester III §123

123. ⟨ Define Query Type functions 83 ⟩ +≡

int Query Type ::generate sql string (Scanner Node scanner node, int database type, stringstream ∗sql strm, stringstream ∗select strm, stringstream ∗from strm, stringstream ∗where strm 0 , stringstream ∗where strm 1 , bool ∗first select , bool ∗first from, bool ∗first where, bitset < > ∗field flags , string ∗return str ){

#if 0 /∗ 14g ∗/ #define #else #undef #endif

stringstream temp strm; stringstream date strm;

#ifdef

temp strm ≪ ␣ ≪ endl ≪ ␣ ␣ ≪ query ctr ≪ endl ≪ ␣ ␣ ≪ token map[database type] ≪ endl ≪ ␣ ␣ ≪ query type map[query type] ≪

endl ≪  ␣  ␣ ≪ ∗first select ≪ endl ≪  ␣  ␣ ≪
∗first where ≪ endl ≪  ␣  ␣ ≪ ∗first from ≪ endl ≪  ␣  ␣ ≪

query ctr ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); getchar ( );

#endif

124. Set match operator string. [LDF 2006.12.12.]

Log

[2006.12.12.] Added this declaration.

⟨ Define Query Type functions 83 ⟩ +≡ string match str ; if (match value ≡ ) match str = ;

else if (match value ≡  ) match str =  ;
else if (match value ≡  ) match str =  ;
else if (match value ≡  ) match str =  ;

else {

temp strm ≪ ␣␣ ␣ ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ match value ≪ endl ≪

        ␣   ␣   ␣  ␣    ␣     ␣  ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

} 125. Set query type str . [LDF 2006.12.06.] ⟨ Define Query Type functions 83 ⟩ +≡

string query type str ;

126. Set parenthesis strings. [LDF 2006.12.14.] ⟨ Define Query Type functions 83 ⟩ +≡

string open parenthesis str ; string close parenthesis str ; if (and node ∨ or node ∨ xor node) {

open parenthesis str = ;

close parenthesis str = ; } else {

open parenthesis str = ;

close parenthesis str = ; }

if (query type ≡  ) query type str =  ;
else if (query type ≡  ) query type str =  ;

else if (query type ≡ ) {

if (database type ≡ ) {

temp strm ≪  ␣␣  ␣  ≪ endl ≪

        ␣  ␣          ␣   ␣               ␣  ␣  ≪

endl ≪  ␣          ␣   ␣     ␣  ␣   ␣  ≪ endl ≪

        ␣        ␣              ␣    ␣       ␣     ␣  ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); ∗return str = ; return 1;

} /∗ if (database type ≡ ) ∗/ query type str = ;

} /∗ else if (query type ≡ ) ∗/ if (negated ) query type str += ␣ ;

127. ⟨ Define Query Type functions 83 ⟩ +≡

if (query ctr ≡ 0) ∗select strm ≪ ␣ ≪ endl ; #if 0 /∗ 1 ∗/

cerr ≪ ␣ ␣ ≪ field type map[field type] ≪ endl ; #endif 128. . Pica Only. [LDF 2006.12.06.] ⟨ Define Query Type functions 83 ⟩ +≡

if (field type ≡ ∧ database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) {

∗from strm ≪ ␣ ; } ∗first from = false;

if ((∗field flags &  ) ≡  ) {
∗from strm ≪  ␣  ␣    ␣               ␣  ␣  ≪ endl ;

} if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨string

∗⟩(value) ≪ ␣ ;

if ((∗field flags &  ) ≡  ) {
∗where strm 1 ≪  ␣             ␣  ␣  ≪ endl ;

} ∗field flags |= ; ∗field flags |= ;

}  /∗ if (field type ≡  ∧ database type ≡  ) ∗/

129. . Pica Only. [LDF 2006.12.13.] ⟨ Define Query Type functions 83 ⟩ +≡

else

if (field type ≡ ∧ database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) {

∗from strm ≪ ␣ ; } ∗first from = false;

if ((∗field flags &  ) ≡  ) {
∗from strm ≪  ␣  ␣    ␣               ␣  ␣  ≪ endl ;

} if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨string

∗⟩(value) ≪ ␣ ;

if ((∗field flags &  ) ≡  ) {
∗where strm 1 ≪  ␣             ␣  ␣  ≪ endl ;

} ∗field flags |= ; ∗field flags |= ;

}  /∗ else if (field type ≡  ∧ database type ≡  ) ∗/

130. . Pica Only. [LDF 2006.12.13.] ⟨ Define Query Type functions 83 ⟩ +≡

else

if (field type ≡ ∧ database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) {

∗from strm ≪ ␣ ; } ∗first from = false;

if ((∗field flags &  ) ≡  ) {
∗from strm ≪  ␣  ␣    ␣               ␣  ␣  ≪ endl ;

} if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨string

∗⟩(value) ≪ ␣ ;

if ((∗field flags &  ) ≡  ) {
∗where strm 1 ≪  ␣             ␣  ␣  ≪ endl ;

} ∗field flags |= ; ∗field flags |= ;

}  /∗ else if (field type ≡  ∧ database type ≡  ) ∗/

131. . Pica Only. [LDF 2006.12.14.] ⟨ Define Query Type functions 83 ⟩ +≡

if (field type ≡ ∧ database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) {

∗from strm ≪ ␣ ; } ∗first from = false;

if ((∗field flags &  ) ≡  ) {
∗from strm ≪  ␣  ␣       ␣                    ␣  ␣  ≪ endl ;

} if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨string

∗⟩(value) ≪ ␣ ;

if ((∗field flags &  ) ≡  ) {
∗where strm 1 ≪  ␣                     ␣ ␣  ≪ endl ;

} ∗field flags |= ; ∗field flags |= ;

}  /∗ if (field type ≡  ∧ database type ≡  ) ∗/

132. . Pica Only. [LDF 2006.12.14.] ⟨ Define Query Type functions 83 ⟩ +≡

else

if (field type ≡ ∧ database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) {

∗from strm ≪ ␣ ; } ∗first from = false;

if ((∗field flags &  ) ≡  ) {
∗from strm ≪  ␣  ␣       ␣                    ␣  ␣  ≪ endl ;

} if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨string

∗⟩(value) ≪ ␣ ;

if ((∗field flags &  ) ≡  ) {
∗where strm 1 ≪  ␣                     ␣ ␣  ≪ endl ;

} ∗field flags |= ; ∗field flags |= ;

}  /∗ else if (field type ≡  ∧ database type ≡  ) ∗/

133. . Pica Only. [LDF 2006.12.14.] ⟨ Define Query Type functions 83 ⟩ +≡

else

if (field type ≡ ∧ database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) {

∗from strm ≪ ␣ ; } ∗first from = false;

if ((∗field flags &  ) ≡  ) {
∗from strm ≪  ␣  ␣       ␣                    ␣  ␣  ≪ endl ;

} if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨string

∗⟩(value) ≪ ␣ ;

if ((∗field flags &  ) ≡  ) {
∗where strm 1 ≪  ␣                     ␣ ␣  ≪ endl ;

} ∗field flags |= ; ∗field flags |= ;

}  /∗ else if (field type ≡  ∧ database type ≡  ) ∗/

134. OAI. [LDF 2006.12.06.] ⟨ Define Query Type functions 83 ⟩ +≡

else

if (field type ≡ ∧ database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ )

∗select strm ≪ ␣ ␣ ≪ endl ; if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) ∗from strm ≪ ␣ ; ∗first from = false;

if ((∗field flags &  ) ≡  )
∗from strm ≪  ␣  ␣    ␣                    ␣  ␣  ≪ endl ;

if (∗first where) ∗where strm 0 ≪ ␣ ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨string

∗⟩(value) ≪ ␣ ;

if ((∗field flags &  ) ≡  )
∗where strm 1 ≪  ␣                  ␣ ␣  ≪ endl ;

∗field flags |= ;

}  /∗ else if (field type ≡  ∧ database type ≡ ) ∗/

135. Creator. OAI only. [LDF 2006.12.06.] ⟨ Define Query Type functions 83 ⟩ +≡

else if (field type ≡ ∧ database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ )

∗select strm ≪ ␣ ␣ ≪ endl ; if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) ∗from strm ≪ ␣ ; ∗first from = false;

if ((∗field flags &  ) ≡  )
∗from strm ≪  ␣  ␣  ␣                ␣  ␣  ≪ endl ;

if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ ␣ ;

if ((∗field flags &  ) ≡  )
∗where strm 1 ≪  ␣            ␣  ␣  ≪ endl ;

∗field flags |= ; } /∗ else if (field type ≡ ∧ database type ≡ ) ∗/ else if (field type ≡ ) { 136. OAI. [LDF 2006.12.12.]

Log

[2006.12.11.] Added this section.

⟨ Define Query Type functions 83 ⟩ +≡

if (database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ )

∗select strm ≪ ␣ ␣ ≪ endl ; if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) ∗from strm ≪ ␣ ; ∗first from = false;

if ((∗field flags &  ) ≡  )
∗from strm ≪  ␣  ␣  ␣       ␣  ␣  ≪ endl ;

if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ ␣ ;

if ((∗field flags &  ) ≡  )
∗where strm 1 ≪  ␣          ␣ ␣  ≪ endl ;

∗field flags |= ; } /∗ if (database type ≡ ) ∗/

}  /∗ else if (field type ≡  ) ∗/

137. Main canonical title (Pica). [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this section.

⟨ Define Query Type functions 83 ⟩ +≡ else if (field type ≡ ) { 138. PICA. [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this section.

⟨ Define Query Type functions 83 ⟩ +≡

if (database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ )

∗select strm ≪ ␣ ␣ ≪ endl ; if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) ∗from strm ≪ ␣ ; ∗first from = false;

if ((∗field flags &  ) ≡  )
∗from strm ≪  ␣  ␣   ␣                   ␣   ␣  ≪ endl ;

if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨string

∗⟩(value) ≪ ␣ ;

if ((∗field flags &  ) ≡  )
∗where strm 1 ≪  ␣                 ␣ ␣  ≪ endl ;

∗field flags |= ;

}  /∗ if (database type ≡  ) ∗/
}  /∗ else if (field type ≡  ) ∗/

139. Record. [LDF 2006.12.14.] 140. Record ID. [LDF 2006.12.14.]

Log

[2006.12.14.] Added this section.

⟨ Define Query Type functions 83 ⟩ +≡

else

if (field type ≡ ∧ database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ≪ endl ; ∗first select = false;

} else if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) {

∗from strm ≪ ␣ ; } ∗first from = false;

if ((∗field flags &  ) ≡  ) {
∗from strm ≪  ␣  ␣  ≪ endl ;

} if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨int ∗⟩(value) ≪ ␣ ; ∗field flags |= ; ∗field flags |= ;

}  /∗ else if (field type ≡  ∧ database type ≡  ) ∗/

141. Record ELN Original Entry. [LDF 2006.12.14.]

Log

[2006.12.14.] Added this section.

⟨ Define Query Type functions 83 ⟩ +≡

else

if (field type ≡ ∧ database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) {

∗from strm ≪ ␣ ; } ∗first from = false;

if ((∗field flags &  ) ≡  ) {
∗from strm ≪  ␣  ␣  ≪ endl ;

} if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨int

∗⟩(value) ≪ ␣ ; ∗field flags |= ; ∗field flags |= ;

}  /∗ else if (field type ≡  ∧ database type ≡  ) ∗/

142. Record ELN Most Recent Change. [LDF 2006.12.14.]

Log

[2006.12.14.] Added this section.

⟨ Define Query Type functions 83 ⟩ +≡

else

if (field type ≡ ∧ database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) {

∗from strm ≪ ␣ ; } ∗first from = false;

if ((∗field flags &  ) ≡  ) {
∗from strm ≪  ␣  ␣  ≪ endl ;

} if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨int

∗⟩(value) ≪ ␣ ; ∗field flags |= ; ∗field flags |= ;

}  /∗ else if (field type ≡  ∧ database type ≡  ) ∗/

143. Record ELN Status Change. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this section.

⟨ Define Query Type functions 83 ⟩ +≡

else

if (field type ≡ ∧ database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) {

∗from strm ≪ ␣ ; } ∗first from = false;

if ((∗field flags &  ) ≡  ) {
∗from strm ≪  ␣  ␣  ≪ endl ;

} if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨int

∗⟩(value) ≪ ␣ ; ∗field flags |= ; ∗field flags |= ;

}  /∗ else if (field type ≡  ∧ database type ≡  ) ∗/

144. Record Identification Number. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this section.

⟨ Define Query Type functions 83 ⟩ +≡

else

if (field type ≡ ∧ database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) {

∗from strm ≪ ␣ ; } ∗first from = false;

if ((∗field flags &  ) ≡  ) {
∗from strm ≪  ␣  ␣  ≪ endl ;

} if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨string

∗⟩(value) ≪ ␣ ; ∗field flags |= ; ∗field flags |= ;

}  /∗ else if (field type ≡  ∧ database type ≡  ) ∗/

145. Record Date Status Change. [LDF 2006.12.19.]

Log

[LDF 2006.12.19.] Added this section.

⟨ Define Query Type functions 83 ⟩ +≡

else

if (field type ≡ ∧ database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ ) {

∗select strm ≪ ␣ ≪ endl ; } if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) {

∗from strm ≪ ␣ ; } ∗first from = false;

if ((∗field flags &  ) ≡  ) {
∗from strm ≪  ␣  ␣  ≪ endl ;

} if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; Date Time Node d = static cast⟨Date Time Node⟩(value); date strm.str ( ); ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ␣ ; if (d year ) ∗where strm 0 ≪ setfill ( ) ≪ right ≪ setw (4) ≪ ∗d year ; else ∗where strm 0 ≪ ; ∗where strm 0 ≪ ; if (d month) ∗where strm 0 ≪ setfill ( ) ≪ right ≪ setw (2) ≪ ∗d month; else ∗where strm 0 ≪ ; ∗where strm 0 ≪ ; if (d day ) ∗where strm 0 ≪ setfill ( ) ≪ right ≪ setw (2) ≪ ∗d day ; else ∗where strm 0 ≪ ; ∗where strm 0 ≪ ␣ ; if (d hour ) ∗where strm 0 ≪ setfill ( ) ≪ right ≪ setw (2) ≪ ∗d hour ; else ∗where strm 0 ≪ ; ∗where strm 0 ≪ ; if (d minute) ∗where strm 0 ≪ setfill ( ) ≪ right ≪ setw (2) ≪ ∗d minute; else ∗where strm 0 ≪ ; ∗where strm 0 ≪ ; if (d second ) {

if (∗d second < 10) ∗where strm 0 ≪ ;

∗where strm 0 ≪ fixed ≪ setprecision(3) ≪ ∗d second ; } else ∗where strm 0 ≪ ; ∗where strm 0 ≪ ␣ ; ∗field flags |= ; ∗field flags |= ;

}  /∗ else if (field type ≡  ∧ database type ≡  ) ∗/

146. Subject. [LDF Undated.] ⟨ Define Query Type functions 83 ⟩ +≡

else if (field type ≡ ) {

147.

Log

[2006.12.12.] Added this section.

⟨ Define Query Type functions 83 ⟩ +≡

if (database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ )

∗select strm ≪ ␣ ␣ ≪ endl ; if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) ∗from strm ≪ ␣ ; ∗first from = false;

if ((∗field flags &  ) ≡  )
∗from strm ≪  ␣  ␣  ␣                ␣  ␣  ≪ endl ;

if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ ␣ ;

if ((∗field flags &  ) ≡  )
∗where strm 1 ≪  ␣            ␣  ␣  ≪ endl ;

∗field flags |= ;

}  /∗ if (database type ≡  ) ∗/

148. ⟨ Define Query Type functions 83 ⟩ +≡

if (database type ≡ ) {

if (∗first select ) { ∗select strm ≪ ; ∗first select = false;

} if ((∗field flags & ) ≡ )

∗select strm ≪ ␣ ␣ ≪ endl ; if (∗first from) ∗from strm ≪ ␣ ; else if ((∗field flags & ) ≡ ) ∗from strm ≪ ␣ ; ∗first from = false;

if ((∗field flags &  ) ≡  )
∗from strm ≪  ␣  ␣  ␣                ␣  ␣  ≪ endl ;

if (∗first where) ∗where strm 0 ≪ ␣ ≪ endl ; else {

∗where strm 0 ≪ query type str ≪ ␣ ≪ open parenthesis str ; } ∗first where = false; ∗where strm 0 ≪ ␣ ≪ match str ≪ ␣ ≪ ∗static cast⟨string ∗⟩(value) ≪ ␣ ;

if ((∗field flags &  ) ≡  )
∗where strm 1 ≪  ␣            ␣  ␣  ≪ endl ;

∗field flags |= ; } /∗ if (database type ≡ ) ∗/ } /∗ else if (field type ≡ ) ∗/ temp strm ≪ ␣ ␣ ≪ value type map[value type] ≪ endl ; temp strm ≪ ␣ ␣ ; if (target types .size( ) ≤ 0) temp strm ≪ ; else if (target types .size( ) ≡ 1) {

temp strm ≪ target type map[target types [0]]; } else {

int i = 0; for (vector⟨unsigned short⟩::iterator iter = target types .begin( ); iter ≠ target types .end ( );

++iter ) { if (i^{++} > 0) temp strm ≪ endl ≪ ≪ endl ; temp strm ≪ target type map[∗iter ];

} /∗ for ∗/ } /∗ else ∗/ temp strm ≪ endl ; if (value type ≡ ) {

temp strm ≪ ∗static cast⟨string ∗⟩(value) ≪ endl ; if (value type ≡ ) ;

#if 0 /∗ 1 ∗/

∗sql strm ≪ ∗static cast⟨string ∗⟩(value) ≪ ␣ ; #endif

} if (up) temp strm ≪ ␣ ␣ ≪ up query ctr ; else temp strm ≪ ␣ ␣ ; temp strm ≪ endl ; if (and node) {

temp strm ≪ ␣ ␣ ≪ and node query ctr ; } else temp strm ≪ ␣ ␣ ; temp strm ≪ endl ; if (or node) {

temp strm ≪ ␣ ␣ ≪ or node query ctr ; } else temp strm ≪ ␣ ␣ ; temp strm ≪ endl ; if (or node) {

temp strm ≪ ␣ ␣ ≪ xor node query ctr ; } else temp strm ≪ ␣ ␣ ; temp strm ≪ endl ; if (and node) {

temp strm ≪ ␣ ␣ ≪ endl ;

∗where strm 0 ≪ endl ;

and node generate sql string (scanner node, database type, sql strm, select strm, from strm,

where strm 0 , where strm 1 , first select , first from, first where, field flags , return str ); } if (or node) {

temp strm ≪ ␣ ␣ ≪ endl ;

∗where strm 0 ≪ endl ;

or node generate sql string (scanner node, database type, sql strm, select strm, from strm,

where strm 0 , where strm 1 , first select , first from, first where, field flags , return str ); } if (xor node) {

temp strm ≪ ␣ ␣ ≪ endl ;

∗where strm 0 ≪ endl ;

xor node generate sql string (scanner node, database type, sql strm, select strm, from strm,

where strm 0 , where strm 1 , first select , first from, first where, field flags , return str ); }

149. ⟨ Define Query Type functions 83 ⟩ +≡

if (query ctr > 0) ∗where strm 0 ≪ close parenthesis str ;

150. Write streams to ∗sql strm. [LDF 2006.12.05.] ⟨ Define Query Type functions 83 ⟩ +≡

if (query ctr ≡ 0) {

∗sql strm ≪ select strm str ( ) ≪ from strm str ( ) ≪ where strm 0 str ( ) ≪ endl ≪

where strm 1 str ( ); }

151. Print debuggging output to terminal. [LDF 2006.12.05.] ⟨ Define Query Type functions 83 ⟩ +≡

if (query ctr ≡ 0) temp strm ≪ endl ≪ ␣ ␣ ≪ endl ≪ sql strm str ( ) ≪ endl ≪ ␣ ␣ ␣ ␣ ; 152. Store string and return. [LDF 2006.12.01.] ⟨ Define Query Type functions 83 ⟩ +≡ #ifdef

temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif ∗return str = sql strm str ( ); return 0; } /∗ Query Type ::generate sql string ∗/

153. Putting Query Type::generate sql string together. [LDF 2006.10.31.]

80 PUTTING QUERY TYPE::GENERATE SQL STRING TOGETHERIWF Metadata Harvester III §154

154. This is what’s compiled.

⟨ Include files 10 ⟩

  ⟨ qtgensql.web 120 ⟩

using namespace std;

using namespace Scan Parse;

⟨ Define Query Type functions 83 ⟩

155. datasource type (dtsrctyp.web). [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Created this file.

⟨ dtsrctyp.web 155 ⟩ ≡

static char id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 6 and 8. This code is used in section 182.

156. Include files. ⟨ Include files 10 ⟩ +≡ #include #ifdef #include #else #include #endif #include #include #include #include #include

157. Preprocessor macro calls. ⟨ Preprocessor macro calls 19 ⟩ +≡ #ifdef #pragma once #endif

158. Forward declarations. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this section.

⟨ Forward declarations 13 ⟩ +≡ class Scanner Type; typedef Scanner Type ∗Scanner Node; class Datasource Type; typedef Datasource Type ∗Datasource Node; class Id Type; typedef Id Type ∗Id Node;

§159  IWF Metadata Harvester III  CLASS DATASOURCE TYPE DECLARATION 81

159. class datasource type declaration. . [LDF 2006.12.08.] The forward declaration of Datasource Type is needed in order to be able to define Datasource Node

using typedef . [LDF 2006.12.08.]

Log

Added this section.

⟨ Declare class Datasource Type 159 ⟩ ≡ class Datasource Type; typedef Datasource Type ∗Datasource Node; class Datasource Type {

⟨ friend declarations for class Datasource Type 160 ⟩ private: unsigned short type;

static map⟨unsigned short, string⟩ datasource type map; string name; void ∗value; Scanner Node scanner node;

public: ⟨ Declare static Datasource Type constants 161 ⟩

⟨ Declare Datasource Type functions 167 ⟩ };

This code is used in sections 182 and 183.

160. friend declarations for class datasource type. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this section.

⟨ friend declarations for class Datasource Type 160 ⟩ ≡

friend int yyparse(void ∗);

This code is used in section 159.

161. Declare static datasource type constants. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this section with the declaration of .

[LDF 2006.12.08.] Added the declarations of  ,  ,  , and  .

⟨ Declare static Datasource Type constants 161 ⟩ ≡ static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ;

See also section 164. This code is used in section 159.

82  DECLARE STATIC DATASOURCE TYPE CONSTANTS  IWF Metadata Harvester III §162

162. ⟨ Initialize static Datasource Type constants 162 ⟩ ≡

const unsigned short Datasource Type :: = 0; const unsigned short Datasource Type :: = 1; const unsigned short Datasource Type :: = 2; const unsigned short Datasource Type :: = 3; const unsigned short Datasource Type :: = 4;

This code is used in section 182.

163. Initialize static Datasource Type variables. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this section with the declaration of datasource type map.

⟨ Initialize static Datasource Type variables 163 ⟩ ≡

map⟨unsigned short, string⟩ Datasource Type ::datasource type map;

This code is used in section 182.

164. Types for datasource type. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this section.

[LDF 2006.11.13.] Added static const unsigned short .

⟨ Declare static Datasource Type constants 161 ⟩ +≡

165. datasource type functions. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this section.

166. Constructor and setting functions. [LDF 2006.12.08.]

167. Default constructor. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this function.

⟨ Declare Datasource Type functions 167 ⟩ ≡

Datasource Type(void);

See also sections 169, 171, 175, 177, and 179. This code is used in section 159.

§168  IWF Metadata Harvester III  DEFAULT CONSTRUCTOR 83

168. ⟨ Define Datasource Type functions 168 ⟩ ≡

Datasource Type ::Datasource Type(void)

{ cerr ≪ ␣ ≪ endl ; return;

} /∗ End of default Datasource Type constructor definition. ∗/

See also sections 170, 172, 173, 174, 176, 178, and 180. This code is used in section 182.

169. Set. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this function.

⟨ Declare Datasource Type functions 167 ⟩ +≡ int set(unsigned short datasource type, Scanner Node sscanner node = 0);

170. ⟨ Define Datasource Type functions 168 ⟩ +≡

int Datasource Type ::set(unsigned short datasource type, Scanner Node sscanner node)

{

return 0; } /∗ End of Datasource Type ::set definition. ∗/

171. Destructor. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this function.

⟨ Declare Datasource Type functions 167 ⟩ +≡ ∼Datasource Type(void);

172. ⟨ Define Datasource Type functions 168 ⟩ +≡

Datasource Type ::∼Datasource Type(void){ #if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm; #ifdef

temp strm ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( );

#endif 173. ⟨ Define Datasource Type functions 168 ⟩ +≡ #ifdef

temp strm ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( );

#endif

174. DO NOT delete scanner node! [LDF 2006.12.08.] ⟨ Define Datasource Type functions 168 ⟩ +≡

scanner node = 0;

return; } /∗ End of ∼Datasource Type definition. ∗/

175. Assignment. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this function.

⟨ Declare Datasource Type functions 167 ⟩ +≡ Datasource Node operator=(const Datasource Type &d); 176. ⟨ Define Datasource Type functions 168 ⟩ +≡

Datasource Node Datasource Type ::operator=(const Datasource Type &d) {

#if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm; scanner node = d.scanner node;

#ifdef temp strm ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

if (this ≡ &d) { #ifdef

temp strm ≪ ␣ ␣ ≪ endl ≪

␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return this ; } /∗ if (this ≡ &d) ∗/ type = d.type;

#ifdef temp strm ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return this ; } /∗ End of Datasource Type ::operator=(const Datasource Type d) definition. ∗/

177. Initialize type maps. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this function.

[LDF 2006.12.08.] Added code for  ,  ,  , and  .

⟨ Declare Datasource Type functions 167 ⟩ +≡

static int initialize type maps (void);

178. ⟨ Define Datasource Type functions 168 ⟩ +≡

int Datasource Type ::initialize type maps (void) {

datasource type map[  ] =  ;
datasource type map[  ] =  ;
datasource type map[  ] =  ;
datasource type map[  ] =  ;
datasource type map[  ] =  ;

return 0; } /∗ End of Datasource Type ::initialize type maps definition. ∗/

179. Show. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this function.

⟨ Declare Datasource Type functions 167 ⟩ +≡ int show (string s = , Scanner Node sscanner node = 0);

180. ⟨ Define Datasource Type functions 168 ⟩ +≡

int Datasource Type ::show (string s, Scanner Node sscanner node) {

stringstream temp strm;

if (scanner node ≡ 0 ∧ sscanner node ≠ 0) scanner node = sscanner node;

temp strm ≪ s ≪ endl ≪ ␣ ␣ ≪ datasource type map[type] ≪ ␣ ≪ type ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( ); if (scanner node ≠ 0 ∧ scanner node log strm.is open( )) scanner node log strm ≪ temp strm; return 0;

} /∗ End of Datasource Type ::show definition. ∗/

181. Putting datasource type together. [LDF 2006.12.08.]

182. This is what’s compiled.

⟨ Include files 10 ⟩

⟨ dtsrctyp.web 155 ⟩

using namespace std; using namespace Scan Parse; ⟨ Forward declarations 13 ⟩ ⟨ Declare class Datasource Type 159 ⟩ ⟨ Initialize static Datasource Type constants 162 ⟩ ⟨ Initialize static Datasource Type variables 163 ⟩ ⟨ Define Datasource Type functions 168 ⟩

§183  IWF Metadata Harvester III  PUTTING DATASOURCE TYPE TOGETHER 87

183. This is what’s written to dtsrctyp.h. ⟨ 183 ⟩ ≡ #ifndef #define 1

⟨ Preprocessor macro calls 19 ⟩

using namespace std;

⟨ Forward declarations 13 ⟩

⟨ Declare class Datasource Type 159 ⟩

#endif  /∗  is defined. ∗/

184. id type (idtype.web). [LDF 2006.11.01.]

Log

[LDF 2006.11.01.] Created this file.

⟨ idtype.web 184 ⟩ ≡

static char id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 6 and 8. This code is used in section 207.

185. Include files. ⟨ Include files 10 ⟩ +≡ #include #ifdef #include #else #include #endif #include #include #include #include

186. Preprocessor macro calls. ⟨ Preprocessor macro calls 19 ⟩ +≡ #ifdef #pragma once #endif 187. Forward declarations. [LDF 2006.10.31.] ⟨ Forward declarations 13 ⟩ +≡

class Scanner Type; typedef Scanner Type ∗Scanner Node; struct Id Type; typedef Id Type ∗Id Node;

188. struct id type declaration. [LDF 2006.10.17.]

Log

[LDF 2006.11.21.] Added unsigned short subtype. It’s needed for strings .

[LDF 2006.12.01.] Added static map⟨unsigned short, string⟩ subtype map.

⟨ Declare struct Id Type 188 ⟩ ≡

struct Id Type { friend class Scanner Type; string name; void ∗value; unsigned short type; unsigned short subtype; Id Node up; Id Node left ; Id Node right ; static map⟨unsigned short, string⟩ subtype map; Scanner Node scanner node; ⟨ Declare Id Type functions 195 ⟩ ⟨ Declare static Id Type constants 189 ⟩

};

This code is used in sections 207 and 208.

189. static Id Type constants.

Log

[2006.11.21.] Added this section with the declarations of the static const unsigned shorts , , and . These types must be declared in struct Id Type, because the Standard C^{++} library type string is used to represent the string type in the Scantest language.

⟨ Declare static Id Type constants 189 ⟩ ≡ static const unsigned short ; static const unsigned short ; static const unsigned short ;

This code is used in section 188.

§190  IWF Metadata Harvester III  STATIC ID TYPE CONSTANTS 89

190.

Log

[2006.11.21.] Added this section with the initializations of Added this section with the declarations of the

static const unsigned shorts  ,  , and  .

⟨ Initialize static Id Type constants 190 ⟩ ≡ const unsigned short Id Type :: = 1; const unsigned short Id Type :: = 2; const unsigned short Id Type :: = 3;

This code is used in section 207.

191. Declare static Id Type variables. [LDF 2006.12.01.] Id Type ::subtype map needs to be declared outside of the class declaration. It is initialized in the function

initialize subtype map, which is called in main. [LDF 2006.12.01.]

Log

[2006.12.01.] Added this section.

⟨ Declare static Id Type variables 191 ⟩ ≡

map⟨unsigned short, string⟩ Id Type ::subtype map;

This code is used in section 207.

192. id type functions. [LDF 2006.11.01.]

Log

[LDF 2006.11.01.] Added this section.

193. Constructors and setting functions. [LDF 2006.11.01.]

Log

[LDF 2006.11.01.] Added this section.

194. Default constructor. [LDF 2006.11.01.]

Log

[2006.10.31.] Added this function.

[LDF 2006.11.02.] Now setting Scanner Node scanner node = 0.

195. ⟨ Declare Id Type functions 195 ⟩ ≡

Id Type(void);

See also sections 198, 201, and 204. This code is used in section 188.

196. ⟨ Define Id Type functions 196 ⟩ ≡

Id Type ::Id Type(void) {

name = ; value = 0; type = 0; subtype = 0; up = 0; left = 0; right = 0; scanner node = 0; return;

} /∗ End of the default Id Type constructor definition. ∗/

See also sections 199, 202, and 205. This code is used in section 207.

197. Destructor. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this function.

198. ⟨ Declare Id Type functions 195 ⟩ +≡

∼Id Type(void); 199. ⟨ Define Id Type functions 196 ⟩ +≡

Id Type ::∼Id Type(void) {

#if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm; #ifdef

temp strm ≪ ␣ ≪ endl ≪ ␣ ␣ ≪ name ≪ ≪ endl ≪

␣ ␣ ≪ Scan Parse ::token map[type] ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

if (type ≡ ) { delete static cast⟨Query Node⟩(value); value = 0;

} delete left ; delete right ;

#ifdef temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return; #undef

} /∗ End of ∼Id Type definition. ∗/

200. Initialize subtype map. [LDF 2006.12.01.]

Log

[LDF 2006.12.01.] Added this function.

201. ⟨ Declare Id Type functions 195 ⟩ +≡

static int initialize subtype map(Scanner Node s = 0);

92  INITIALIZE SUBTYPE MAP  IWF Metadata Harvester III §202

202. ⟨ Define Id Type functions 196 ⟩ +≡

int Id Type ::initialize subtype map(Scanner Node s) {

#if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm; #ifdef

temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (s ≠ 0) s log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

Id Type ::subtype map[  ] =  ;
Id Type ::subtype map[  ] =  ;
Id Type ::subtype map[  ] =  ;

#ifdef temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (s ≠ 0) s log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return 0; #undef

} /∗ End of Id Type ::initialize subtype map definition. ∗/

203. Show. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this function.

204. ⟨ Declare Id Type functions 195 ⟩ +≡

int show (string = ); 205. ⟨ Define Id Type functions 196 ⟩ +≡

int Id Type ::show (string s) {

#if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm; if (s ≡ ) s = ;

temp strm ≪ s ≪ endl ≪  ␣  ␣ ≪ name ≪  ≪ endl ≪  ␣  ␣ ≪
Scan Parse ::token map[type] ≪  ≪ endl ≪  ␣  ␣ ≪ subtype map[subtype] ≪

endl ; if (value ≡ 0) temp strm ≪ ␣␣ ␣ ≪ endl ; else temp strm ≪ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#ifdef temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return 0; #undef

} /∗ End of Id Type ::show definition. ∗/

206. Putting id type together. [LDF 2006.11.01.]

207. This is what’s compiled.

⟨ Include files 10 ⟩

⟨ idtype.web 184 ⟩

using namespace std; ⟨ Forward declarations 13 ⟩ ⟨ Declare struct Id Type 188 ⟩ ⟨ Initialize static Id Type constants 190 ⟩ ⟨ Declare static Id Type variables 191 ⟩ ⟨ Define Id Type functions 196 ⟩

94  PUTTING ID TYPE TOGETHER  IWF Metadata Harvester III §208

208. This is what’s written to idtype.h. ⟨ 208 ⟩ ≡

⟨ Preprocessor macro calls 19 ⟩

using namespace std;

⟨ Forward declarations 13 ⟩

⟨ Declare struct Id Type 188 ⟩

209. Scanner Type (scnrtype.web). [LDF 2006.10.17.]

Log

[LDF 2006.10.31.] Created this file.

⟨ scnrtype.web 209 ⟩ ≡

static char id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 6 and 8. This code is used in section 243.

210. Include files. ⟨ Include files 10 ⟩ +≡ #include #ifdef #include #else #include #endif #include #include #include #include #include #include

211. Preprocessor macro calls. ⟨ Preprocessor macro calls 19 ⟩ +≡ #ifdef #pragma once #endif

212. Forward declarations. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this section.

⟨ Forward declarations 13 ⟩ +≡ class Scanner Type; typedef Scanner Type ∗Scanner Node; class Query Type; typedef Query Type ∗Query Node; class Id Type;

typedef Id Type ∗Id Node;

213. struct Token Type declaration. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this declaration.

[LDF 2006.11.02.] Added constructor.

⟨ Declare struct Token Type 213 ⟩ ≡

struct Token Type { unsigned int type; value; ⟨ Declare Token Type functions 215 ⟩

};

This code is used in sections 243 and 244.

214. Token Type functions. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this section.

215. Default Constructor. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this function.

⟨ Declare Token Type functions 215 ⟩ ≡

Token Type(void);

See also section 217. This code is used in section 213.

216. ⟨ Define Token Type functions 216 ⟩ ≡

Token Type ::Token Type(void)

{ type = 0; value.int value = 0; return;

}

See also section 218. This code is used in section 243.

96  NON-DEFAULT CONSTRUCTOR  IWF Metadata Harvester III §217

217. Non-Default Constructor. [LDF 2006.11.02.] Log

[2006.11.02.] Added this function. ⟨ Declare Token Type functions 215 ⟩ +≡

Token Type(unsigned int ttype, vvalue);

§218  IWF Metadata Harvester III  NON-DEFAULT CONSTRUCTOR 97

218. ⟨ Define Token Type functions 216 ⟩ +≡ Token Type ::Token Type(unsigned int ttype, vvalue): type(ttype), value(vvalue)

{

return; }

219. class Scanner Type declaration. This is the type passed to the functions yylex and yyparse as a parameter. [LDF 2006.10.17.]

Log

[LDF 2006.10.31.] Added typedef Scanner Type ∗Scanner Node.

[LDF 2006.10.31.] Working on this declaration.

[LDF 2006.11.02.] Added Query Node curr query .

[LDF 2006.11.03.] Added vector⟨float⟩ float vector .

⟨ Declare class Scanner Type 219 ⟩ ≡ class Scanner Type { ⟨ friend declarations for Scanner Type 220 ⟩ char in filename[128]; char log filename[128]; ifstream in strm; map⟨string, Id Type ∗⟩ id map; stack < Token Type > token stack ; vector⟨float⟩ float vector ;

public: ofstream log strm; ⟨ Declare Scanner Type functions 226 ⟩ } ;

This code is used in sections 243 and 244.

220. friend declarations for Scanner Type. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

⟨ friend declarations for Scanner Type 220 ⟩ ≡ friend int main(int, char ∗[ ]); friend int yylex ( ∗ , void ∗ ) ; friend int yyparse(void ∗);

See also section 222. This code is used in section 219.

221. friend declarations for parser rule functions. [LDF 2006.10.31.]

98 FRIEND DECLARATIONS FOR FUNCTIONS FOR GROUP STATEMENTSIWF Metadata Harvester III §222

222. friend declarations for functions for group statements. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section with the friend declarations for Scan Parse ::start local query func and Scan Parse ::end local query func.

[LDF 2006.11.01.] Changed the name of Scan Parse ::start local query func to Scan Parse ::start local database query func and the name of Scan Parse ::end local query func to Scan Parse ::end query func.

[LDF 2006.11.01.] Added the friend declaration of Scan Parse ::declare variable func.

[LDF 2006.11.01.] Added the char ∗name argument to Scan Parse ::declare variable func.

[LDF 2006.11.02.] Changed the return value of Scan Parse ::declare variable func from int to void ∗.

[LDF 2006.11.02.] Added the friend declaration of Scan Parse ::variable func.

[LDF 2006.11.02.] Added the friend declaration of Scan Parse ::query assignment func 0 .

[LDF 2006.12.15.] Added the friend declaration of Scan Parse ::datetime assignment func 0 .

[LDF 2006.12.18.] Added the friend declaration of Scan Parse ::datetime assignment func 1 .

[LDF 2006.12.19.] Added the friend declaration of Scan Parse ::query assignment func 1 .

⟨ friend declarations for Scanner Type 220 ⟩ +≡ friend void ∗Scan Parse ::variable func(void ∗v, char ∗name); friend Id Node Scan Parse ::declare variable func(void ∗v, const unsigned short type, char

∗name); friend void ∗Scan Parse ::query assignment func 0 (void ∗v, void ∗object , unsigned int

assignment type, unsigned int arg 0 , unsigned int arg 1 , void ∗value, bool negate); friend int Scan Parse ::query assignment func 1 (Scanner Node scanner node, Id Node

&curr id node, void ∗&field specifier , int assignment operator , int negation optional , int match term optional , void ∗&v, int type);

friend int Scan Parse ::start local database query func(void ∗v);

friend int Scan Parse ::end query func(void ∗v);

friend int Scan Parse ::datetime assignment func 0 (void ∗v, Date Time Node

&curr date time node, int specifier , int op, void ∗val , int type); friend int Scan Parse ::datetime assignment func 1 (void ∗v, Date Time Node &d, int op, void

∗&vec);

223. Scanner Type functions. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

224. Constructors and setting functions. [LDF 2006.10.31.] 225. Default constructor. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this function.

[LDF 2006.11.02.] Now initializing Query Node query node to 0.

226. ⟨ Declare Scanner Type functions 226 ⟩ ≡

Scanner Type(void);

See also sections 228, 230, and 232. This code is used in section 219.

227. ⟨ Define Scanner Type functions 227 ⟩ ≡

Scanner Type ::Scanner Type(void)

{

return; } /∗ End of the default Scanner Type constructor definition. ∗/

See also sections 229, 231, 233, 234, 235, 236, 237, 238, 239, 240, and 241. This code is used in section 243.

228. Destructor. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this function.

⟨ Declare Scanner Type functions 226 ⟩ +≡ ∼Scanner Type(void); 229. ⟨ Define Scanner Type functions 227 ⟩ +≡

Scanner Type ::∼Scanner Type(void) {

#if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm; #ifdef

temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (log strm.is open( )) log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

for (map⟨string, Id Type ∗⟩::iterator iter = id map.begin( ); iter ≠ id map.end ( ); ^{++}iter ) {

delete iter second ; } id map.clear ( ); in strm.close( );

#ifdef temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (log strm.is open( )) log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif log strm.close( ); return;

#undef } /∗ End of the ∼Scanner Type definition. ∗/

230. Initialize id map. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this function.

[LDF 2006.11.14.] Removed the code that declared a variable and set this curr query to point to it. I now plan to use curr query for parsing subqueries.

⟨ Declare Scanner Type functions 226 ⟩ +≡ int initialize id map(void);

§231  IWF Metadata Harvester III  INITIALIZE ID MAP 101

231. ⟨ Define Scanner Type functions 227 ⟩ +≡

int Scanner Type ::initialize id map(void)

{ #if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm; #ifdef

temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (log strm.is open( )) log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif #ifdef

temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (log strm.is open( )) log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return 0; #undef

} /∗ End of the Scanner Type ::initialize id map definition. ∗/

232. Lookup. [LDF 2006.11.03.]

Log

[LDF 2006.11.03.] Added this function.

102  LOOKUP  IWF Metadata Harvester III §233

⟨ Declare Scanner Type functions 226 ⟩ +≡ Id Node lookup(char ∗name, bool create = false, unsigned int type = ); 233. ⟨ Define Scanner Type functions 227 ⟩ +≡

Id Node Scanner Type ::lookup(char ∗name, bool create, unsigned int type){ #if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm; #ifdef

temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node curr id node; map⟨string, Id Node⟩::iterator iter = id map.find (name); if (iter ≡ id map.end ( )) { curr id node = 0;

}

else /∗ iter ≠ id map.end ( ) ∗/

{ curr id node = iter second ;

234. WARNING: type ≠ curr id node type. [LDF 2006.11.03.] ⟨ Define Scanner Type functions 227 ⟩ +≡

if (type ≠ curr id node type) {

temp strm ≪ ␣␣ ␣ ≪ endl ≪ ␣ ␣ ≪ Scan Parse ::token map[type] ≪ ␣ ␣ ␣ ␣ ␣ ␣ ≪ ␣ ␣ ≪ Scan Parse ::token map[curr id node type] ≪ ≪ endl ≪ ␣ ␣ ␣ ≪ Scan Parse ::token map[curr id node type] ≪ ␣ ␣ ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( ); type = curr id node type;

} /∗ if (type ≠ curr id node type) ∗/

235. ⟨ Define Scanner Type functions 227 ⟩ +≡

§236  IWF Metadata Harvester III  LOOKUP 103

} /∗ else (iter ≠ id map.end ( )) ∗/ 236. name doesn’t refer to an array. [LDF 2006.11.03.] ⟨ Define Scanner Type functions 227 ⟩ +≡

if (strchr (name, ¥ ) ≡ 0) { if (curr id node ≠ 0) return curr id node; else if (create ≡ true) {

curr id node = new Id Type; curr id node name = name; curr id node type = type; id map[name] = curr id node; return curr id node;

}

else /∗ curr id node ≡ 0 and create ≡ false ∗/ {

#ifdef

temp strm ≪ ␣  ≪  ␣   ␣     ␣   ␣        ␣   ␣

        ␣  ␣  ≪ endl ≪  ␣        ␣     ␣      ␣     ␣ ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return 0; } /∗ else (curr id node ≡ 0 and create ≡ false) ∗/

} /∗ if (strchar (name, ¥ ) ≡ 0) ∗/

237. name refers to an array. [LDF 2006.11.03.] ⟨ Define Scanner Type functions 227 ⟩ +≡

else /∗ strchar (name, ¥ ) ≠ 0 ∗/ { stringstream curr name strm; string curr name; { /∗ Beginning of group ∗/

int j = 0;

for (int i = 0; i < strlen(name); ^{++}i) { if (name[i] ≡ ¥ ) curr name strm ≪ ≪ float vector [j^{++}] ≪ ; else curr name strm ≪ name[i];

} /∗ for ∗/ } /∗ End of group ∗/ curr name = curr name strm.str ( );

#ifdef temp strm ≪ ␣ ␣ ≪ curr name ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif 238. No elements on array. [LDF 2006.11.03.] ⟨ Define Scanner Type functions 227 ⟩ +≡

if (curr id node left ≡ 0) { #ifdef

temp strm ≪ ≪ name ≪ ␣ ␣ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

239. create ≡ false. Return 0. [LDF 2006.11.03.] ⟨ Define Scanner Type functions 227 ⟩ +≡

if (create ≡ false) { #ifdef

temp strm ≪ ␣ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return 0; } /∗ if (create ≡ false) ∗/

240. create ≡ true. Create array element. [LDF 2006.11.03.] ⟨ Define Scanner Type functions 227 ⟩ +≡

else /∗ create ≡ true ∗/ {

#ifdef temp strm ≪ ␣ ␣ ␣ ␣ ≪ curr name ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif curr id node left = new Id Type; curr id node left name = curr name; curr id node left type = type; curr id node left up = curr id node; return curr id node left ;

} /∗ else (create ≡ true) ∗/ } /∗ if (curr id node left ≡ 0) ∗/ 241. Array isn’t empty. Traverse the tree. [LDF 2006.11.03.] ⟨ Define Scanner Type functions 227 ⟩ +≡

else /∗ curr id node left ≠ 0 ∗/ {

#ifdef temp strm ≪ ≪ name ≪ ␣ ␣ ␣ ␣␣ ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif curr id node = curr id node left ; for ( ; ; ) {

if (curr name ≡ curr id node name) { #ifdef

temp strm ≪ ≪ curr name ≪ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return curr id node; } /∗ if (curr name ≡ curr id node name) ∗/ else if (curr name.compare(curr id node name) < 0) {

#ifdef

temp strm ≪ ≪ curr name ≪ ␣ ␣ ≪ curr id node name ≪ ␣␣ ≪

␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

if (curr id node left ≠ 0) {

#ifdef temp strm ≪ ≪ curr id node name ≪ ␣ ␣␣ ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif curr id node = curr id node left ; continue;

} else /∗ curr id node left ≡ 0 ∗/ {

#ifdef temp strm ≪ ≪ curr id node name ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

if (create ≡ true) {

#ifdef temp strm ≪ ␣ ␣ ␣ ␣ ≪ curr name ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif curr id node left = new Id Type; curr id node left name = curr name; curr id node left type = type; curr id node left up = curr id node; return curr id node left ;

} /∗ if (create ≡ true) ∗/ else /∗ create ≡ false ∗/ {

#ifdef

temp strm ≪ ␣ ␣ ␣␣ ≪ ␣ ␣ ␣ ␣ ␣ ≪

curr name ≪ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return 0; } /∗ else (create ≡ false) ∗/

} /∗ else (curr id node left ≡ 0) ∗/ } /∗ else if (curr name.compare(curr id node name) < 0) ∗/ else if (curr name.compare(curr id node name) > 0) {

#ifdef

temp strm ≪ ≪ curr name ≪ ␣ ␣ ≪ curr id node name ≪ ␣␣ ≪

␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

if (curr id node right ≠ 0) {

#ifdef temp strm ≪ ≪ curr id node name ≪ ␣ ␣␣ ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( );

temp strm.str ( );

#endif curr id node = curr id node right ; continue;

} /∗ if (curr id node right ≠ 0) ∗/ else /∗ curr id node right ≡ 0 ∗/ {

#ifdef temp strm ≪ ≪ curr id node name ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

if (create ≡ true) {

#ifdef temp strm ≪ ␣ ␣ ␣ ␣ ≪ curr name ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif curr id node right = new Id Type; curr id node right name = curr name; curr id node right type = type; curr id node right up = curr id node; return curr id node right ;

} /∗ if (create ≡ true) ∗/ else /∗ create ≡ false ∗/ {

#ifdef

temp strm ≪ ␣ ␣ ␣␣ ≪ ␣ ␣ ␣ ␣ ␣ ≪

curr name ≪ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return 0; } /∗ else (create ≡ false) ∗/

} /∗ else (curr id node right ≡ 0) ∗/ } /∗ else if (curr name.compare(curr id node name) > 0) ∗/

} /∗ for ∗/ } /∗ else (curr id node left ≠ 0) ∗/ } /∗ else (strchar (name, ¥ ) ≠ 0) ∗/

#ifdef temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return 0; #undef

} /∗ End of Scanner Type ::lookup definition. ∗/

242. Putting Scanner Type together. [LDF 2006.10.31.]

243. This is what’s compiled.

⟨ Include files 10 ⟩

⟨ scnrtype.web 209 ⟩

using namespace std; ⟨ Forward declarations 13 ⟩ ⟨ Declare struct Token Type 213 ⟩ ⟨ Declare class Scanner Type 219 ⟩ ⟨ Define Token Type functions 216 ⟩ ⟨ Define Scanner Type functions 227 ⟩

§244  IWF Metadata Harvester III  PUTTING SCANNER TYPE TOGETHER 109

244. This is what’s written to scnrtype.h. ⟨ 244 ⟩ ≡ #ifndef #define 1

⟨ Preprocessor macro calls 19 ⟩

using namespace std; #include

using namespace Scan Parse;

⟨ Forward declarations 13 ⟩

⟨ Declare struct Token Type 213 ⟩

⟨ Declare class Scanner Type 219 ⟩

#endif  /∗  is defined. ∗/

245. Scanning (scanner.web). [LDF 2006.10.17.]

Log

[LDF 2006.10.17.] Created this file.

⟨ scanner.web 245 ⟩ ≡

static char id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 6 and 8. This code is used in section 357.

246. Include files. ⟨ Include files 10 ⟩ +≡ #include #ifdef #include #else #include #endif #include #include #include #include

247. Preprocessor macro calls. ⟨ Preprocessor macro calls 19 ⟩ +≡ #ifdef #pragma once #endif

248. Forward declarations. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this section.

⟨ Forward declarations 13 ⟩ +≡ class Scanner Type;

110  FORWARD DECLARATIONS  IWF Metadata Harvester III §248

typedef Scanner Type ∗Scanner Node;

class Query Type;

typedef Query Type ∗Query Node;

class Id Type;

typedef Id Type ∗Id Node;

class Date Time Type;

typedef Date Time Type ∗Date Time Node;

249. Type declarations for the scanner. [LDF 2006.10.17.]

250. Declare namespace Scan Parse. [LDF 2006.10.17.]

251. Declaration with initializations for compiliation. [LDF 2006.10.19.]

Log

[LDF 2006.10.19.] Added this section.

[LDF 2006.11.01.] Removed const unsigned int . Changed const unsigned int to .

[LDF 2006.11.02.] Added extern const unsigned int and extern const unsigned int .

⟨ Declare namespace Scan Parse 251 ⟩ ≡

namespace Scan Parse { extern const unsigned int = 0; extern const unsigned int = 1; extern const unsigned int = 2; extern const unsigned int = 3; extern const unsigned int = 4; ⟨ Declare struct Keyword Type 257 ⟩ ⟨ Declare keyword map 259 ⟩ ⟨ Declare token map 262 ⟩ ⟨ Declare Scan Parse functions 264 ⟩

} /∗ End of namespace Scan Parse declaration. ∗/

This code is used in section 357.

252. extern declaration of namespace Scan Parse. [LDF 2006.10.19.] ⟨ extern declaration of namespace Scan Parse 252 ⟩ ≡

namespace Scan Parse {

See also sections 254 and 255. This code is used in section 358.

253. Constants. [LDF 2006.10.19.]

§254  IWF Metadata Harvester III  EXTERN DECLARATION OF NAMESPACE SCAN PARSE 111

254. Scanner state (“start conditions”). [LDF 2006.10.19.] ⟨ extern declaration of namespace Scan Parse 252 ⟩ +≡

extern const unsigned int ; extern const unsigned int ; extern const unsigned int ; extern const unsigned int ; extern const unsigned int ;

255. ⟨ extern declaration of namespace Scan Parse 252 ⟩ +≡

struct Keyword Type; ⟨ extern keyword map declaration 260 ⟩ ⟨ extern token map declaration 263 ⟩ ⟨ Declare Scan Parse functions 264 ⟩ } /∗ End of extern declaration of namespace Scan Parse. ∗/

256. Keywords. [LDF 2006.10.19.]

257. Declare struct Keyword Type. [LDF Undated.]

Log

[LDF 2006.11.01.] Tried to change Keyword Type from a struct to a class, but it didn’t work.

⟨ Declare struct Keyword Type 257 ⟩ ≡

struct Keyword Type { string name; int value; string value name;

};

This code is used in section 251.

258. Keyword map. [LDF 2006.10.19.]

Log

[LDF 2006.10.19.] Added this section.

259. Declare keyword map. [LDF 2006.10.19.] ⟨ Declare keyword map 259 ⟩ ≡

map⟨string, Keyword Type ∗⟩ keyword map;

This code is used in section 251.

112  DECLARE KEYWORD MAP  IWF Metadata Harvester III §260

260. extern declaration of keyword map for the header file. [LDF 2006.10.19.] ⟨ extern keyword map declaration 260 ⟩ ≡

extern map⟨string, Keyword Type ∗⟩ keyword map;

This code is used in section 255.

261. Token map. [LDF 2006.11.01.]

Log

[LDF 2006.11.01.] Added this section.

262. Declare token map. [LDF 2006.11.01.] ⟨ Declare token map 262 ⟩ ≡

map⟨unsigned int, string⟩ token map;

This code is used in section 251.

263. extern declaration of token map for the header file. [LDF 2006.11.01.] ⟨ extern token map declaration 263 ⟩ ≡

extern map⟨unsigned int, string⟩ token map;

This code is used in section 255.

264. Initialize keyword map and token map. [LDF 2006.10.19.]

Log

[LDF 2006.11.03.] Added code for . [LDF 2006.12.07.] Added code for . [LDF 2006.12.12.] Added code for . [LDF 2006.12.14.] Added code for .

⟨ Declare Scan Parse functions 264 ⟩ ≡

int initialize maps (void);

See also sections 287, 291, 292, 294, 295, 296, 297, 299, and 300. This code is used in sections 251 and 255.

265. ⟨ Define Scan Parse functions 265 ⟩ ≡

int Scan Parse ::initialize maps (void){ Keyword Type ∗curr keyword ;

This code is used in section 357.

See also sections 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 279, 280, 281, 282, 283, 284, 285, and 288.

§266  IWF Metadata Harvester III  INITIALIZE KEYWORD MAP AND TOKEN MAP 113

266. Punctuation. [LDF 2006.10.19.] ⟨ Define Scan Parse functions 265 ⟩ +≡

114  INITIALIZE KEYWORD MAP AND TOKEN MAP  IWF Metadata Harvester III §266

curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; 267. Assignment. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section with code for the following keywords:  ,  ,  ,

, and .

[LDF 2006.11.14.] Added code for  ,  ,  , and  .

⟨ Define Scan Parse functions 265 ⟩ +≡ curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name;

268. Arithmetical Operations. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this section with code for  ,  ,  , and  .

⟨ Define Scan Parse functions 265 ⟩ +≡ curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; 269. Types with values. [LDF 2006.10.19.] ⟨ Define Scan Parse functions 265 ⟩ +≡

curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name;

270. Control. [LDF 2006.10.19.] ⟨ Define Scan Parse functions 265 ⟩ +≡

curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; 271. Queries. [LDF 2006.10.19.]

Log

[2006.11.16.] Added code for .

⟨ Define Scan Parse functions 265 ⟩ +≡ curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; 272. Match types. [LDF 2006.12.11.]

Log

[2006.12.11.] Added this section with code for  and  .

[LDF 2006.12.12.] Added code for .

⟨ Define Scan Parse functions 265 ⟩ +≡ curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; 273. Datasources. [LDF 2006.12.08.]

Log

[2006.11.16.] Added this section with code for .

⟨ Define Scan Parse functions 265 ⟩ +≡ curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name;

274. Datetime. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this section with code for .

⟨ Define Scan Parse functions 265 ⟩ +≡ curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; 275. Datetimes. [LDF 2006.12.15.]

Log

[2006.12.15.] Added code for ,  ,  ,  ,  , and  .
[LDF 2006.12.18.] Added code for  and  .

⟨ Define Scan Parse functions 265 ⟩ +≡ curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; 276. Predicates and Control Structures. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this section with code for ,  ,  , ,  , ,  ,  , ,  ,  ,
,  , and  .

⟨ Define Scan Parse functions 265 ⟩ +≡ curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; 277. Fields. [LDF 2006.10.19.]

Log

[LDF 2006.12.05.] Added code for .

[LDF 2006.12.12.] Added code for .

[LDF 2006.12.12.] Added code to account for the tokens that refer to additional tables in the OAI database (dc test).

[LDF 2006.12.12.] Added code to account for the tokens that refer to additional tables in the PICA database (PICA DB).

⟨ Define Scan Parse functions 265 ⟩ +≡ curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name;

278. Keywords for database table columns. [LDF 2006.12.14.]

Log

[2006.12.14.] Added this section.

279. Generic. [LDF 2006.12.14.]

Log

[2006.12.14.] Added this section.

⟨ Define Scan Parse functions 265 ⟩ +≡ curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; 280. Names. [2006.12.07.]

Log

[2006.12.07.] Added this section with code for  ,  , and  .

⟨ Define Scan Parse functions 265 ⟩ +≡ curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; 281. Records. [2006.12.07.]

Log

[2006.12.14.] Added this section.

⟨ Define Scan Parse functions 265 ⟩ +≡ curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name;

282. Variables. [LDF Undated.] ⟨ Define Scan Parse functions 265 ⟩ +≡

curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; 283.

Log

[LDF 2006.11.16.] Added code for .

[LDF 2006.12.08.] Added code for .

[LDF 2006.12.15.] Added code for .

⟨ Define Scan Parse functions 265 ⟩ +≡ curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; 284. Commands. [LDF 2006.11.13.]

[LDF 2006.10.19.]

Log

[LDF 2006.11.13.] Added code for  and  .
[LDF 2006.11.13.] Added code for  and  .
[LDF 2006.11.13.] Added code for  ,  , and  .

[LDF 2006.11.16.] Added code for , , , and .

[LDF 2006.11.23.] Added code for .

⟨ Define Scan Parse functions 265 ⟩ +≡ curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name;

285. Control. [LDF 2006.10.19.] ⟨ Define Scan Parse functions 265 ⟩ +≡

curr keyword = new Keyword Type; curr keyword name = ; curr keyword value = ; curr keyword value name = ; keyword map[ ] = curr keyword ; token map[ ] = curr keyword value name; return 0; } /∗ End of Scan Parse ::initialize maps definition. ∗/

286. Show keyword map. [LDF 2006.10.19.]

287. ⟨ Declare Scan Parse functions 264 ⟩ +≡

int show keyword map(Scanner Type ∗scanner node);

§288  IWF Metadata Harvester III  SHOW KEYWORD MAP 135

288. ⟨ Define Scan Parse functions 265 ⟩ +≡

int Scan Parse ::show keyword map(Scanner Type ∗scanner node) {

stringstream temp strm; temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); for (map⟨string, Keyword Type ∗⟩::const iterator iter = keyword map.begin( );

iter ≠ keyword map.end ( ); ^{++}iter ) { temp strm ≪ ␣␣ ≪ iter second name ≪ ␣ ␣␣ ≪ token map[iter second value] ≪

␣ ≪ iter second value ≪ ␣ ≪ ␣ ␣ ␣␣ ≪ iter second value name ≪ endl ;

cerr mutex .Lock ( );

cerr ≪ temp strm.str ( );

cerr mutex .Unlock ( );

if (scanner node) scanner node log strm ≪ temp strm.str ( );

temp strm.str ( ); } /∗ for ∗/ return 0;

} /∗ End of Scan Parse ::show keyword map definition. ∗/

289. Parser rule functions. [LDF 2006.10.31.] These functions are used in the parser rules. They are defined in other files. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

290. Functions for variables. [LDF 2006.11.02.]

136 VARIABLE FUNC  IWF Metadata Harvester III  §291

291. variable func. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this declaration.

⟨ Declare Scan Parse functions 264 ⟩ +≡ void ∗variable func(void ∗v, char ∗name);

292. Functions for declarations. [LDF 2006.11.01.]

Log

[2006.11.01.] Added this declaration. [LDF 2006.11.01.] Added the char ∗name argument. [LDF 2006.11.02.] Changed the return value from int to void ∗.

⟨ Declare Scan Parse functions 264 ⟩ +≡ Id Node declare variable func(void ∗v, const unsigned short type, char ∗name);

293. Functions for assignments. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this section.

294. query assignment func 0. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this declaration.

⟨ Declare Scan Parse functions 264 ⟩ +≡

void ∗query assignment func 0 (void ∗v, void ∗object , unsigned int assignment type, unsigned int arg 0 , unsigned int arg 1 , void ∗value, bool negate);

295. query assignment func 1. [LDF 2006.12.19.]

Log

[LDF 2006.12.19.] Added this declaration.

⟨ Declare Scan Parse functions 264 ⟩ +≡

int query assignment func 1 (Scanner Node scanner node, Id Node &curr id node, void ∗&field specifier , int assignment operator , int negation optional , int match term optional , void ∗&v, int type);

§296  IWF Metadata Harvester III  DATETIME ASSIGNMENT FUNC 0  137

296. datetime assignment func 0. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this declaration.

⟨ Declare Scan Parse functions 264 ⟩ +≡

int datetime assignment func 0 (void ∗v, Date Time Node &curr date time node, int specifier , int op, void ∗val , int type);

297. datetime assignment func 1. [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this declaration.

⟨ Declare Scan Parse functions 264 ⟩ +≡ int datetime assignment func 1 (void ∗v, Date Time Node &d, int op, void ∗&vec);

298. Functions for Group Statements. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

299. Start local database query function. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this function declaration. [LDF 2006.11.01.] Changed the name of this function from Scan Parse ::start local query func to Scan Parse ::start local database query func.

⟨ Declare Scan Parse functions 264 ⟩ +≡ int start local database query func(void ∗);

138  END QUERY FUNCTION  IWF Metadata Harvester III §300

300. End query function. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this function declaration.

[LDF 2006.11.01.] Changed the name of this function from Scan Parse ::end local query func to Scan Parse ::end query func.

⟨ Declare Scan Parse functions 264 ⟩ +≡ int end query func(void ∗);

301. The scanning function yylex. [LDF 2006.10.17.]

Log

[LDF 2006.11.13.] Added code for handling .

⟨ Declare yylex 301 ⟩ ≡

int yylex ( ∗ value, void ∗parameter );

See also section 361. This code is used in sections 358 and 643.

302. ⟨ Define yylex 302 ⟩ ≡

int yylex ( ∗ value, void ∗parameter ){ #if 0 /∗ 1 ∗/ #define #else #undef #endif

using namespace Scan Parse;

stringstream temp strm; stack < unsigned short > state stack ; unsigned short state = ; Scanner Type ∗scanner node = static cast⟨Scanner Type ∗⟩(parameter );

See also sections 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,

327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, and 350. This code is used in section 357.

§303  IWF Metadata Harvester III  THE SCANNING FUNCTION YYLEX 139

303. “Fake” a token. If scanner node token stack isn’t empty, extract the token to be returned and its semantic value from the Token Type object at the top of the stack, pop it from the stack, and return immediately, without reading anything from the input stream. This will happen repeatedly, until scanner node token stack is empty. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this section.

⟨ Define yylex 302 ⟩ +≡

if (scanner node token stack .size( ) > 0) { #ifdef

temp strm ≪ ␣ ␣␣ ␣ ␣ ≪

scanner node token stack .size( ) ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

Token Type curr token = scanner node token stack .top( ); #ifdef

temp strm ≪ ␣ ␣ ≪ token map[curr token.type] ≪ ␣ ≪ curr token.type ≪

≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif if (curr token.type ≡ ) strcpy (value string value, curr token.value.string value); else if (curr token.type ≡ ) value int value = curr token.value.int value; else if (curr token.type ≡ ) value float value = curr token.value.float value; else {

value pointer value = curr token.value.pointer value; curr token.value.pointer value = 0;

} scanner node token stack .pop( ); return curr token.type;

} /∗ if (scanner node token stack .size( ) > 0) ∗/ else {

#ifdef temp strm ≪ ␣ ␣␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif }

140  THE SCANNING FUNCTION YYLEX  IWF Metadata Harvester III §304

304. Open input file. [LDF 2006.10.17.] ⟨ Define yylex 302 ⟩ +≡ #ifdef

temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif #if 0 /∗ 1 ∗/ #ifdef

temp strm ≪ ␣ ␣ ≪ scanner node in filename ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif #endif 305. Main loop. [LDF 2006.10.17.]

Log

[LDF 2006.11.01.] Changed string curr keyword to curr id .

[LDF 2006.11.13.] Added next char .

⟨ Define yylex 302 ⟩ +≡ char curr char = 0; char next char = 0; string curr string = ; string curr id = ; int curr value = 0; string curr integer str = ; string curr float str = ; while (curr char ≠ ) { curr char = scanner node in strm.get ( );

#ifdef temp strm ≪ curr char ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

306. Comments. . Discard characters until end of line. can occur in strings, however. [LDF 2006.10.17.]

Log

[LDF 2006.10.31.] Changed comment character from to .

⟨ Define yylex 302 ⟩ +≡

if (curr char ≡ ∧ (state ≡ ∨ state ≡ ∨ state ≡

∨ state ≡ )) { #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

while (¬(curr char ≡ ∨ curr char ≡ )) { curr char = scanner node in strm.get ( ); if (curr char ≡ ) goto ;

} /∗ Inner while ∗/ #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

142  COMMENTS  IWF Metadata Harvester III §306

#endif } /∗ if (curr char ≡ ) (Discarding comment) ∗/

307. Double-quote symbol. . [LDF 2006.10.17.] ⟨ Define yylex 302 ⟩ +≡

else if (curr char ≡ ) {

308. state ≡ [LDF 2006.10.17.] ⟨ Define yylex 302 ⟩ +≡

if (state ≡ ) { state = state stack .top( ); state stack .pop( );

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ≪ ␣ ␣ ≪ curr string .c str ( ) ≪ endl ≪ ␣ ␣ ␣ ␣ ␣ ␣ ≪ keyword map[ ] value name ≪ ␣ ≪ keyword map[ ] value ≪ ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif strcpy (value string value, curr string .c str ( )); curr string = ; return ;

}  /∗ if (state ≡  ) ∗/

§309  IWF Metadata Harvester III  DOUBLE-QUOTE SYMBOL 143

309. state ≡ . Start collecting string. [LDF 2006.10.18.] ⟨ Define yylex 302 ⟩ +≡

else if (state ≡ ) {

#ifdef temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif state stack .push(state); state = ; curr string = ;

} else if (state ≡ ) {

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪ curr id ≪

endl ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

310. Look up curr id in keyword map and possibly id map. [LDF 2006.10.19.] ⟨ Define yylex 302 ⟩ +≡

⟨ Look up curr id in keyword map and possibly id map 353 ⟩

}  /∗ else if (state ≡  ) ∗/

311. state ≡ . [LDF 2006.11.02.] ⟨ Define yylex 302 ⟩ +≡

else

if (state ≡ ) { #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪

curr integer str ≪ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif value int value = atoi (curr integer str .c str ( )); scanner node in strm.unget ( ); return ;

}  /∗ else if (state ≡  ) ∗/

144  DOUBLE-QUOTE SYMBOL  IWF Metadata Harvester III §312

312. state ≡ . [LDF 2006.11.02.] ⟨ Define yylex 302 ⟩ +≡

else

if (state ≡ ) { #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪

curr float str ≪ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif value float value = atof (curr float str .c str ( )); scanner node in strm.unget ( ); return ;

}  /∗ else if (state ≡  ) ∗/

313. Any other state (shouldn’t occur.) [LDF 2006.11.02.] ⟨ Define yylex 302 ⟩ +≡

else { #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif state stack .push(state); state = ; curr string = ;

} } /∗ else if (curr char ≡ ) ∗/

314. Alphabetical characters and underline character. [LDF 2006.10.18.]

Log

[LDF 2006.12.08.] Now treating underline character like an alphabetical character.

[LDF 2006.12.11.] Added code for common accented characters.

⟨ Define yylex 302 ⟩ +≡

§315  IWF Metadata Harvester III  ALPHABETICAL CHARACTERS AND UNDERLINE CHARACTER 145

else if (isalpha(curr char ) ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨curr char ≡ ∨curr char ≡ ∨curr char ≡ ∨curr char ≡ ∨curr char ≡ ∨curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ∨ curr char ≡ ) { 315. state ≡ . [LDF 2006.10.18.] ⟨ Define yylex 302 ⟩ +≡

if (state ≡ ) { #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ␣ ≪ ␣ ␣ ␣ ␣ ␣ ≪ endl ≪

␣ ␣ ␣ ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif state = ; curr id = ; curr id += curr char ;

}  /∗ if (state ≡  ) ∗/

146  ALPHABETICAL CHARACTERS AND UNDERLINE CHARACTER  IWF Metadata Harvester III §316

316. state ≡ . [LDF 2006.10.18.] ⟨ Define yylex 302 ⟩ +≡

else

if (state ≡ ) {

curr id += curr char ; } /∗ if (state ≡ ) ∗/ else if (state ≡ ) {

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪

curr integer str ≪ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif value int value = atoi (curr integer str .c str ( )); scanner node in strm.unget ( ); return ;

} /∗ else if (state ≡ ) ∗/ else if (state ≡ ) {

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪

curr float str ≪ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif value float value = atof (curr float str .c str ( )); scanner node in strm.unget ( ); return ;

}  /∗ else if (state ≡  ) ∗/

317. state ≡ . [LDF 2006.10.18.] ⟨ Define yylex 302 ⟩ +≡

else

if (state ≡ ) {

curr string += curr char ; } /∗ if (state ≡ ) ∗/

} /∗ else if (isalpha(curr char ) ∨ curr char ≡ ) ∗/

318. Digits. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this section.

⟨ Define yylex 302 ⟩ +≡ else if (isdigit (curr char )) { if (state ≡ ) {

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ␣ ␣␣ ≪

␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif curr integer str += curr char ; state = ; continue;

}  /∗ if (state ≡  ) ∗/

319. state ≡ . [LDF 2006.10.18.] ⟨ Define yylex 302 ⟩ +≡

else if (state ≡ ) { #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪ curr id ≪

endl ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

148  DIGITS  IWF Metadata Harvester III §320

320. Look up curr id in keyword map and possibly id map. [LDF 2006.10.19.] ⟨ Define yylex 302 ⟩ +≡

⟨ Look up curr id in keyword map and possibly id map 353 ⟩ } /∗ else if (state ≡ ) ∗/ else

if (state ≡ ) {

curr integer str += curr char ; } else if (state ≡ ) {

curr float str += curr char ; } else if (state ≡ ) {

curr string += curr char ; }

} /∗ else if (isdigit (curr char )) ∗/

321. Escaped characters. '\. [LDF 2006.10.18.] ⟨ Define yylex 302 ⟩ +≡

else if (curr char ≡ ) {

322. state ≡ . [LDF 2006.10.18.] ⟨ Define yylex 302 ⟩ +≡

if (state ≡ ) { #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪ curr id ≪

endl ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

§323  IWF Metadata Harvester III  ESCAPED CHARACTERS 149

323. Look up curr id in keyword map and possibly id map. [LDF 2006.10.19.] ⟨ Define yylex 302 ⟩ +≡

⟨ Look up curr id in keyword map and possibly id map 353 ⟩ } /∗ if (state ≡ ) ∗/ else

if (state ≡ ) { #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪

curr integer str ≪ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif value int value = atoi (curr integer str .c str ( )); scanner node in strm.unget ( ); return ;

} /∗ else if (state ≡ ) ∗/ else if (state ≡ ) {

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪

curr float str ≪ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif value float value = atof (curr float str .c str ( )); scanner node in strm.unget ( ); return ;

}  /∗ else if (state ≡  ) ∗/

324. state ≡ . [LDF 2006.10.18.] ⟨ Define yylex 302 ⟩ +≡

if (state ≡ ) { curr char = scanner node in strm.get ( ); curr string += curr char ; continue;

}  /∗ if (state ≡  ) ∗/

325. ⟨ Define yylex 302 ⟩ +≡

}  /∗ else if (curr char ≡  ) ∗/

150  PUNCTUATION  IWF Metadata Harvester III §327

326. Punctuation. [LDF 2006.10.31.] 327. (Equals sign). [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

⟨ Define yylex 302 ⟩ +≡ else if (curr char ≡ ) { if (state ≡ ) {

#ifdef temp strm ≪ ␣ ␣␣ ≪ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return ; } else if (state ≡ ) {

curr string += curr char ; } else if (state ≡ ) {

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪ curr id ≪

endl ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

§328  IWF Metadata Harvester III  PUNCTUATION 151

#endif 328. Look up curr id in keyword map and possibly id map. [LDF 2006.10.19.] ⟨ Define yylex 302 ⟩ +≡

⟨ Look up curr id in keyword map and possibly id map 353 ⟩ } /∗ else if (state ≡ ) ∗/ else

if (state ≡ ) { #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪

curr integer str ≪ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif value int value = atoi (curr integer str .c str ( )); scanner node in strm.unget ( ); return ;

} /∗ else if (state ≡ ) ∗/ else if (state ≡ ) {

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪

curr float str ≪ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif value float value = atof (curr float str .c str ( )); scanner node in strm.unget ( ); return ;

} /∗ else if (state ≡ ) ∗/ } /∗ else if (curr char ≡ ) ∗/ 329. (Plus sign). [LDF 2006.11.13.]

Log

[LDF 2006.11.13.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif next char = scanner node in strm.peek ( ); if (next char ≡ ) {

scanner node in strm.get ( ); return ;

} else return ;

} /∗ if (state ≡ ) ∗/ goto ;

} /∗ else if (curr char ≡ ) ∗/ 330. (Ampersand). [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif next char = scanner node in strm.peek ( ); if (next char ≡ ) {

scanner node in strm.get ( ); return ;

} else if (next char ≡ ) {

scanner node in strm.get ( ); return ;

} else return ;

} /∗ if (state ≡ ) ∗/ goto ;

} /∗ else if (curr char ≡ ) ∗/ 331. (Vertical line). [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif next char = scanner node in strm.peek ( ); if (next char ≡ ) {

scanner node in strm.get ( ); return ;

} else if (next char ≡ ) {

scanner node in strm.get ( ); return ;

} else return ;

} /∗ if (state ≡ ) ∗/ goto ;

} /∗ else if (curr char ≡ ) ∗/ 332. (Circumflex accent). [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif next char = scanner node in strm.peek ( ); if (next char ≡ ) {

scanner node in strm.get ( ); return ;

} else if (next char ≡ ) {

scanner node in strm.get ( ); return ;

} else return ;

} /∗ if (state ≡ ) ∗/ goto ;

} /∗ else if (curr char ≡ ) ∗/ 333. (Exclamation mark). [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif next char = scanner node in strm.peek ( ); if (next char ≡ ) {

scanner node in strm.get ( ); return ;

} else return ;

} /∗ if (state ≡ ) ∗/ else goto ;

} /∗ else if (curr char ≡ ) ∗/

334. (Colon). [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return ; } goto ;

} /∗ else if (curr char ≡ ) ∗/ 335. (Semi-colon). [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return ; } goto ;

} /∗ else if (curr char ≡ ) ∗/

336. (Comma). [LDF 2006.12.06.]

Log

[LDF 2006.12.06.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return ; } goto ;

} /∗ else if (curr char ≡ ) ∗/ 337. (Percent). [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return ; } goto ;

} /∗ else if (curr char ≡ ) ∗/

338. (Hyphen). [LDF 2006.12.07.]

Log

[LDF 2006.12.07.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return ; } goto ;

} /∗ else if (curr char ≡ ) ∗/ 339. (Period). [LDF 2006.11.02.]

Please note: ⟨ Common code for punctuation 351 ⟩ cannot be used for period! It must be handled in a special way, because periods are used to distinguish integers and floats. [LDF 2006.11.14.]

Log

[LDF 2006.11.02.] Added this section.

⟨ Define yylex 302 ⟩ +≡ else if (curr char ≡ ) { if (state ≡ ) {

#ifdef temp strm ≪ ␣ ␣␣ ≪ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return ; } else if (state ≡ ) {

curr string += curr char ; } else if (state ≡ ) {

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪ curr id ≪ endl ≪

≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif 340. Look up curr id in keyword map and possibly id map. [LDF 2006.10.19.] ⟨ Define yylex 302 ⟩ +≡

⟨ Look up curr id in keyword map and possibly id map 353 ⟩ } /∗ else if (state ≡ ) ∗/ else

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ≪

␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif curr float str = curr integer str + curr char ; curr integer str = ; state = ; continue;

} /∗ else if (state ≡ ) ∗/ else if (state ≡ ) {

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪

curr float str ≪ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif value float value = atof (curr float str .c str ( )); scanner node in strm.unget ( ); return ;

} /∗ else if (state ≡ ) ∗/ } /∗ else if (curr char ≡ ) ∗/ 341. (At-symbol). [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return ; } goto ;

} /∗ else if (curr char ≡ ) ∗/

342. (Open parenthesis). [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return ; } goto ;

} /∗ else if (curr char ≡ ) ∗/ 343. (Close parenthesis). [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return ; } goto ;

} /∗ else if (curr char ≡ ) ∗/

344. (Open bracket). [LDF 2006.11.01.]

Log

[LDF 2006.11.01.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return ; } goto ;

} /∗ else if (curr char ≡ ) ∗/ 345. (Close bracket). [LDF 2006.11.01.]

Log

[LDF 2006.11.01.] Added this section.

⟨ Define yylex 302 ⟩ +≡

else

if (curr char ≡ ) {

if (state ≡ ) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return ; } goto ;

} /∗ else if (curr char ≡ ) ∗/

346. Space characters. [LDF 2006.10.18.] ⟨ Define yylex 302 ⟩ +≡

else if (isspace(curr char )) {

347. state ≡ . Skip whitespace. [LDF 2006.10.18.] ⟨ Define yylex 302 ⟩ +≡

if (state ≡ ) {

continue; } /∗ if (state ≡ ) ∗/ else if (state ≡ ) {

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪ curr id ≪

endl ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

348. Look up curr id in keyword map and possibly id map. [LDF 2006.10.19.] ⟨ Define yylex 302 ⟩ +≡

⟨ Look up curr id in keyword map and possibly id map 353 ⟩

}  /∗ else if (state ≡  ) ∗/

164  SPACE CHARACTERS  IWF Metadata Harvester III §349

349. state ≡ . [LDF 2006.10.18.] ⟨ Define yylex 302 ⟩ +≡

else

if (state ≡ ) {

curr string += curr char ; } else if (state ≡ ) {

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪

curr integer str ≪ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif value int value = atoi (curr integer str .c str ( )); scanner node in strm.unget ( ); return ;

} /∗ else if (state ≡ ) ∗/ else if (state ≡ ) {

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪

curr float str ≪ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif value float value = atof (curr float str .c str ( )); scanner node in strm.unget ( ); return ;

} /∗ else if (state ≡ ) ∗/ } /∗ else if (isspace(curr char )) ∗/

: ; } /∗ while (End of main loop) ∗/ : #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

§350  IWF Metadata Harvester III  SPACE CHARACTERS 165

350. Close input file and exit successfully with return value 0. [LDF 2006.10.17.] ⟨ Define yylex 302 ⟩ +≡ #ifdef

temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif #undef

return 0; : ⟨ Common code for punctuation 351 ⟩

} /∗ End of yylex definition. ∗/

351. Common code for punctuation. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this declaration.

⟨ Common code for punctuation 351 ⟩ ≡

if (state ≡ ) { curr string += curr char ; goto ;

} else if (state ≡ ) {

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪ curr id ≪

endl ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

See also section 352. This code is cited in section 339. This code is used in section 350.

166  COMMON CODE FOR PUNCTUATION  IWF Metadata Harvester III §352

352. Look up curr id in keyword map and possibly id map. [LDF 2006.10.19.] ⟨ Common code for punctuation 351 ⟩ +≡

⟨ Look up curr id in keyword map and possibly id map 353 ⟩ } /∗ else if (state ≡ ) ∗/ else

if (state ≡ ) { #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪

curr integer str ≪ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif value int value = atoi (curr integer str .c str ( )); scanner node in strm.unget ( ); return ;

} /∗ else if (state ≡ ) ∗/ else if (state ≡ ) {

#ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ ␣ ␣ ≪

curr float str ≪ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif value float value = atof (curr float str .c str ( )); scanner node in strm.unget ( ); return ;

}  /∗ else if (state ≡  ) ∗/

353. Look up curr id. Look up curr id in keyword map and possibly id map. [LDF 2006.11.01.] A consequence of looking up curr id in keyword map first, and then looking it up in id map, is that it’s

not possible for variables declared by users to shadow keywords. I could change this, if it were desirable.

[LDF 2006.11.01.]

Log

[2006.11.01.] Added this section. It’s included in yylex .

⟨ Look up curr id in keyword map and possibly id map 353 ⟩ ≡

map⟨string, Keyword Type ∗⟩::iterator keyword iter = keyword map.find (curr id ); if

(keyword iter ≡ keyword map.end ( )) { #ifdef

temp strm ≪ endl ≪ ␣        ␣␣ ≪  ≪ curr id ≪ ␣   ␣     ␣  ␣  ≪
endl ≪  ␣      ␣  ␣  ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( );

§353  IWF Metadata Harvester III  LOOK UP CURR ID 167

scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

map⟨string, Id Type ∗⟩::iterator id iter = scanner node id map.find (curr id );

See also sections 354 and 355. This code is used in sections 310, 320, 323, 328, 340, 348, and 352.

354. curr id not found in scanner node id map. [LDF 2006.11.01.] ⟨ Look up curr id in keyword map and possibly id map 353 ⟩ +≡

if (id iter ≡ scanner node id map.end ( )) { #ifdef

temp strm ≪ ␣ ␣␣ ≪ curr id ≪ ␣ ␣ ␣ ␣ ≪

␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif strcpy (value string value, curr id .c str ( )); curr id = ; scanner node in strm.unget ( ); return ;

} /∗ if (id iter ≡ scanner node id map.end ( )) (curr id not found in scanner node id map) ∗/

168  LOOK UP CURR ID  IWF Metadata Harvester III §355

355. curr id found in scanner node id map. [LDF 2006.11.01.] ⟨ Look up curr id in keyword map and possibly id map 353 ⟩ +≡

else /∗ id iter ≠ scanner node id map.end ( ) ∗/ {

#ifdef

temp strm ≪ ␣ ␣␣ ≪ curr id ≪ ␣ ␣ ␣ ≪ ≪ endl ≪ ␣ ␣ ␣ ␣ ␣ ≪

␣ ␣ ␣ ≪ ≪ ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Token Type curr token; curr token.value.pointer value = scanner node id map[curr id ]; curr token.type = scanner node id map[curr id ] type; scanner node token stack .push(curr token); scanner node in strm.unget ( ); curr id = ; value int value = 0; return ;

} /∗ else (id iter ≠ scanner node id map.end ( )) ∗/ } /∗ if (keyword iter ≡ keyword map.end ( )) (curr id not found in keyword map) ∗/ else /∗ keyword iter ≠ keyword map.end ( ) (Keyword found) ∗/ {

#ifdef

temp strm ≪ endl ≪ ␣ ≪ curr id ≪ ␣ ≪ endl ≪ ␣ ␣ ␣ ␣ ␣ ␣ ≪ keyword iter second value name ≪ ␣ ≪ keyword iter second value ≪ ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif scanner node in strm.unget ( ); return keyword iter second value;

} /∗ else (keyword iter ≠ keyword map.end ( )) (Keyword found) ∗/

356. Putting the scanner together.

357. This is what’s compiled.

⟨ Include files 10 ⟩

⟨ scanner.web 245 ⟩

using namespace std; ⟨ Forward declarations 13 ⟩ ⟨ Declare namespace Scan Parse 251 ⟩ ⟨ Define Scan Parse functions 265 ⟩ ⟨ Define yylex 302 ⟩

§358  IWF Metadata Harvester III  PUTTING THE SCANNER TOGETHER 169

358. This is what’s written to scanner.h. ⟨ 358 ⟩ ≡

⟨ Preprocessor macro calls 19 ⟩

using namespace std;

⟨ Forward declarations 13 ⟩

⟨ extern declaration of namespace Scan Parse 252 ⟩

⟨ Declare yylex 301 ⟩

359. Parser (parser.w). [LDF 2006.10.20.]

Log

[2006.10.20.] Added this file.

[LDF 2006.10.31.] Renamed this file. Old name: parser.web. New name: parser.w.

⟨ parser.w 359 ⟩ ≡

static char parser id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 6, 7, 8, and 644. This code is used in section 642.

360. Include files. [LDF 2006.10.20.] ⟨ Include files 10 ⟩ +≡ #include #ifdef #include #else #include #endif #include #include #include #include #include #include #include

361. Declare yylex. [LDF 2006.10.20.] ⟨ Declare yylex 301 ⟩ +≡

int yylex ( ∗ lvalp, void ∗parameter );

362. Declare yyerror. [LDF 2006.10.20.] ⟨ Declare yyerror 362 ⟩ ≡

void yyerror (const char ∗s);

This code is used in section 643.

363. union declaration for . ⟨ union declaration for 363 ⟩ ≡

   \underline{\overline{␣}}

int int value; float float value;

170 UNION DECLARATION FOR IWF Metadata Harvester III §363

char string value[2048]; void ∗pointer value; }

This code is used in section 643.

364. Bison declarations. [LDF 2006.10.20.] ⟨ Bison declarations 364 ⟩ ≡

\underline{\overline{}}\underline{\overline{}}

This code is used in section 643.

365. Token and Type Declarations. [LDF 2006.10.20.]

366. Punctuation. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section. [LDF 2006.12.07.] Added token declaration for . [LDF 2006.12.08.] Added token declaration for . [LDF 2006.12.12.] Added token declaration for . [LDF 2006.12.14.] Added token declaration for .

⟨ Token and type declarations 366 ⟩ ≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

See also sections 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 382, 383, 384, and 385.

This code is used in section 643.

§367  IWF Metadata Harvester III  ASSIGNMENTS 171

367. Assignments. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section with the declarations of , , , , and .

[LDF 2006.11.14.] Added the declarations of  ,  ,  , and  .
[LDF 2006.12.11.] Added the declarations of  and  .

[LDF 2006.12.12.] Added the declaration of .

⟨ Token and type declarations 366 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

368. Arithmetical Operations. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this section with the token declarations of  ,  ,  , and  .

⟨ Token and type declarations 366 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

369. Types with values. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

⟨ Token and type declarations 366 ⟩ +≡

\underline{\overline{␣             ␣}}
\underline{\overline{␣          ␣␣␣␣}}
\underline{\overline{␣            ␣␣}}

172  CONTROL  IWF Metadata Harvester III §370

370. Control. [LDF 2006.10.20.] ⟨ Token and type declarations 366 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

371. Declarators. [LDF 2006.12.15.]

Log

[LDF 2006.11.16.] Added token declaration for . [LDF 2006.12.08.] Added token declaration for . [LDF 2006.12.15.] Added token declaration for .

⟨ Token and type declarations 366 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

372. Queries. [LDF 2006.10.20.]

Log

[LDF 2006.10.31.] Added token declarations for  and  .

⟨ Token and type declarations 366 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

373. Datasources. [LDF 2006.12.08.]

Log

[2006.12.08.] Added this section with the token declarations for ,  ,  , and  .
,  , and  have already been defined, as they are used for queries.

⟨ Token and type declarations 366 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

§374  IWF Metadata Harvester III  QUERIES 173

374. Datetimes. [LDF 2006.12.15.]

Log

[2006.12.15.] Added this section with the token declarations for ,  ,  ,  ,  , and  .
[LDF 2006.12.18.] Added token declaration for  and  .

⟨ Token and type declarations 366 ⟩ +≡

\underline{\overline{␣          ␣␣␣}}
\underline{\overline{␣          ␣␣␣}}
\underline{\overline{␣          ␣␣␣}}
\underline{\overline{␣          ␣␣␣}}
\underline{\overline{␣          ␣␣␣}}
\underline{\overline{␣          ␣␣␣}}
\underline{\overline{␣          ␣␣␣}}
\underline{\overline{␣          ␣␣␣}}

375. Predicates and Control Structures. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this section with the token declarations for ,  ,  , ,  , ,  ,  ,
, , ,  ,  , and  .

⟨ Token and type declarations 366 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

174  PREDICATES AND CONTROL STRUCTURES  IWF Metadata Harvester III §376

376. Database tables (Field designators). [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section with token declarations for , , , and . [LDF 2006.12.05.] Added the token declaration for . [LDF 2006.12.12.] Added the token declaration for . [LDF 2006.12.12.] Added token declarations for additional tables from the OAI database (dc test). [LDF 2006.12.12.] Added token declarations for additional tables from the PICA database (PICA DB).

⟨ Token and type declarations 366 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

§377  IWF Metadata Harvester III  PREDICATES AND CONTROL STRUCTURES 175

377. Database table columns (field qualifiers). [LDF 2006.12.13.]

Log

[2006.12.13.] Added this section.

⟨ Token and type declarations 366 ⟩ +≡

378. Generic columns. [LDF 2006.12.13.]

Log

[2006.12.13.] Added this section.

⟨ Token and type declarations 366 ⟩ +≡

   \underline{\overline{␣          ␣}}

379. Names. [LDF 2006.12.07.]

Log

[LDF 2006.12.07.] Added this section with token declarations for  ,  , and  .
[LDF 2006.12.07.] Added token declarations for  ,  ,  ,
,  , and  .

⟨ Token and type declarations 366 ⟩ +≡

   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}

380. Columns of individual tables. [LDF 2006.12.14.]

Log

[2006.12.14.] Added this section.

381. Pica. [LDF 2006.12.14.]

176  RECORDS  IWF Metadata Harvester III §382

382. Records. [LDF 2006.12.14.] in “Generic” section. [LDF 2006.12.14.]

Log

[2006.12.14.] Added this section.

⟨ Token and type declarations 366 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

383. Variables. [LDF 2006.11.01.]

Log

[2006.11.01.] Added this section.

⟨ Token and type declarations 366 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣             ␣}}

384. Data Types. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this section with the token declaration of . [LDF 2006.11.03.] Added the token declaration of . [LDF 2006.11.16.] Added the token declaration of . [LDF 2006.12.08.] Added the token declaration of . [LDF 2006.12.15.] Added the token declaration of .

⟨ Token and type declarations 366 ⟩ +≡

\underline{\overline{␣              ␣}}
\underline{\overline{␣              ␣}}
\underline{\overline{␣              ␣}}
\underline{\overline{␣              ␣}}
\underline{\overline{␣              ␣}}

§385  IWF Metadata Harvester III  RECORDS 177

385. Commands. [LDF 2006.11.13.]

Log

[LDF 2006.11.13.] Added this section with the token declarations of  and  .
[LDF 2006.11.13.] Added the token declarations of  ,  , and  .

[LDF 2006.11.16.] Added the token declarations of , , , and . [LDF 2006.11.23.] Added the token declaration of .

⟨ Token and type declarations 366 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

386. Parser rules. [LDF 2006.10.20.]

387. Program. [LDF 2006.10.31.]

388. ⟨program⟩ ⟶ ⟨statement list⟩ . [LDF 2006.10.31.] ⟨ Parser rules 388 ⟩ ≡

\underline{\overline{␣             ␣}}

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr ≪ temp strm.str ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); return 0;

} ;

See also sections 390, 391, 394, 395, 396, 403, 404, 405, 406, 409, 410, 411, 412, 414, 416, 418, 420, 424, 426, 427, 428, 430, 431, 432, 433, 435, 436, 438, 439, 441, 442, 444, 445, 449, 450, 452, 453, 454, 455, 457, 458, 460, 461, 462, 463, 464, 465, 466, 467, 469, 470, 472, 473, 474, 475, 477, 478, 479, 480, 481, 482, 484, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 515, 516, 519, 521, 522, 523, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 539, 540, 541, 542, 543, 545, 546, 547, 548, 549, 550, 551, 553, 554, 555, 557, 558, 559, 560, 561, 562, 563, 564, 569, 570, 571, 572, 573, 574, 575, 576, 577, 581, 582, 583, 584, 585, 587, 588, 590, 591, 593, 594, 596, 597, 598, 599, 600, 601, 605, 606, 608, 610, 612, 615, 616, 617, 619, 621, 623, 627, 628, 629, 631, 633, 635, 637, 638, 639, and 640.

This code is used in section 643.

389. Statement list. [LDF 2006.10.31.] 178 ⟨STATEMENT LIST⟩ ⟶ IWF Metadata Harvester III §390

390. ⟨statement list⟩ ⟶ . [LDF 2006.10.31.] ⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣  ␣     ␣}} ;

391. ⟨statement list⟩ ⟶ ⟨statement list⟩ ⟨statement⟩. [LDF 2006.10.31.] ⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣             ␣}} ;

392. Statement. [LDF 2006.10.31.]

393. ⟨statement⟩ ⟶ ⟨group statement⟩ . [LDF 2006.10.31.]

Log

[2006.10.31.] Added this rule.

[LDF 2006.11.13.] Commented-out this rule.

⟨ Garbage 393 ⟩ ≡

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr ≪ temp strm.str ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

} ;

This code is used in section 644.

394. ⟨statement⟩ ⟶ ⟨declaration⟩ . [LDF 2006.11.01.]

Log

[2006.11.01.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣          ␣}}

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr ≪ temp strm.str ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

} ;

§395  IWF Metadata Harvester III  ⟨STATEMENT⟩ ⟶ ⟨ASSIGNMENT⟩  179

395. ⟨statement⟩ ⟶ ⟨assignment⟩ . [LDF 2006.10.31.] ⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣          ␣}}

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr ≪ temp strm.str ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

}

;

396. ⟨statement⟩ ⟶ ⟨command⟩ . [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣       ␣}}

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr ≪ temp strm.str ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

}

;

397. Group Statement (grpstmnt.w). [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

[LDF 2006.11.13.] Removed the rules from this file and commented-out the type declaration of group statement .

398.

⟨ grpstmnt.w 398 ⟩ ≡

static char grpstmnt id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 7 and 8. This code is used in section 642.

180  GROUP STATEMENT (GRPSTMNT.W)  IWF Metadata Harvester III §399

399. ⟨ Type declarations for non-terminal symbols 399 ⟩ ≡

See also sections 402, 407, 408, 413, 415, 417, 419, 423, 425, 429, 434, 437, 440, 443, 447, 448, 451, 456, 459, 468, 483, 485, 514, 517, 538, 544, 552, 556, 566, 568, 580, 586, 589, 592, 595, 604, 607, 609, 611, 614, 618, 620, 622, 626, 630, 632, 634, and 636.

This code is used in section 643.

400. Declarations (declrtns.w). [LDF 2006.11.01.]

Log

[LDF 2006.11.01.] Added this file.

401.

⟨ declrtns.w 401 ⟩ ≡

static char declrtns id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 7 and 8. This code is used in section 642.

402. ⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

   \underline{\overline{␣          ␣}}

403. ⟨declaration⟩ ⟶ ⟨query declaration⟩. [LDF 2006.11.01.] ⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

}

;

§404  IWF Metadata Harvester III  ⟨DECLARATION⟩ ⟶ ⟨STRING DECLARATION⟩ 181

404. ⟨declaration⟩ ⟶ ⟨string declaration⟩. [LDF 2006.11.16.]

Log

[2006.11.16.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣}}

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

} ;

405. ⟨declaration⟩ ⟶ ⟨datasource declaration⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣}}

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

} ; 182 ⟨DECLARATION⟩ ⟶ ⟨DATETIME DECLARATION⟩ IWF Metadata Harvester III §406

406. ⟨declaration⟩ ⟶ ⟨datetime declaration⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif } ;

407. ⟨variable declaration segment list⟩. [LDF 2006.11.01.]

Log

[2006.11.01.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

   \underline{\overline{␣             ␣}}

408. ⟨subscript placeholder⟩. [LDF 2006.11.01.]

Log

[2006.11.01.] Added this type declaration.

§409  IWF Metadata Harvester III⟨VARIABLE DECLARATION SEGMENT LIST⟩ ⟶  183

409. ⟨variable declaration segment list⟩ ⟶ . [LDF 2006.11.01.]

Log

[2006.11.01.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣}}

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); strcpy ( \underline{\overline{}}, \underline{\overline{}}); temp strm ≪ endl ≪ ␣ ␣ ≪

endl ≪ ␣ ␣ ≪ \underline{\overline{}}≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

} ;

410. ⟨variable declaration segment list⟩ ⟶ (etc.). ⟨variable declaration segment list⟩ ⟶ ⟨variable declaration segment list⟩ . [LDF 2006.11.01.]

Log

[2006.11.01.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣                               ␣}}     \underline{\overline{}}

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); strcat ( \underline{\overline{}}, \underline{\overline{}}); temp strm ≪ endl ≪ ␣ ␣ ≪

␣ ≪ ≪ endl ≪

␣ ␣ ≪ \underline{\overline{}}≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

} ; 184 ⟨VARIABLE DECLARATION SEGMENT LIST⟩ ⟶ (ETC.) IWF Metadata Harvester III §411

411. ⟨variable declaration segment list⟩ ⟶ (etc.). ⟨variable declaration segment list⟩ ⟶ ⟨variable declaration segment list⟩ ⟨subscript placeholder⟩. [LDF 2006.11.01.]

The “Yen” symbol “¥” (^{#}A5) is added to the semantic value of the ⟨variable declaration segment list⟩ as a placeholder. This string will be used as the name of a top-level

Id Type object in scanner node id map. [LDF 2006.11.01.]

Log

[2006.11.01.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣                               ␣}}

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); strcat ( \underline{\overline{}}, ¥ ); temp strm ≪ endl ≪ ␣ ␣

␣ ≪ ≪ endl ≪ ␣ ␣ ≪ \underline{\overline{}}≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

} ;

412. ⟨subscript placeholder⟩ ⟶ . [LDF 2006.11.01.]

Log

[2006.11.01.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣           ␣}}

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

} ;

§413  IWF Metadata Harvester III  ⟨QUERY DECLARATION⟩ 185

413. ⟨query declaration⟩. [LDF 2006.11.01.]

Log

[2006.11.01.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

   \underline{\overline{␣          ␣}}

414. ⟨query declaration⟩ ⟶ (etc.). ⟨query declaration⟩ ⟶ ⟨variable declaration segment list⟩. [LDF 2006.11.01.]

Log

[LDF 2006.11.01.] Added this rule.

[LDF 2006.11.02.] No longer setting \underline{\overline{}}to the return value of Scan Parse ::declare variable func, because I’ve changed its return value from int to Id Node.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣               ␣}}

{ Scan Parse ::declare variable func(parameter , , \underline{\overline{}}); \underline{\overline{}}= 0;

} ;

415. ⟨datasource declaration⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

   \underline{\overline{␣          ␣}}

416. ⟨datasource declaration⟩ ⟶ (etc.). ⟨datasource declaration⟩ ⟶ ⟨variable declaration segment list⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                    ␣}}

{ Scan Parse ::declare variable func(parameter , , \underline{\overline{}}); \underline{\overline{}}= 0;

} ; 186 ⟨STRING DECLARATION⟩ IWF Metadata Harvester III §417

417. ⟨string declaration⟩. [LDF 2006.11.01.]

Log

[2006.11.01.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

   \underline{\overline{␣          ␣}}

418. ⟨string declaration⟩ ⟶ (etc.). ⟨string declaration⟩ ⟶ ⟨variable declaration segment list⟩. [LDF 2006.11.01.]

Log

[LDF 2006.11.01.] Added this rule.

[LDF 2006.11.02.] No longer setting \underline{\overline{}}to the return value of Scan Parse ::declare variable func, because I’ve changed its return value from int to Id Node.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                ␣}}

{ Scan Parse ::declare variable func(parameter , , \underline{\overline{}}); \underline{\overline{}}= 0;

} ;

419. ⟨datetime declaration⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this type declaration.

§420  IWF Metadata Harvester III  ⟨DATETIME DECLARATION⟩ ⟶ (ETC.) 187

420. ⟨datetime declaration⟩ ⟶ (etc.). ⟨datetime declaration⟩ ⟶ ⟨variable declaration segment list⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                  ␣}}

{ Scan Parse ::declare variable func(parameter , , \underline{\overline{}}); \underline{\overline{}}= 0;

}

;

421. Variables (variabls.w). [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this file.

422.

⟨ variabls.w 422 ⟩ ≡

static char variabls id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 7 and 8. This code is used in section 642.

423. ⟨variable name⟩. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this type declaration.

188 ⟨VARIABLE NAME⟩ ⟶ ⟨VARIABLE SEGMENT LIST⟩ IWF Metadata Harvester III §424

424. ⟨variable name⟩ ⟶ ⟨variable segment list⟩. [LDF 2006.11.02.] ⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif #if 0 /∗ 1 ∗/

Token Type curr token; curr token.type = yychar ; curr token.value = yylval ;

#endif scanner node token stack .push(Token Type(yychar , yylval )); \underline{\overline{}}= Scan Parse ::variable func(parameter , \underline{\overline{}}); yyclearin;

#undef } ;

425. ⟨variable segment list⟩. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this type declaration.

§426  IWF Metadata Harvester III  ⟨VARIABLE SEGMENT LIST⟩ ⟶  189

426. ⟨variable segment list⟩ ⟶ . [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

scanner node float vector .clear ( ); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

strcpy ( \underline{\overline{}}, \underline{\overline{}}); #undef

} ; 190 ⟨VARIABLE SEGMENT LIST⟩ ⟶ (ETC.) IWF Metadata Harvester III §427

427. ⟨variable segment list⟩ ⟶ (etc.). ⟨variable segment list⟩ ⟶ ⟨variable segment list⟩ .

[LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                    ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪

≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif strcpy ( \underline{\overline{}}, \underline{\overline{}});

strcat ( \underline{\overline{}}, \underline{\overline{}});

#undef } ;

§428  IWF Metadata Harvester III  ⟨VARIABLE SEGMENT LIST⟩ ⟶ (ETC.) 191

428. ⟨variable segment list⟩ ⟶ (etc.). ⟨variable segment list⟩ ⟶ ⟨variable segment list⟩ ⟨subscript⟩.

[LDF 2006.11.03.]

Log

[LDF 2006.11.03.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                    ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

scanner node float vector .push back ( \underline{\overline{}}); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪

≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

strcat ( \underline{\overline{}}, ¥ ); #undef

} ;

429. ⟨subscript⟩. [LDF 2006.11.03.]

Log

[LDF 2006.11.03.] Added this type declaration.

192 ⟨SUBSCRIPT⟩ ⟶ IWF Metadata Harvester III §430

430. ⟨subscript⟩ ⟶ . [LDF 2006.11.03.]

Log

[LDF 2006.11.03.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= static cast⟨float⟩( \underline{\overline{}}); #undef

§431  IWF Metadata Harvester III  ⟨SUBSCRIPT⟩ ⟶  193

} ; 431. ⟨subscript⟩ ⟶ . [LDF 2006.11.03.]

Log

[LDF 2006.11.03.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= \underline{\overline{}}; #undef

} ; 432. ⟨subscript⟩ ⟶ . [LDF 2006.11.03.]

Log

[LDF 2006.11.03.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣           ␣       ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= static cast⟨float⟩( \underline{\overline{}}); #undef

} ; 433. ⟨subscript⟩ ⟶ . [LDF 2006.11.03.]

Log

[LDF 2006.11.03.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣           ␣     ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= \underline{\overline{}}; #undef

} ;

434. ⟨query variable⟩. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this type declaration.

196 ⟨QUERY VARIABLE⟩ ⟶ IWF Metadata Harvester III §435

435. ⟨query variable⟩ ⟶ . [LDF 2006.11.02.] The semantic value of the token is the Id Type object associated with the name specified

by the semantic value of the token, or 0, if there is no Id Type object. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣        ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; if ( \underline{\overline{}}≡ 0) \{

temp strm ≪ ␣ ␣ ␣ ␣ ␣ ␣ ␣␣ ␣ ≪ endl ; } cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); if ( \underline{\overline{}}≠ 0) \{

static cast⟨Id Node⟩( \underline{\overline{}}) show ( ); }

#endif

\underline{\overline{}}= \underline{\overline{}}; #undef

}

;

§436  IWF Metadata Harvester III  ⟨QUERY VARIABLE⟩ ⟶ ⟨VARIABLE NAME⟩  197

436. ⟨query variable⟩ ⟶ ⟨variable name⟩ . [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣            ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; if ( \underline{\overline{}}≡ 0) \{

temp strm ≪ ␣ ␣ ␣ ␣ ␣ ␣ ␣␣ ␣ ≪ endl ; } cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#if 0 /∗ 1 ∗/

if ( \underline{\overline{}}≠ 0) \{

static cast⟨Id Node⟩( \underline{\overline{}}) show ( );
}

#endif #endif

\underline{\overline{}}= \underline{\overline{}}; #undef

} ;

437. ⟨datasource variable⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this type declaration.

198 ⟨DATASOURCE VARIABLE⟩ ⟶ IWF Metadata Harvester III §438

438. ⟨datasource variable⟩ ⟶ . [LDF 2006.12.08.] The semantic value of the token is the Id Type object associated with the name

specified by the semantic value of the token, or 0, if there is no Id Type object. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣        ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; if ( \underline{\overline{}}≡ 0) \{

temp strm ≪ ␣ ␣ ␣ ␣ ␣ ␣ ␣␣ ␣ ≪ endl ; } cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); if ( \underline{\overline{}}≠ 0) \{

static cast⟨Id Node⟩( \underline{\overline{}}) show ( ); }

#endif

\underline{\overline{}}= \underline{\overline{}}; #undef

}

;

§439  IWF Metadata Harvester III⟨DATASOURCE VARIABLE⟩ ⟶ ⟨VARIABLE NAME⟩  199

439. ⟨datasource variable⟩ ⟶ ⟨variable name⟩ . [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣            ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; if ( \underline{\overline{}}≡ 0) \{

temp strm ≪ ␣ ␣ ␣ ␣ ␣ ␣ ␣␣ ␣ ≪ endl ; } cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); if ( \underline{\overline{}}≠ 0) \{

static cast⟨Id Node⟩( \underline{\overline{}}) show ( ); }

#endif

\underline{\overline{}}= \underline{\overline{}}; #undef

} ;

440. ⟨string variable⟩. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this type declaration.

200 ⟨STRING VARIABLE⟩ ⟶ IWF Metadata Harvester III §441

441. ⟨string variable⟩ ⟶ . [LDF 2006.11.16.] The semantic value of the token is the Id Type object associated with the name specified

by the semantic value of the token, or 0, if there is no Id Type object. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣        ␣}}

{ #if 0 /∗ 1 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; if ( \underline{\overline{}}≡ 0) \{

temp strm ≪ ␣ ␣ ␣ ␣ ␣ ␣ ␣␣ ␣ ≪ endl ; } cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); if ( \underline{\overline{}}≠ 0) \{

static cast⟨Id Node⟩( \underline{\overline{}}) show ( ); }

#endif

\underline{\overline{}}= \underline{\overline{}}; #undef

}

;

§442  IWF Metadata Harvester III ⟨STRING VARIABLE⟩ ⟶ ⟨VARIABLE NAME⟩  201

442. ⟨string variable⟩ ⟶ ⟨variable name⟩ . [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣            ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; if ( \underline{\overline{}}≡ 0) \{

temp strm ≪ ␣ ␣ ␣ ␣ ␣ ␣ ␣␣ ␣ ≪ endl ; } cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); if ( \underline{\overline{}}≠ 0) \{

static cast⟨Id Node⟩( \underline{\overline{}}) show ( ); }

#endif

\underline{\overline{}}= \underline{\overline{}}; #undef

} ;

443. ⟨datetime variable⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this type declaration.

202 ⟨DATETIME VARIABLE⟩ ⟶ IWF Metadata Harvester III §444

444. ⟨datetime variable⟩ ⟶ . [LDF 2006.11.02.] The semantic value of the token is the Id Type object associated with the name specified

by the semantic value of the token, or 0, if there is no Id Type object. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣        ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; #endif

\underline{\overline{}}= \underline{\overline{}}; #undef

}

;

§445  IWF Metadata Harvester III⟨DATETIME VARIABLE⟩ ⟶ ⟨VARIABLE NAME⟩  203

445. ⟨datetime variable⟩ ⟶ ⟨variable name⟩ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣            ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; if ( \underline{\overline{}}≡ 0) \{

temp strm ≪ ␣ ␣ ␣ ␣ ␣ ␣ ␣␣ ␣ ≪ endl ; } cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#if 0 /∗ 1 ∗/

if ( \underline{\overline{}}≠ 0) \{

static cast⟨Id Node⟩( \underline{\overline{}}) show ( );
}

#endif #endif

\underline{\overline{}}= \underline{\overline{}}; #undef

}

;

446. Assignment (assign.w). [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

Renamed this file. Old name: passign.w. New name: assign.w.

⟨ assign.w 446 ⟩ ≡

static char assign id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 7 and 8. This code is used in section 642.

204  ASSIGNMENT (ASSIGN.W)  IWF Metadata Harvester III §447

447. ⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

   \underline{\overline{␣          ␣}}

448. ⟨negation optional⟩. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this section.

⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

   \underline{\overline{␣          ␣}}

449. ⟨negation optional⟩ ⟶ . [LDF 2006.11.14.]

Log

[2006.11.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣  ␣     ␣␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= 0; } ;

§450  IWF Metadata Harvester III  ⟨NEGATION OPTIONAL⟩ ⟶  205

450. ⟨negation optional⟩ ⟶ . [LDF 2006.11.14.]

Log

[2006.11.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= 1; } ;

451. ⟨match term optional⟩. [LDF 2006.12.11.]

Log

[LDF 2006.12.11.] Added this section.

206 ⟨MATCH TERM OPTIONAL⟩ ⟶ IWF Metadata Harvester III §452

452. ⟨match term optional⟩ ⟶ . [LDF 2006.12.11.]

Log

[LDF 2006.12.11.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣  ␣     ␣␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

§453  IWF Metadata Harvester III  ⟨MATCH TERM OPTIONAL⟩ ⟶  207

\underline{\overline{}}= Query Type :: ; } ; 453. ⟨match term optional⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= Query Type :: ; } ; 454. ⟨match term optional⟩ ⟶ . [LDF 2006.12.11.]

Log

[LDF 2006.12.11.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= Query Type :: ; } ; 455. ⟨match term optional⟩ ⟶ . [LDF 2006.12.11.]

Log

[LDF 2006.12.11.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= Query Type :: ; } ;

456. ⟨assign or plus-assign⟩. [LDF 2006.11.13.]

Log

[2006.11.13.] Added this type declaration.

210 ⟨ASSIGN OR PLUS-ASSIGN⟩ ⟶ IWF Metadata Harvester III §457

457. ⟨assign or plus-assign⟩ ⟶ . [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

§458  IWF Metadata Harvester III  ⟨ASSIGN OR PLUS-ASSIGN⟩ ⟶  211

458. ⟨assign or plus-assign⟩ ⟶ . [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

459. ⟨assignment operator⟩. [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this type declaration.

212 ⟨ASSIGNMENT OPERATOR⟩ ⟶ IWF Metadata Harvester III §460

460. ⟨assignment operator⟩ ⟶ . [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

§461  IWF Metadata Harvester III  ⟨ASSIGNMENT OPERATOR⟩ ⟶  213

\underline{\overline{}}= ; } ; 461. ⟨assignment operator⟩ ⟶ . [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 462. ⟨assignment operator⟩ ⟶ . [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 463. ⟨assignment operator⟩ ⟶ . [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 464. ⟨assignment operator⟩ ⟶ . [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

465. ⟨assignment⟩ ⟶ ⟨query assignment⟩. [LDF 2006.11.02.] ⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣}}

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

} ;

§466  IWF Metadata Harvester III  ⟨ASSIGNMENT⟩ ⟶ ⟨DATASOURCE ASSIGNMENT⟩ 217

466. ⟨assignment⟩ ⟶ ⟨datasource assignment⟩. [LDF 2006.12.08.]

Log

[2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣}}

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

} ;

467. ⟨assignment⟩ ⟶ ⟨string assignment⟩. [LDF 2006.11.16.]

Log

[2006.11.16.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣}}

{ Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

} ;

468. ⟨query assignment⟩. ⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

\underline{\overline{␣              ␣}}

218 ⟨QUERY ASSIGNMENT⟩ ⟶ ⟨QUERY VARIABLE⟩ ⟨QUERY EXPRESSION⟩IWF Metadata Harvester III §469

469. ⟨query assignment⟩ ⟶ ⟨query variable⟩ ⟨query expression⟩. [LDF 2006.11.17.]

Log

[2006.11.17.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣             ␣      ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ≪

endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node id node = static cast⟨Id Node⟩( \underline{\overline{}});

if (¬id node) \underline{\overline{}}= 0;

else { if (id node value ≠ 0) delete static cast⟨Query Node⟩(id node value); id node value = \underline{\overline{}}; \underline{\overline{}}= \underline{\overline{}};

} #undef

} ;

§470  IWF Metadata Harvester III  ⟨ASSIGNMENT⟩ ⟶ ⟨DATETIME ASSIGNMENT⟩ 219

470. ⟨assignment⟩ ⟶ ⟨datetime assignment⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif } ;

220 ⟨QUERY ASSIGNMENT⟩ ⟶ (ETC.) IWF Metadata Harvester III §472

471. Targets. [LDF 2006.11.13.] 472. ⟨query assignment⟩ ⟶ (etc.). ⟨query assignment⟩ ⟶ ⟨query variable⟩ ⟨assign or plus-assign⟩ . [LDF 2006.11.02.]

Log

[LDF 2006.11.13.] Changed this rule from ⟨query assignment⟩ ⟶ ⟨query variable⟩ to ⟨query assignment⟩ ⟶ ⟨query variable⟩ .

[LDF 2006.11.13.] Changed to ⟨assign or plus-assign⟩.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣             ␣                    ␣     ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣

␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= query assignment func 0 (parameter , \underline{\overline{}}, \underline{\overline{}}, , , 0, 0); #undef

§473  IWF Metadata Harvester III  ⟨QUERY ASSIGNMENT⟩ ⟶ (ETC.) 221

} ; 473. ⟨query assignment⟩ ⟶ (etc.). ⟨query assignment⟩ ⟶ ⟨query variable⟩ ⟨assign or plus-assign⟩ . [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

[LDF 2006.11.13.] Changed to ⟨assign or plus-assign⟩.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣             ␣                    ␣     ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣

␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= query assignment func 0 (parameter , \underline{\overline{}}, \underline{\overline{}}, , , 0, 0); #undef

} ; 474. ⟨query assignment⟩ ⟶ (etc.). ⟨query assignment⟩ ⟶ ⟨query variable⟩ ⟨assign or plus-assign⟩ . [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

[LDF 2006.11.13.] Changed to ⟨assign or plus-assign⟩.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣             ␣                    ␣      ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣

␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= query assignment func 0 (parameter , \underline{\overline{}}, , , , 0, 0); #undef

} ; 475. ⟨query assignment⟩ ⟶ (etc.). ⟨query assignment⟩ ⟶ ⟨query variable⟩ ⟨assign or plus-assign⟩ . [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

[LDF 2006.11.13.] Changed to ⟨assign or plus-assign⟩.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣             ␣                    ␣      ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣

␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= query assignment func 0 (parameter , \underline{\overline{}}, \underline{\overline{}}, , , 0, 0); #undef

} ;

476. Fields. [LDF 2006.11.13.] 477. ⟨query assignment⟩ ⟶ (etc.). ⟨query assignment⟩ ⟶ ⟨query variable⟩ ⟨field specifier⟩ ⟨assignment operator⟩ ⟨negation optional⟩ ⟨match term optional⟩ ⟨query expression⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

[LDF 2006.11.21.] Now setting curr id node value id node and curr id node value name.

[LDF 2006.12.19.] Removed code from this rule. Now calling Scan Parse ::query assignment func 1 .

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣             ␣     ␣              ␣}}    \underline{\overline{␣                ␣                  ␣}}  \{

#if 1 /∗ 0 ∗/ #define #else # # undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ␣ ≪

          ␣                ␣                   ␣ ≪

≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

Id Node curr id node = static cast⟨Id Node⟩( \underline{\overline{}});
int status = query assignment func 1 (scanner node, curr id node, \underline{\overline{}}, \underline{\overline{}}, \underline{\overline{}}, \underline{\overline{}}, \underline{\overline{}},

); \underline{\overline{}}= static cast⟨void ∗⟩(curr id node); 478. If Scan Parse ::query assignment func 1 fails, curr id node will be 0 anyway, so it’s not really necessary to check the value of status . It’s only done for the sake of debugging output, which is conditionally compiled. [LDF 2006.12.19.] ⟨ Parser rules 388 ⟩ +≡ #ifdef

if (status ≠ 0) {

temp strm ≪  ␣␣  ␣  ≪ endl ≪

        ␣                  ␣             ␣      ␣               ␣ ≪

endl ≪ ␣ ␣ ␣ ≪ ≪ endl ≪ ␣ ␣ ␣ ≪ status ≪ ≪ endl ≪ ␣ ␣ ␣ ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); \underline{\overline{}}= 0;

} /∗ status ≠ 0 ∗/ #endif

479. ⟨ Parser rules 388 ⟩ +≡ #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ␣

      ␣ ≪  ␣                ␣                   ␣ ≪

≪ endl ;

cerr mutex .Lock ( );

cerr ≪ temp strm.str ( );

cerr mutex .Unlock ( );

scanner node log strm ≪ temp strm.str ( );

temp strm.str ( ); #endif #undef

} ; 480. ⟨query assignment⟩ ⟶ (etc.). ⟨query assignment⟩ ⟶ ⟨query variable⟩ ⟨field specifier⟩ ⟨assignment operator⟩ ⟨negation optional⟩ ⟨match term optional⟩ ⟨query expression⟩. [LDF 2006.12.19.]

Log

[LDF 2006.12.19.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣             ␣     ␣              ␣}}    \underline{\overline{␣                ␣                  ␣}}  \{

#if 1 /∗ 0 ∗/ #define #else # # undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ␣ ≪

          ␣                ␣                   ␣ ≪

≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

Id Node curr id node = static cast⟨Id Node⟩( \underline{\overline{}});
int status = query assignment func 1 (scanner node, curr id node, \underline{\overline{}}, \underline{\overline{}}, \underline{\overline{}}, \underline{\overline{}}, \underline{\overline{}},

); \underline{\overline{}}= static cast⟨void ∗⟩(curr id node);

481. If Scan Parse ::query assignment func 1 fails, curr id node will be 0 anyway, so it’s not really necessary to check the value of status . It’s only done for the sake of debugging output, which is conditionally compiled. [LDF 2006.12.19.] ⟨ Parser rules 388 ⟩ +≡ #ifdef

if (status ≠ 0) {

temp strm ≪  ␣␣  ␣  ≪ endl ≪

        ␣                  ␣             ␣      ␣               ␣ ≪

endl ≪ ␣ ␣ ␣ ≪ ≪ endl ≪ ␣ ␣ ␣ ≪ status ≪ ≪ endl ≪ ␣ ␣ ␣ ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); \underline{\overline{}}= 0;

} /∗ status ≠ 0 ∗/ #endif 482. ⟨ Parser rules 388 ⟩ +≡ #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ␣

      ␣ ≪  ␣                ␣                   ␣ ≪

≪ endl ;

cerr mutex .Lock ( );

cerr ≪ temp strm.str ( );

cerr mutex .Unlock ( );

scanner node log strm ≪ temp strm.str ( );

temp strm.str ( ); #endif #undef

} ;

483. ⟨field specifier⟩. [LDF 2006.12.13.]

Log

[LDF 2006.12.13.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

   \underline{\overline{␣              ␣}}

484. ⟨field specifier⟩ ⟶ ⟨field designator⟩ ⟨field qualifier list⟩. [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣               ␣}} \{

#if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪

endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif deque < int > ∗d = ( \underline{\overline{}}≡ 0) ? new deque < int > : static cast ⟨ deque < int >∗> ( \underline{\overline{}});

d push front ( \underline{\overline{}});
\underline{\overline{}}= static cast⟨void ∗⟩(d); \} ;

228 ⟨FIELD DESIGNATOR⟩ IWF Metadata Harvester III §485

485. ⟨field designator⟩. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

   \underline{\overline{␣          ␣}}

486. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

§487  IWF Metadata Harvester III  ⟨FIELD DESIGNATOR⟩ ⟶  229

\underline{\overline{}}= ; } ; 487. ⟨field designator⟩ ⟶ . [LDF 2006.11.14.]

Log

[2006.11.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

230 ⟨FIELD DESIGNATOR⟩ ⟶ IWF Metadata Harvester III §488

\underline{\overline{}}= ; } ; 488. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 489. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 490. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 491. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 492. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 493. ⟨field designator⟩ ⟶ . [LDF 2006.11.14.]

Log

[2006.11.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 494. ⟨field designator⟩ ⟶ . [LDF 2006.12.05.]

Log

[LDF 2006.12.05.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 495. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 496. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 497. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 498. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 499. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 500. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 501. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 502. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 503. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 504. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 505. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 506. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 507. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 508. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 509. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 510. ⟨field designator⟩ ⟶ . [LDF 2006.11.14.]

Log

[2006.11.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 511. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 512. ⟨field designator⟩ ⟶ . [LDF 2006.11.14.]

Log

[2006.11.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 513. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

514. ⟨field qualifier⟩. [LDF 2006.12.13.]

Log

[LDF 2006.12.13.] Added this type declaration.

256 ⟨FIELD QUALIFIER LIST⟩ ⟶ IWF Metadata Harvester III §515

515. ⟨field qualifier list⟩ ⟶ . [LDF 2006.12.13.]

Log

[LDF 2006.12.13.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣  ␣     ␣␣}} \{

#if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif deque < int > ∗d = new deque < int > ; \underline{\overline{}}= static cast⟨void ∗⟩(d); \} ;

516. ⟨field qualifier list⟩ ⟶ ⟨field qualifier list⟩ ⟨field qualifier⟩. [LDF 2006.12.13.]

Log

[LDF 2006.12.13.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                   ␣      ␣}}  \{

#if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ␣

≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

deque < int > ∗d = static cast ⟨ deque < int >∗> ( \underline{\overline{}});
d push back ( \underline{\overline{}});
\underline{\overline{}}= static cast⟨void ∗⟩(d); \} ;

§517  IWF Metadata Harvester III  ⟨FIELD QUALIFIER⟩ 257

517. ⟨field qualifier⟩. [LDF 2006.12.07.]

Log

[LDF 2006.12.07.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

   \underline{\overline{␣          ␣}}

518. Generic. [LDF 2006.12.13.]

Log

[2006.12.13.] Added this section.

519. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.13.]

Log

[LDF 2006.12.13.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

258 ⟨FIELD QUALIFIER⟩ ⟶ IWF Metadata Harvester III §521

520. Names. [LDF 2006.12.13.] 521. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.07.]

Log

[LDF 2006.12.07.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

§522  IWF Metadata Harvester III  ⟨FIELD QUALIFIER⟩ ⟶  259

\underline{\overline{}}= ; } ; 522. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.13.]

Log

[LDF 2006.12.13.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 523. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.13.]

Log

[LDF 2006.12.13.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

524. Field qualifiers for database table columns. [LDF 2006.12.14.]

Log

[2006.12.14.] Added this section.

525. Records. [LDF 2006.12.14.] 526. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 527. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 528. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 529. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 530. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 531. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 532. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 533. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 534. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 535. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 536. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 537. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

538. ⟨datasource assignment⟩. [LDF 2006.12.08.]

Log

[2006.12.08.] Added this type declaration.

§539  IWF Metadata Harvester III⟨DATASOURCE ASSIGNMENT⟩ ⟶ ⟨DATASOURCE VARIABLE⟩  ⟨DATASOURCE EXPRESSION⟩ 273

539. ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ ⟨datasource expression⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                  ␣      ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ≪

␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node id node = static cast⟨Id Node⟩( \underline{\overline{}});

if (¬id node) \underline{\overline{}}= 0;

else { if (id node value ≠ 0) delete static cast⟨Datasource Node⟩(id node value); id node value = \underline{\overline{}}; \underline{\overline{}}= \underline{\overline{}};

} #undef

274 ⟨DATASOURCE ASSIGNMENT⟩ ⟶ ⟨DATASOURCE VARIABLE⟩ IWF Metadata Harvester III §540

} ; 540. ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ . [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                  ␣      ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ≪

endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node id node = static cast⟨Id Node⟩( \underline{\overline{}});

if (¬id node) \underline{\overline{}}= 0;

else { if (id node value ≡ 0) id node value = static cast⟨void ∗⟩(new Datasource Type); static cast⟨Datasource Node⟩(id node value) type = Datasource Type :: ; \underline{\overline{}}= id node value;

} #undef

§541  IWF Metadata Harvester III⟨DATASOURCE ASSIGNMENT⟩ ⟶ ⟨DATASOURCE VARIABLE⟩  275

} ; 541. ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ . [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                  ␣      ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣

≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node id node = static cast⟨Id Node⟩( \underline{\overline{}});

if (¬id node) \underline{\overline{}}= 0;

else { if (id node value ≡ 0) id node value = static cast⟨void ∗⟩(new Datasource Type); static cast⟨Datasource Node⟩(id node value) type = Datasource Type :: ; \underline{\overline{}}= id node value;

} #undef

} ; 542. ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ . [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                  ␣      ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ≪

endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node id node = static cast⟨Id Node⟩( \underline{\overline{}});

if (¬id node) \underline{\overline{}}= 0;

else { if (id node value ≡ 0) id node value = static cast⟨void ∗⟩(new Datasource Type); static cast⟨Datasource Node⟩(id node value) type = Datasource Type :: ; \underline{\overline{}}= id node value;

} #undef

} ; 543. ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ . [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                  ␣      ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣

≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node id node = static cast⟨Id Node⟩( \underline{\overline{}});

if (¬id node) \underline{\overline{}}= 0;

else { if (id node value ≡ 0) id node value = static cast⟨void ∗⟩(new Datasource Type); static cast⟨Datasource Node⟩(id node value) type = Datasource Type :: ;

\underline{\overline{}}= id node value; }

#undef } ;

544. ⟨string assignment⟩. [LDF 2006.11.16.]

Log

[2006.11.16.] Added this type declaration.

278 ⟨STRING ASSIGNMENT⟩ ⟶ ⟨STRING VARIABLE⟩ ⟨STRING EXPRESSION⟩IWF Metadata Harvester III §545

545. ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨string expression⟩. [LDF 2006.11.16.]

Log

[2006.11.16.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣              ␣      ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); #ifdef

temp strm ≪ endl ≪ ␣ ␣␣ ␣ ≪

␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node curr id node = static cast⟨Id Node⟩( \underline{\overline{}}); if (curr id node ≡ 0) {

temp strm ≪ ␣␣ ␣ ␣ ␣ ≪

␣␣  ≪ endl ≪  ␣  ≪
endl ≪  ␣   ␣  ␣␣     ␣  ≪ endl ≪

          ␣        ␣  ␣         ␣ ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); getchar ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); strcpy ( \underline{\overline{}}, \underline{\overline{}});

} else {

if (curr id node value ≡ 0) curr id node value = new string; ∗static cast⟨string ∗⟩(curr id node value) = \underline{\overline{}}; strcpy ( \underline{\overline{}}, \underline{\overline{}});

} #undef

§546  IWF Metadata Harvester III⟨STRING ASSIGNMENT⟩ ⟶ ⟨STRING VARIABLE⟩  ⟨QUERY EXPRESSION⟩ 279

} ; 546. ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨query expression⟩. [LDF 2006.11.16.]

Log

[2006.11.16.] Added this rule.

[LDF 2006.12.01.] !! BUG FIX: Added code for the case that curr id node value ≠ 0.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣              ␣      ␣   ␣}} \{

#if 1 /∗ 0 ∗/ #define #else #undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ␣

≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node curr id node = static cast⟨Id Node⟩( \underline{\overline{}}); Query Node q = static cast⟨Query Node⟩( \underline{\overline{}}); string ∗curr string = 0; stringstream tex strm; if (curr id node ≡ 0 ∨ q ≡ 0) {

strcpy ( \underline{\overline{}}, ); } else /∗ curr id node ≠ 0 ∗/ { curr id node subtype = Id Type :: ; if (curr id node value ≡ 0) {

curr string = new string;

curr id node value = static cast⟨void ∗⟩(curr string ); } else {

∗static cast⟨string ∗⟩(curr id node value) = ; curr string = static cast⟨string ∗⟩(curr id node value);

}

547. ⟨ Parser rules 388 ⟩ +≡

280 ⟨STRING ASSIGNMENT⟩ ⟶ ⟨STRING VARIABLE⟩ ⟨QUERY EXPRESSION⟩IWF Metadata Harvester III §548

stringstream ∗tex strm = new stringstream; ∗curr string = q generate tex string (scanner node, tex strm); tex strm str ( ); strcpy ( \underline{\overline{}}, curr string c str ( )); \} /∗ else (curr id node ≠ 0) ∗/ } ; 548. ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨query expression⟩. [LDF 2006.12.01.]

Log

[LDF 2006.12.01.] Added this rule.

[LDF 2006.12.06.] Changed this rule from ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨query expression⟩ to ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨query expression⟩.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣              ␣      ␣   ␣   ␣}}  \{

#if 1 /∗ 0 ∗/ #define #else #undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ≪

␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif stringstream tex strm; stringstream select strm; stringstream from strm; stringstream where strm 0 ; stringstream where strm 1 ; Id Node curr id node = static cast⟨Id Node⟩( \underline{\overline{}}); Query Node q = static cast⟨Query Node⟩( \underline{\overline{}}); string ∗curr string = 0; if (curr id node ≡ 0 ∨ q ≡ 0) {

strcpy ( \underline{\overline{}}, ); } else /∗ curr id node ≠ 0 ∗/ { curr id node subtype = Id Type :: ; if (curr id node value ≡ 0) {

curr string = new string;

curr id node value = static cast⟨void ∗⟩(curr string ); } else {

∗static cast⟨string ∗⟩(curr id node value) = ; curr string = static cast⟨string ∗⟩(curr id node value);

} 549. ⟨ Parser rules 388 ⟩ +≡

bool first select = true; bool first from = true; bool first where = true; bitset < > field flags (0_{L}); int r = q generate sql string (scanner node, , &tex strm, &select strm, &from strm, &where strm 0 ,

&where strm 1 , &first select , &first from, &first where, &field flags , curr string ); tex strm.str ( ); if (r ≡ 0) strcpy ( \underline{\overline{}}, curr string c str ( )); else strcpy ( \underline{\overline{}}, ); } /∗ else (curr id node ≠ 0) ∗/ } ; 550. ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨query expression⟩. [LDF 2006.12.01.]

Log

[LDF 2006.12.06.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣              ␣      ␣   ␣    ␣}}  \{

#if 1 /∗ 0 ∗/ #define #else #undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ≪

␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif stringstream tex strm; stringstream select strm; stringstream from strm; stringstream where strm 0 ; stringstream where strm 1 ; Id Node curr id node = static cast⟨Id Node⟩( \underline{\overline{}}); Query Node q = static cast⟨Query Node⟩( \underline{\overline{}}); string ∗curr string = 0; if (curr id node ≡ 0 ∨ q ≡ 0) {

strcpy ( \underline{\overline{}}, ); } else /∗ curr id node ≠ 0 ∗/ { curr id node subtype = Id Type :: ; if (curr id node value ≡ 0) {

curr string = new string;

curr id node value = static cast⟨void ∗⟩(curr string ); } else {

∗static cast⟨string ∗⟩(curr id node value) = ; curr string = static cast⟨string ∗⟩(curr id node value);

} 551. ⟨ Parser rules 388 ⟩ +≡

bool first select = true; bool first from = true; bool first where = true; bitset < > field flags (0_{L}); int r = q generate sql string (scanner node, , &tex strm, &select strm, &from strm, &where strm 0 ,

&where strm 1 , &first select , &first from, &first where, &field flags , curr string ); tex strm.str ( ); if (r ≡ 0) strcpy ( \underline{\overline{}}, curr string c str ( )); else strcpy ( \underline{\overline{}}, ); } /∗ else (curr id node ≠ 0) ∗/ } ;

552. ⟨datetime assignment⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this type declaration.

284 ⟨DATETIME ASSIGNMENT⟩ ⟶ ⟨DATETIME VARIABLE⟩ ⟨DATETIME EXPRESSION⟩IWF Metadata Harvester III §553

553. ⟨datetime assignment⟩ ⟶ ⟨datetime variable⟩ ⟨datetime expression⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                ␣      ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ␣

≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node id node = static cast⟨Id Node⟩( \underline{\overline{}});

if (¬id node) \underline{\overline{}}= 0;

else { if (id node value ≠ 0) delete static cast⟨Date Time Node⟩(id node value); id node value = \underline{\overline{}}; \underline{\overline{}}= \underline{\overline{}};

} #undef

} ;

§554  IWF Metadata Harvester III⟨DATETIME ASSIGNMENT⟩ ⟶ ⟨DATETIME VARIABLE⟩  ⟨DATETIME SPECIFIER⟩ (ETC.) 285

554. ⟨datetime assignment⟩ ⟶ ⟨datetime variable⟩ ⟨datetime specifier⟩ (etc.). ⟨datetime assignment⟩

⟶ ⟨datetime variable⟩  ⟨datetime specifier⟩ ⟨assignment operator⟩  . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                ␣     ␣                 ␣}}
   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ≪

␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node id node = static cast⟨Id Node⟩( \underline{\overline{}}); if (¬id node) {

temp strm ≪  ␣␣  ␣          ␣  ≪ endl ≪

          ␣                 ␣     ␣ ≪  ␣

␣  ≪ endl ≪  ␣  ␣     ␣␣ ≪
␣ ␣ ␣ ␣ ␣ ≪ ␣ ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); \underline{\overline{}}= 0;

} /∗ if (¬id node) ∗/ else /∗ id node ≠ 0 ∗/ {

Date Time Node d = static cast⟨Date Time Node⟩(id node value);

int val = \underline{\overline{}};

datetime assignment func 0 (scanner node, d, \underline{\overline{}}, \underline{\overline{}}, static cast⟨void ∗⟩(&val ), ); id node value = static cast⟨void ∗⟩(d); \underline{\overline{}}= id node value; } /∗ else (id node ≠ 0) ∗/

#undef } ; 286 ⟨DATETIME ASSIGNMENT⟩ ⟶ ⟨DATETIME VARIABLE⟩ ⟨DATETIME SPECIFIER⟩ (ETC.)IWF Metadata Harvester III §555

555. ⟨datetime assignment⟩ ⟶ ⟨datetime variable⟩ ⟨datetime specifier⟩ (etc.). ⟨datetime assignment⟩

⟶ ⟨datetime variable⟩  ⟨datetime specifier⟩ ⟨assignment operator⟩  . [LDF 2006.12.18.]

Log

[2006.12.18.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                ␣     ␣                 ␣}}
   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ≪

␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node id node = static cast⟨Id Node⟩( \underline{\overline{}}); if (¬id node) {

temp strm ≪  ␣␣  ␣          ␣  ≪ endl ≪

          ␣                 ␣     ␣ ≪  ␣

␣  ≪ endl ≪  ␣  ␣     ␣␣ ≪
␣ ␣ ␣ ␣ ␣ ≪ ␣ ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); \underline{\overline{}}= 0;

} /∗ if (¬id node) ∗/ else /∗ id node ≠ 0 ∗/ {

Date Time Node d = static cast⟨Date Time Node⟩(id node value);

float val = \underline{\overline{}};

datetime assignment func 0 (scanner node, d, \underline{\overline{}}, \underline{\overline{}}, static cast⟨void ∗⟩(&val ), ); id node value = static cast⟨void ∗⟩(d); \underline{\overline{}}= id node value; } /∗ else (id node ≠ 0) ∗/

#undef } ;

§556  IWF Metadata Harvester III  DATETIME SPECIFIER 287

556. Datetime specifier.

Log

[2006.12.15.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

   \underline{\overline{␣          ␣}}

557. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

288 ⟨DATETIME SPECIFIER⟩ ⟶ IWF Metadata Harvester III §558

\underline{\overline{}}= ; } ; 558. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

§559  IWF Metadata Harvester III  ⟨DATETIME SPECIFIER⟩ ⟶  289

\underline{\overline{}}= ; } ; 559. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 560. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 561. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 562. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 563. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 564. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

565. Commands (commands.w). [LDF 2006.11.13.]

Log

[LDF 2006.11.13.] Added this file.

⟨ commands.w 565 ⟩ ≡

static char commands id string [ ] = ␣ ␣ ␣ ␣

      ␣        ␣   ␣ ;

This code is cited in sections 7 and 8. This code is used in section 642.

566. ⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

   \underline{\overline{␣          ␣}}

567. Messages. [LDF 2006.11.15.]

§568  IWF Metadata Harvester III  ⟨MESSAGE OR ERRMESSAGE⟩ 295

568. ⟨message or errmessage⟩. [LDF 2006.11.15.]

Log

[2006.11.15.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

   \underline{\overline{␣          ␣}}

569. ⟨message or errmessage⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ; 296 ⟨MESSAGE OR ERRMESSAGE⟩ ⟶ IWF Metadata Harvester III §570

570. ⟨message or errmessage⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

§571  IWF Metadata Harvester III  ⟨COMMAND⟩ ⟶ ⟨MESSAGE OR ERRMESSAGE⟩ 297

571. ⟨command⟩ ⟶ ⟨message or errmessage⟩. . [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣                    ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif if ( \underline{\overline{}}≡ ) temp strm ≪ ␣␣ ; temp strm ≪ \underline{\overline{}}≪ endl ; if ( \underline{\overline{}}≡ ) temp strm ≪ ␣ ␣ ␣ ␣ ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); if ( \underline{\overline{}}≡ ) getchar ( ); cerr mutex .Unlock ( );

} ;

298 ⟨COMMAND⟩ ⟶ IWF Metadata Harvester III §572

572. ⟨command⟩ ⟶ . [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif temp strm ≪ ␣ ␣ ␣ ␣ ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); getchar ( ); cerr mutex .Unlock ( );

} ;

§573  IWF Metadata Harvester III  ⟨COMMAND⟩ ⟶  ⟨QUERY VARIABLE⟩ 299

573. ⟨command⟩ ⟶ ⟨query variable⟩. [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣    ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node curr id node = static cast⟨Id Node⟩( \underline{\overline{}}); if (curr id node ≡ 0) {

temp strm ≪  ␣␣  ␣          ␣    ␣         ␣     ␣  ≪ endl ≪

    ␣   ␣     ␣␣     ␣     ␣ ␣  ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); \underline{\overline{}}= 1;

} /∗ if (curr id node ≡ 0) ∗/ else if (curr id node value ≡ 0) {

temp strm ≪  ␣␣  ␣          ␣    ␣         ␣     ␣  ≪

    endl ≪  ␣       ␣        ␣  ␣                ␣  ␣     ␣␣ ≪
    ␣     ␣␣  ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); \underline{\overline{}}= 1;

} /∗ if (curr id node ≡ 0) ∗/ else if (curr id node ∧ curr id node value) {

Query Node curr query node = static cast⟨Query Node⟩(curr id node value); cerr mutex .Lock ( ); curr query node show ( ); cerr mutex .Unlock ( ); \underline{\overline{}}= 0;

300 ⟨COMMAND⟩ ⟶  ⟨QUERY VARIABLE⟩  IWF Metadata Harvester III §573

} #undef

} ;

§574  IWF Metadata Harvester III  ⟨COMMAND⟩ ⟶  ⟨DATASOURCE VARIABLE⟩ 301

574. ⟨command⟩ ⟶ ⟨datasource variable⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣    ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node curr id node = static cast⟨Id Node⟩( \underline{\overline{}}); if (curr id node ≡ 0) {

temp strm ≪  ␣␣  ␣          ␣    ␣         ␣     ␣  ≪

    endl ≪  ␣  ␣     ␣␣     ␣     ␣␣  ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); \underline{\overline{}}= 1;

} /∗ if (curr id node ≡ 0) ∗/ else if (curr id node value ≡ 0) {

temp strm ≪  ␣␣  ␣          ␣    ␣         ␣     ␣  ≪

    endl ≪  ␣       ␣        ␣  ␣                     ␣  ␣     ␣␣ ≪
    ␣     ␣␣  ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); \underline{\overline{}}= 1;

} /∗ if (curr id node ≡ 0) ∗/ else if (curr id node ∧ curr id node value) {

Datasource Node curr datasource node = static cast⟨Datasource Node⟩(curr id node value); cerr mutex .Lock ( ); curr datasource node show ( ); cerr mutex .Unlock ( ); \underline{\overline{}}= 0;

302 ⟨COMMAND⟩ ⟶  ⟨DATASOURCE VARIABLE⟩  IWF Metadata Harvester III §574

} #undef

} ;

§575  IWF Metadata Harvester III  ⟨COMMAND⟩ ⟶  ⟨DATETIME VARIABLE⟩ 303

575. ⟨command⟩ ⟶ ⟨datetime variable⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣    ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node curr id node = static cast⟨Id Node⟩( \underline{\overline{}}); if (curr id node ≡ 0) {

temp strm ≪  ␣␣  ␣          ␣    ␣         ␣     ␣  ≪

    endl ≪  ␣  ␣     ␣␣     ␣     ␣␣  ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); \underline{\overline{}}= 1;

} /∗ if (curr id node ≡ 0) ∗/ else if (curr id node value ≡ 0) {

temp strm ≪  ␣␣  ␣          ␣    ␣         ␣     ␣  ≪

    endl ≪  ␣       ␣        ␣  ␣                   ␣  ␣     ␣␣ ≪
    ␣     ␣␣  ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); \underline{\overline{}}= 1;

} /∗ if (curr id node ≡ 0) ∗/ else if (curr id node ∧ curr id node value) {

Date Time Node curr date time node = static cast⟨Date Time Node⟩(curr id node value); cerr mutex .Lock ( ); curr date time node show ( ); cerr mutex .Unlock ( ); \underline{\overline{}}= 0;

304 ⟨COMMAND⟩ ⟶  ⟨DATETIME VARIABLE⟩  IWF Metadata Harvester III §575
}

#undef } ;

576. ⟨command⟩ ⟶ ⟨string expression⟩. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣    ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

temp strm ≪ ␣ ␣ ≪ \underline{\overline{}}≪ endl ; #undef

} ;

§577  IWF Metadata Harvester III  ⟨COMMAND⟩ ⟶  ⟨STRING EXPRESSION⟩ 305

577. ⟨command⟩ ⟶ ⟨string expression⟩. [LDF 2006.11.23.]

Log

[LDF 2006.11.23.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣      ␣   ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif stringstream temp filename; tex mutex .Lock ( ); temp filename ≪ tex filename str ≪ tex file ctr^{++} ≪ ; tex file strm.open(temp filename.str ( ).c str ( )); tex file strm ≪ copyright tex str ≪ endl ; time t tp; time(&tp); time mutex .Lock ( ); tm ∗local time = localtime(&tp); char ∗datestamp = asctime(local time); time mutex .Unlock ( ); tex file strm ≪ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ≪ datestamp ≪ ; tex file strm ≪ ␣ ≪ \underline{\overline{}}≪ ; tex file strm.close( ); tex mutex .Unlock ( );

#undef } ;

578. Query expressions (queryexp.w). [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this file.

306  QUERY EXPRESSIONS (QUERYEXP.W)  IWF Metadata Harvester III §579

579.

⟨ queryexp.w 579 ⟩ ≡

static char queryexp id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 7 and 8. This code is used in section 642.

580. query primary. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this type declaration.

§581  IWF Metadata Harvester III  ⟨QUERY PRIMARY⟩ ⟶ ⟨QUERY VARIABLE⟩ 307

581. ⟨query primary⟩ ⟶ ⟨query variable⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node curr id node = static cast⟨Id Node⟩( \underline{\overline{}}); if (curr id node ∧ curr id node value) {

Query Node curr query node = new Query Type;

∗curr query node = ∗static cast⟨Query Node⟩(curr id node value); \underline{\overline{}}= static cast⟨void ∗⟩(curr query node);

} else \underline{\overline{}}= 0;

#ifdef temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif } ; 308 ⟨QUERY PRIMARY⟩ ⟶ ⟨QUERY EXPRESSION⟩ IWF Metadata Harvester III §582

582. ⟨query primary⟩ ⟶ ⟨query expression⟩ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣               ␣               ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ␣

≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Query Node q = static cast⟨Query Node⟩( \underline{\overline{}});

§583  IWF Metadata Harvester III  ⟨QUERY PRIMARY⟩ ⟶  309

\underline{\overline{}}= \underline{\overline{}}; } ; 583. ⟨query primary⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Query Node curr query node = new Query Type; curr query node value type = Query Type :: ; curr query node value = static cast⟨void ∗⟩(new string); ∗static cast⟨string ∗⟩(curr query node value) = \underline{\overline{}}; \underline{\overline{}}= static cast⟨void ∗⟩(curr query node);

} ;

310 ⟨QUERY PRIMARY⟩ ⟶ IWF Metadata Harvester III §584

584. ⟨query primary⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Query Node curr query node = new Query Type; curr query node value type = Query Type :: ; curr query node value = static cast⟨void ∗⟩(new int); ∗static cast⟨int ∗⟩(curr query node value) = \underline{\overline{}}; \underline{\overline{}}= static cast⟨void ∗⟩(curr query node);

} ; 585. ⟨query primary⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Query Node curr query node = new Query Type; curr query node value type = Query Type :: ; curr query node value = static cast⟨void ∗⟩(new float); ∗static cast⟨float ∗⟩(curr query node value) = \underline{\overline{}}; \underline{\overline{}}= static cast⟨void ∗⟩(curr query node);

} ;

586. query secondary. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this type declaration.

312 ⟨QUERY SECONDARY⟩ ⟶ ⟨QUERY PRIMARY⟩ IWF Metadata Harvester III §587

587. ⟨query secondary⟩ ⟶ ⟨query primary⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= \underline{\overline{}}; } ; §588 IWF Metadata Harvester III⟨QUERY SECONDARY⟩ ⟶ ⟨QUERY SECONDARY⟩ ⟨AND OR AND NOT⟩ ⟨QUERY PRIMARY⟩ 313

588. ⟨query secondary⟩ ⟶ ⟨query secondary⟩ ⟨and or and not⟩ ⟨query primary⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣              ␣             ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ␣

≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Query Node secondary = static cast⟨Query Node⟩( \underline{\overline{}}); Query Node primary = static cast⟨Query Node⟩( \underline{\overline{}}); primary up = secondary ; primary query type = Query Type :: ; primary negated = ( \underline{\overline{}}≡ ) ? true : false; while (secondary and node ≠ 0) secondary = secondary and node; secondary and node = primary ; primary query ctr = secondary query ctr + 1; \underline{\overline{}}= \underline{\overline{}};

} ;

589. query tertiary. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this type declaration.

314 ⟨QUERY TERTIARY⟩ ⟶ ⟨QUERY SECONDARY⟩ IWF Metadata Harvester III §590

590. ⟨query tertiary⟩ ⟶ ⟨query secondary⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= \underline{\overline{}}; } ; §591 IWF Metadata Harvester III⟨QUERY TERTIARY⟩ ⟶ ⟨QUERY TERTIARY⟩ ⟨XOR OR XOR NOT⟩ ⟨QUERY SECONDARY⟩ 315

591. ⟨query tertiary⟩ ⟶ ⟨query tertiary⟩ ⟨xor or xor not⟩ ⟨query secondary⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣             ␣             ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ␣

≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Query Node tertiary = static cast⟨Query Node⟩( \underline{\overline{}}); Query Node secondary = static cast⟨Query Node⟩( \underline{\overline{}}); secondary up = tertiary ; secondary query type = Query Type :: ; secondary negated = ( \underline{\overline{}}≡ ) ? true : false; while (tertiary xor node ≠ 0) tertiary = tertiary xor node; tertiary xor node = secondary ; secondary query ctr = tertiary query ctr + 1; \underline{\overline{}}= \underline{\overline{}};

} ;

592. query expression. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this type declaration.

316 ⟨QUERY EXPRESSION⟩ ⟶ ⟨QUERY TERTIARY⟩ IWF Metadata Harvester III §593

593. ⟨query expression⟩ ⟶ ⟨query tertiary⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= \underline{\overline{}}; } ; §594 IWF Metadata Harvester III⟨QUERY EXPRESSION⟩ ⟶ ⟨QUERY EXPRESSION⟩ ⟨OR OR OR NOT⟩ ⟨QUERY TERTIARY⟩ 317

594. ⟨query expression⟩ ⟶ ⟨query expression⟩ ⟨or or or not⟩ ⟨query tertiary⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣               ␣           ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ␣

≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Query Node expression = static cast⟨Query Node⟩( \underline{\overline{}}); Query Node tertiary = static cast⟨Query Node⟩( \underline{\overline{}}); tertiary up = expression; tertiary query type = Query Type :: ; while (expression or node ≠ 0) expression = expression or node; tertiary negated = ( \underline{\overline{}}≡ ) ? true : false; expression or node = tertiary ; tertiary query ctr = expression query ctr + 1; \underline{\overline{}}= \underline{\overline{}};

} ;

595. Boolean operators. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this section with the type declarations of and or and not , or or or not , and xor or xor not .

⟨ Type declarations for non-terminal symbols 399 ⟩ +≡

\underline{\overline{␣          ␣}} \underline{\overline{␣          ␣}} \underline{\overline{␣          ␣}}

318 ⟨AND OR AND NOT⟩ ⟶ IWF Metadata Harvester III §596

596. ⟨and or and not⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

§597  IWF Metadata Harvester III  ⟨AND OR AND NOT⟩ ⟶  319

597. ⟨and or and not⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

320 ⟨OR OR OR NOT⟩ ⟶ IWF Metadata Harvester III §598

598. ⟨or or or not⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

§599  IWF Metadata Harvester III  ⟨OR OR OR NOT⟩ ⟶  321

599. ⟨or or or not⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

322 ⟨XOR OR XOR NOT⟩ ⟶ IWF Metadata Harvester III §600

600. ⟨xor or xor not⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

§601  IWF Metadata Harvester III  ⟨XOR OR XOR NOT⟩ ⟶  323

601. ⟨xor or xor not⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= ; } ;

602. Datasource expressions (dtsrcexp.w). [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this file.

603.

⟨ dtsrcexp.w 603 ⟩ ≡

static char dtsrcexp id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 7 and 8. This code is used in section 642.

604. datasource primary. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this type declaration.

324 ⟨DATASOURCE PRIMARY⟩ ⟶ ⟨DATASOURCE VARIABLE⟩ IWF Metadata Harvester III §605

605. ⟨datasource primary⟩ ⟶ ⟨datasource variable⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node curr id node = static cast⟨Id Node⟩( \underline{\overline{}}); if (curr id node ∧ curr id node value) {

Datasource Node curr datasource node = new Datasource Type; ∗curr datasource node = ∗static cast⟨Datasource Node⟩(curr id node value); \underline{\overline{}}= static cast⟨void ∗⟩(curr datasource node);

} else \underline{\overline{}}= 0;

#ifdef temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif } ;

§606  IWF Metadata Harvester III⟨DATASOURCE PRIMARY⟩ ⟶ ⟨DATASOURCE EXPRESSION⟩  325

606. ⟨datasource primary⟩ ⟶ ⟨datasource expression⟩ . [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣               ␣                    ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣

␣ ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Datasource Node q = static cast⟨Datasource Node⟩( \underline{\overline{}});

\underline{\overline{}}= \underline{\overline{}}; } ;

607. datasource secondary. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this type declaration.

326 ⟨DATASOURCE SECONDARY⟩ ⟶ ⟨DATASOURCE PRIMARY⟩IWF Metadata Harvester III §608

608. ⟨datasource secondary⟩ ⟶ ⟨datasource primary⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= \underline{\overline{}}; } ;

609. datasource tertiary. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this type declaration.

§610 IWF Metadata Harvester III⟨DATASOURCE TERTIARY⟩ ⟶ ⟨DATASOURCE SECONDARY⟩ 327

610. ⟨datasource tertiary⟩ ⟶ ⟨datasource secondary⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= \underline{\overline{}}; } ;

611. datasource expression. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this type declaration.

328 ⟨DATASOURCE EXPRESSION⟩ ⟶ ⟨DATASOURCE TERTIARY⟩IWF Metadata Harvester III §612

612. ⟨datasource expression⟩ ⟶ ⟨datasource tertiary⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= \underline{\overline{}}; } ;

613. String expressions (strings.w). [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this file.

⟨ strings.w 613 ⟩ ≡

static char strings id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is used in section 642.

614. ⟨string primary⟩. [LDF 2006.11.16.]

Log

[2006.11.16.] Added this type declaration.

§615  IWF Metadata Harvester III  ⟨STRING PRIMARY⟩ ⟶ ⟨STRING VARIABLE⟩ 329

615. ⟨string primary⟩ ⟶ ⟨string variable⟩. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node curr id node = static cast⟨Id Node⟩( \underline{\overline{}});

if (curr id node ≡ 0 ∨ curr id node value ≡ 0) strcpy ( \underline{\overline{}}, );

else {

strcpy ( \underline{\overline{}}, static cast⟨string ∗⟩(curr id node value) c str ( ));

} } ;

330 ⟨STRING PRIMARY⟩: IWF Metadata Harvester III §616

616. ⟨string primary⟩: . [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

strcpy ( \underline{\overline{}}, \underline{\overline{}}); } ;

§617  IWF Metadata Harvester III  ⟨STRING PRIMARY⟩ ⟶ ⟨STRING EXPRESSION⟩  331

617. ⟨string primary⟩ ⟶ ⟨string expression⟩ . [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣               ␣                ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣

≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

strcpy ( \underline{\overline{}}, \underline{\overline{}}); } ;

618. string secondary. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this type declaration.

332 ⟨STRING SECONDARY⟩ ⟶ ⟨STRING PRIMARY⟩ IWF Metadata Harvester III §619

619. ⟨string secondary⟩ ⟶ ⟨string primary⟩. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

strcpy ( \underline{\overline{}}, \underline{\overline{}}); } ;

620. string tertiary. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this type declaration.

§621  IWF Metadata Harvester III  ⟨STRING TERTIARY⟩ ⟶ ⟨STRING SECONDARY⟩ 333

621. ⟨string tertiary⟩ ⟶ ⟨string secondary⟩. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

strcpy ( \underline{\overline{}}, \underline{\overline{}}); } ;

622. string expression. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this type declaration.

334 ⟨STRING EXPRESSION⟩ ⟶ ⟨STRING TERTIARY⟩ IWF Metadata Harvester III §623

623. ⟨string expression⟩ ⟶ ⟨string tertiary⟩. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

strcpy ( \underline{\overline{}}, \underline{\overline{}}); } ;

624. Datetime expressions (dttmexp.w). [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this file.

625.

⟨ dttmexp.w 625 ⟩ ≡

static char dttmexp id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 7 and 8. This code is used in section 642.

626. datetime primary. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this type declaration.

§627  IWF Metadata Harvester III  ⟨DATETIME PRIMARY⟩ ⟶ ⟨DATETIME VARIABLE⟩ 335

627. ⟨datetime primary⟩ ⟶ ⟨datetime variable⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

\underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Id Node curr id node = static cast⟨Id Node⟩( \underline{\overline{}}); if (curr id node ∧ curr id node value) {

Date Time Node curr datetime node = new Date Time Type; ∗curr datetime node = ∗static cast⟨Date Time Node⟩(curr id node value); \underline{\overline{}}= static cast⟨void ∗⟩(curr datetime node);

} else \underline{\overline{}}= 0;

#ifdef temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif } ; 336 ⟨DATETIME PRIMARY⟩ ⟶ ⟨DATETIME EXPRESSION⟩ IWF Metadata Harvester III §628

628. ⟨datetime primary⟩ ⟶ ⟨datetime expression⟩ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣               ␣                  ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ≪

␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Date Time Node q = static cast⟨Date Time Node⟩( \underline{\overline{}});

\underline{\overline{}}= \underline{\overline{}}; } ; §629 IWF Metadata Harvester III ⟨DATETIME PRIMARY⟩ ⟶ ⟨DATETIME ELEMENT LIST⟩ 337

629. ⟨datetime primary⟩ ⟶ ⟨datetime element list⟩. [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Date Time Node d = 0; datetime assignment func 1 (scanner node, d, , \underline{\overline{}}); \underline{\overline{}}= static cast⟨void ∗⟩(d);

} ;

630. datetime secondary. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this type declaration.

338 ⟨DATETIME SECONDARY⟩ ⟶ ⟨DATETIME PRIMARY⟩ IWF Metadata Harvester III §631

631. ⟨datetime secondary⟩ ⟶ ⟨datetime primary⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= \underline{\overline{}}; } ;

632. datetime tertiary. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this type declaration.

§633  IWF Metadata Harvester III  ⟨DATETIME TERTIARY⟩ ⟶ ⟨DATETIME SECONDARY⟩ 339

633. ⟨datetime tertiary⟩ ⟶ ⟨datetime secondary⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= \underline{\overline{}}; } ;

634. datetime expression. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this type declaration.

340 ⟨DATETIME EXPRESSION⟩ ⟶ ⟨DATETIME TERTIARY⟩ IWF Metadata Harvester III §635

635. ⟨datetime expression⟩ ⟶ ⟨datetime tertiary⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

\underline{\overline{}}= \underline{\overline{}}; } ;

636. Datetime element list. [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this type declaration.

§637  IWF Metadata Harvester III  ⟨DATETIME ELEMENT LIST⟩ ⟶  341

637. ⟨datetime element list⟩ ⟶ . [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣       ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif vector⟨pair⟨int, void ∗⟩⟩ ∗v = new vector⟨pair⟨int, void ∗⟩⟩; int ∗i = new int( \underline{\overline{}}); v push back (make pair ( , static cast⟨void ∗⟩(i))); \underline{\overline{}}= static cast⟨void ∗⟩(v);

} ; 342 ⟨DATETIME ELEMENT LIST⟩ ⟶ IWF Metadata Harvester III §638

638. ⟨datetime element list⟩ ⟶ . [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣     ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter ); temp strm ≪ endl ≪ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif vector⟨pair⟨int, void ∗⟩⟩ ∗v = new vector⟨pair⟨int, void ∗⟩⟩; float ∗f = new float( \underline{\overline{}}); v push back (make pair ( , static cast⟨void ∗⟩(f))); \underline{\overline{}}= static cast⟨void ∗⟩(v);

} ;

§639  IWF Metadata Harvester III⟨DATETIME ELEMENT LIST⟩ ⟶ ⟨DATETIME ELEMENT LIST⟩  343

639. ⟨datetime element list⟩ ⟶ ⟨datetime element list⟩ . [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                    ␣       ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪

␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif vector⟨pair⟨int, void ∗⟩⟩ ∗v = static cast⟨vector⟨pair⟨int, void ∗⟩⟩ ∗⟩( \underline{\overline{}}); int ∗i = new int( \underline{\overline{}}); v push back (make pair ( , static cast⟨void ∗⟩(i))); \underline{\overline{}}= static cast⟨void ∗⟩(v);

} ; 344 ⟨DATETIME ELEMENT LIST⟩ ⟶ ⟨DATETIME ELEMENT LIST⟩ IWF Metadata Harvester III §640

640. ⟨datetime element list⟩ ⟶ ⟨datetime element list⟩ . [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this rule.

⟨ Parser rules 388 ⟩ +≡

   \underline{\overline{␣                    ␣     ␣}}

{ #if 1 /∗ 0 ∗/ #define #else #undef #endif #ifdef

Scanner Node scanner node = static cast⟨Scanner Node⟩(parameter );

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪

␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif vector⟨pair⟨int, void ∗⟩⟩ ∗v = static cast⟨vector⟨pair⟨int, void ∗⟩⟩ ∗⟩( \underline{\overline{}}); float ∗f = new float( \underline{\overline{}}); v push back (make pair ( , static cast⟨void ∗⟩(f))); \underline{\overline{}}= static cast⟨void ∗⟩(v);

}

;

641. Putting the parser together.

642. Filename sections. These sections contain the CVS ID strings for the individual parser files. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

⟨ Filename sections 642 ⟩ ≡

  ⟨ parser.w 359 ⟩
  ⟨ declrtns.w 401 ⟩
  ⟨ grpstmnt.w 398 ⟩
  ⟨ variabls.w 422 ⟩
  ⟨ assign.w 446 ⟩
  ⟨ queryexp.w 579 ⟩
  ⟨ dtsrcexp.w 603 ⟩
  ⟨ commands.w 565 ⟩
  ⟨ strings.w 613 ⟩
  ⟨ dttmexp.w 625 ⟩

This code is used in sections 643 and 644.

§643  IWF Metadata Harvester III  PUTTING THE PARSER TOGETHER 345

643. This is what’s written to parser.yyy. [LDF 2006.10.20.] ⟨ 643 ⟩ ≡

\underline{\overline{}} ⟨ Include files 10 ⟩ ⟨ Filename sections 642 ⟩ ⟨ Declare yylex 301 ⟩ ⟨ Declare yyerror 362 ⟩

#define parameter #define parameter

stringstream temp strm; \underline{\overline{}} ⟨ union declaration for 363 ⟩ ⟨ Bison declarations 364 ⟩ ⟨ Token and type declarations 366 ⟩ ⟨ Type declarations for non-terminal symbols 399 ⟩ \underline{\overline{}} ⟨ Parser rules 388 ⟩

346  PUTTING THE PARSER TOGETHER  IWF Metadata Harvester III §644

644. This is what isn’t compiled. The file parser.c isn’t compiled, but including ⟨ parser.w 359 ⟩ here prevents CWEAVE from issuing a warning. [LDF 2006.10.24.]

⟨ Filename sections 642 ⟩ #if 0 /∗ 1 ∗/

⟨ Garbage 393 ⟩ #endif

645. Parser functions (prsrfncs.web). [LDF 2006.10.31.]

Log

[LDF 2006.10.31.] Created this file.

⟨ prsrfncs.web 645 ⟩ ≡

static char id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is used in section 695.

646. Include files. ⟨ Include files 10 ⟩ +≡ #include #ifdef #include #else #include #endif #include #include #include #include #include #include #include

647. Preprocessor macro calls. ⟨ Preprocessor macro calls 19 ⟩ +≡ #ifdef #pragma once #endif

648. Parser function definitions. [LDF 2006.10.31.]

§650  IWF Metadata Harvester III  VARIABLE FUNC  347

649. Functions for variables. [LDF 2006.11.02.] 650. variable func. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this function.

⟨ Define parser functions 650 ⟩ ≡

void ∗Scan Parse ::variable func(void ∗v, char ∗name){ #if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm;

Scanner Node scanner node = static cast⟨Scanner Node⟩(v); #ifdef

temp strm ≪ ␣ ≪ endl ≪ ␣ ␣ ≪ name ≪

endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

See also sections 651, 652, 653, 654, 655, 656, 658, 659, 660, 662, 663, 664, 665, 666, 668, 669, 670, 671, 672, 673, 674, 675, 676,

677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, and 693. This code is used in section 695.

651. Error handling: scanner node ≡ 0. This shouldn’t ever happen. If it does, we can’t continue.

[LDF 2006.11.01.]

⟨ Define parser functions 650 ⟩ +≡

if (scanner node ≡ 0) {

temp strm ≪ ␣␣ ␣ ≪ ␣ ␣ ␣␣ ␣ ≪ endl ≪

        ␣        ␣              ␣    ␣       ␣     ␣  ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( ); return 0;

} /∗ if (scanner node ≡ 0) ∗/

348 VARIABLE FUNC  IWF Metadata Harvester III  §652

map⟨string, Id Node⟩::iterator iter = scanner node id map.find (name); 652. Error handling: name not found in scanner node id map. [LDF 2006.11.03.] ⟨ Define parser functions 650 ⟩ +≡

if (iter ≡ scanner node id map.end ( )) {

temp strm ≪ ␣␣ ␣ ≪ endl ≪ ≪ name ≪ ␣ ␣ ␣ ␣ ≪ endl ≪

      ␣        ␣              ␣    ␣       ␣     ␣  ≪ endl ;

cerr mutex .Lock ( );

cerr ≪ temp strm.str ( );

cerr mutex .Unlock ( );

if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( );

temp strm.str ( );

scanner node float vector .clear ( );

return 0; } /∗ if (iter ≡ scanner node id map.end ( )) ∗/

653. name found in scanner node id map. [LDF 2006.11.03.] ⟨ Define parser functions 650 ⟩ +≡

else /∗ iter ≠ scanner node id map.end ( ) ∗/ { Id Node curr id node = 0;

#ifdef

temp strm ≪ ␣ ≪ endl ≪ ≪ name ≪

␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

654. name doesn’t refer to an array. [LDF 2006.11.03.] ⟨ Define parser functions 650 ⟩ +≡

if (strchr (name, ¥ ) ≡ 0) {

curr id node = iter second ; } /∗ if (strchr (name, ¥ ) ≡ 0) ∗/ 655. name refers to an array. [LDF 2006.11.03.] ⟨ Define parser functions 650 ⟩ +≡

else /∗ (strchr (name, ¥ ) ≠ 0) ∗/ {

#ifdef

temp strm ≪  ␣  ≪ name ≪ ␣        ␣ ≪ scanner node float vector .size( ) ≪

    ␣         ␣  ;

if (scanner node float vector .size( ) > 1) temp strm ≪ ; temp strm ≪ ≪ endl ;

#endif int i = 0; for (vector⟨float⟩::const iterator subscript iter = scanner node float vector .begin( );

subscript iter ≠ scanner node float vector .end ( ); ^{++}subscript iter ) {

#ifdef

temp strm ≪ ␣ ≪ i^{++} ≪ ␣ ␣ ≪ ∗subscript iter ≪ endl ; #endif

} /∗ for ∗/ #ifdef

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

curr id node = scanner node lookup(name, true, iter second type); } /∗ else (strchr (name, ¥ ) ≠ 0) ∗/ 656. Push a Token Type object onto scanner node token stack . [LDF 2006.11.03.] ⟨ Define parser functions 650 ⟩ +≡

curr value; curr value.pointer value = static cast⟨void ∗⟩(curr id node); scanner node token stack .push(Token Type(curr id node type, curr value));

#ifdef

temp strm ≪ ␣ ␣ ␣ ≪

    ␣      ␣     ␣              ␣     ␣   ␣  ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif scanner node float vector .clear ( ); return static cast⟨void ∗⟩(curr id node); } /∗ else (iter ≠ scanner node id map.end ( )) ∗/

#undef } /∗ End of Scan Parse ::variable func definition. ∗/

657. Functions for declarations. [LDF 2006.11.01.]

§658  IWF Metadata Harvester III  DECLARE VARIABLE FUNCTION 351

658. Declare variable function. [LDF 2006.11.01.]

Log

[2006.11.01.] Added this function.

[LDF 2006.11.01.] Added the char ∗name argument.

[LDF 2006.11.02.] Changed the return value to Id Node. Now returning curr id node if successful, or 0 if not.

⟨ Define parser functions 650 ⟩ +≡

Id Node Scan Parse ::declare variable func(void ∗v, const unsigned short type, char ∗name){ #if 0 /∗ 1 ∗/ #define #else #undef #endif

stringstream temp strm;

Scanner Node scanner node = static cast⟨Scanner Node⟩(v); #ifdef

temp strm ≪  ␣  ≪ endl ≪  ␣  ␣ ≪
token map[type] ≪  ≪ endl ≪  ␣  ␣ ≪ name ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

659. Error handling: scanner node ≡ 0. This shouldn’t ever happen. If it does, we can’t continue.

[LDF 2006.11.01.]

⟨ Define parser functions 650 ⟩ +≡

if (scanner node ≡ 0) {

temp strm ≪ ␣␣ ␣ ≪ ␣ ␣ ␣␣ ␣ ≪ endl ≪

        ␣        ␣              ␣    ␣       ␣     ␣  ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( ); return 0;

} /∗ if (scanner node ≡ 0) ∗/

352  DECLARE VARIABLE FUNCTION  IWF Metadata Harvester III §660

660.

Log

[LDF 2006.11.02.] Now setting curr id node scanner node = scanner node.

⟨ Define parser functions 650 ⟩ +≡ Id Node curr id node = new Id Type; curr id node name = name; curr id node type = type; curr id node scanner node = scanner node; scanner node id map[curr id node name] = curr id node;

#ifdef

temp strm ≪ ␣ ␣ ≪ scanner node id map[curr id node name] name ≪ endl ≪

    ␣  ␣  ≪

token map[scanner node id map[curr id node name] type] ≪ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif #ifdef

temp strm ≪ endl ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return curr id node; #undef

} /∗ End of Scan Parse ::declare variable func definition. ∗/

§662  IWF Metadata Harvester III  QUERY ASSIGNMENT FUNC 0  353

661. Functions for assignments. [LDF 2006.11.02.] 662. query assignment func 0. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this function.

[LDF 2006.11.13.] Added the arguments unsigned int arg 0 , unsigned int arg 1 , and void ∗value.

⟨ Define parser functions 650 ⟩ +≡

void ∗Scan Parse ::query assignment func 0 (void ∗v, void ∗object , unsigned int

assignment type, unsigned int arg 0 , unsigned int arg 1 , void ∗value, bool negate){

#if 1 /∗ 0 ∗/ #define #else #undef #endif

stringstream temp strm;

Scanner Node scanner node = static cast⟨Scanner Node⟩(v); #ifdef

temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

663. Error handling: scanner node ≡ 0. This shouldn’t ever happen. If it does, we can’t continue.

[LDF 2006.11.01.]

⟨ Define parser functions 650 ⟩ +≡

if (scanner node ≡ 0) {

temp strm ≪ ␣␣ ␣ ≪ ␣ ␣ ␣␣ ␣ ≪ endl ≪

        ␣        ␣              ␣    ␣       ␣     ␣  ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); temp strm.str ( ); return 0;

354 QUERY ASSIGNMENT FUNC 0  IWF Metadata Harvester III  §664

} /∗ if (scanner node ≡ 0) ∗/ 664. ⟨ Define parser functions 650 ⟩ +≡

if (object ≡ 0) {

temp strm ≪  ␣␣  ␣  ≪
endl ≪  ␣  ␣  ␣␣      ␣       ␣  ≪ endl ≪

      ␣        ␣              ␣    ␣       ␣     ␣  ≪ endl ;

cerr mutex .Lock ( );

cerr ≪ temp strm.str ( );

cerr mutex .Unlock ( );

scanner node log strm ≪ temp strm.str ( );

temp strm.str ( );

return 0; } /∗ if (object ≡ 0) ∗/

665. ⟨ Define parser functions 650 ⟩ +≡

Id Node curr id node = static cast⟨Id Node⟩(object ); Query Node curr query node = 0; if (curr id node value ≡ 0) {

curr query node = new Query Type;

curr query node query type = Query Type :: ;

curr query node id node = curr id node;

curr query node name = curr id node name;

curr query node scanner node = scanner node;

curr id node value = static cast⟨void ∗⟩(curr query node); } /∗ if (curr id node value ≡ 0) ∗/ else {

curr query node = static cast⟨Query Node⟩(curr id node value); }

#if 0 /∗ 1 ∗/ #ifdef

temp strm ≪ ␣ ␣ ≪ token map[arg 0 ] ≪ endl ≪ ␣ ␣ ≪ token map[arg 1 ] ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif #endif 666. Targets. [LDF 2006.11.13.]

Log

[2006.11.13.] Added this section.

⟨ Define parser functions 650 ⟩ +≡

if (arg 0 ≡ ) {

if (arg 1 ≡ ∧ find (curr query node target types .begin( ), curr query node target types .end ( ),

Query Type :: ) ≡ curr query node target types .end ( )) curr query node target types .push back (Query Type :: );

else if (arg 1 ≡ ∧find (curr query node target types .begin( ), curr query node target types .end ( ),

Query Type :: ) ≡ curr query node target types .end ( )) curr query node target types .push back (Query Type :: );

} /∗ if (arg 0 ≡ ) ∗/

else if (arg 0 ≡ ) {

if (arg 1 ≡ ∧ find (curr query node target types .begin( ), curr query node target types .end ( ),

Query Type :: ) ≡ curr query node target types .end ( )) curr query node target types .push back (Query Type :: );

else if (arg 1 ≡ ∧find (curr query node target types .begin( ), curr query node target types .end ( ),

Query Type :: ) ≡ curr query node target types .end ( )) curr query node target types .push back (Query Type :: );

}  /∗ else if (arg 0 ≡  ) ∗/

667. Fields. [LDF 2006.11.13.] 668. Fields. [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

[LDF 2006.12.05.] Added code for .

[LDF 2006.12.12.] Added code for .

[LDF 2006.12.12.] Added code to account for tokens that refer to additional tables from the OAI database (dc test).

[LDF 2006.12.12.] Added code to account for the tokens that refer to additional tables in the PICA database (PICA DB).

⟨ Define parser functions 650 ⟩ +≡

if (arg 0 ≡  ∨ arg 0 ≡  ∨ arg 0 ≡  ∨ arg 0 ≡
∨ arg 0 ≡  ∨ arg 0 ≡  ∨ arg 0 ≡  ∨ arg 0 ≡
∨ arg 0 ≡  ∨ arg 0 ≡  ∨ arg 0 ≡  ∨ arg 0 ≡
∨ arg 0 ≡  ∨ arg 0 ≡  ∨ arg 0 ≡
∨ arg 0 ≡  ∨ arg 0 ≡  ∨ arg 0 ≡
∨ arg 0 ≡  ∨ arg 0 ≡  ∨ arg 0 ≡  ∨ arg 0 ≡
∨ arg 0 ≡  ∨ arg 0 ≡  ∨ arg 0 ≡  ∨ arg 0 ≡
∨ arg 0 ≡  ∨ arg 0 ≡  ) { unsigned int curr field type;
if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;

else if (arg 0 ≡ )

curr field type = Query Type :: ;

else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;

else if (arg 0 ≡ )

curr field type = Query Type :: ; else if (arg 0 ≡ )

curr field type = Query Type :: ; else if (arg 0 ≡ ) curr field type = Query Type :: ; else if (arg 0 ≡ )

curr field type = Query Type :: ;

else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;

else if (arg 0 ≡ )

curr field type = Query Type :: ;

else if (arg 0 ≡  ) curr field type = Query Type ::  ;
else if (arg 0 ≡  ) curr field type = Query Type ::  ;

while (curr query node query type ≠ Query Type :: )

curr query node = curr query node up; if (curr query node field type ≡ Query Type :: ∧ curr query node value ≡ 0) {

curr query node field type = curr field type; string ∗curr string = new string; ∗curr string = static cast⟨char ∗⟩(value); curr query node value = static cast⟨void ∗⟩(curr string ); curr query node value type = Query Type :: ; curr query node negated = negate;

} 669.

Log

[2006.11.14.] Added this section.

⟨ Define parser functions 650 ⟩ +≡

else {

if (assignment type ≡ ∨ assignment type ≡ ) { while (curr query node and node ≠ 0) curr query node = curr query node and node; curr query node and node = new Query Type; curr query node and node query ctr = curr query node query ctr + 1; curr query node and node id node = curr id node; curr query node and node name = curr id node name;

} else if (assignment type ≡ ) {

while (curr query node or node ≠ 0) curr query node = curr query node or node; curr query node or node = new Query Type; curr query node or node query ctr = curr query node query ctr + 1; curr query node or node id node = curr id node; curr query node or node name = curr id node name;

} else if (assignment type ≡ ) {

while (curr query node xor node ≠ 0) curr query node = curr query node xor node; curr query node xor node = new Query Type; curr query node xor node query ctr = curr query node query ctr + 1; curr query node xor node id node = curr id node; curr query node xor node name = curr id node name;

} if (curr query node query type ≡ Query Type :: ) {

if (assignment type ≡ ∨ assignment type ≡ ) {

curr query node and node up = curr query node; } else if (assignment type ≡ ) {

curr query node or node up = curr query node; } else if (assignment type ≡ ) {

curr query node xor node up = curr query node; }

} /∗ if ∗/ else {

if (assignment type ≡ ∨ assignment type ≡ ) {

curr query node and node up = curr query node up; } else if (assignment type ≡ ) {

curr query node or node up = curr query node up; } else if (assignment type ≡ ) {

curr query node xor node up = curr query node up; }

} /∗ else ∗/

if (assignment type ≡  ∨ assignment type ≡  ) {

curr query node = curr query node and node;

curr query node query type = Query Type :: ;

curr query node field type = curr field type; } else if (assignment type ≡ ) {

curr query node = curr query node or node;

curr query node query type = Query Type :: ;

curr query node field type = curr field type; } else if (assignment type ≡ ) {

curr query node = curr query node xor node;

curr query node query type = Query Type :: ;

curr query node field type = curr field type; } string ∗curr string = new string; ∗curr string = static cast⟨char ∗⟩(value); curr query node value = static cast⟨void ∗⟩(curr string ); curr query node value type = Query Type :: ; curr query node negated = negate;

} /∗ else ∗/ } /∗ if ∗/

#ifdef

temp strm ≪ ␣ ␣ ␣ ≪ endl ≪

  ␣      ␣     ␣                  ␣     ␣  ␣  ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return static cast⟨void ∗⟩(curr query node); } /∗ End of Scan Parse ::query assignment func 0 definition. ∗/ 670. query assignment func 1. [LDF 2006.12.19.]

Log

[LDF 2006.12.19.] Added this function.

⟨ Define parser functions 650 ⟩ +≡

int Scan Parse ::query assignment func 1 (Scanner Node scanner node, Id Node &curr id node, void ∗&field specifier , int assignment operator , int negation optional , int match term optional , void ∗&v, int type){ stringstream temp strm;

#if 1 /∗ 0 ∗/ #define #else # # undef #endif #ifdef

temp strm ≪ endl ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif Query Node curr query = 0; Query Node traverse query = 0; Query Node temp query = 0; if (assignment operator ≡ ∨ assignment operator ≡ ∨ assignment operator ≡

) { if (curr id node ∧ curr id node value) {

curr query = static cast⟨Query Node⟩(curr id node value); while (curr query and node ≠ 0) curr query = curr query and node; if (type ≡ ) curr query and node = static cast⟨Query Node⟩(v); else if (type ≡ ) {

temp query = new Query Type;

temp query value type = Query Type :: ; temp query value = v; curr query and node = temp query ;

} curr query and node query ctr = curr query query ctr + 1; traverse query = curr query or node; while (traverse query or node) traverse query = traverse query or node; if (traverse query ) curr query and node query ctr += traverse query query ctr ; traverse query = curr query xor node; while (traverse query xor node) traverse query = traverse query xor node; if (traverse query ) curr query and node query ctr += traverse query query ctr ; curr query and node query type = Query Type :: ; curr query and node up = curr query ; curr query = curr query and node; curr query set field specifier (field specifier , true, scanner node); curr query negated = (negation optional );

} /∗ if ∗/ else if (curr id node) { if (type ≡ ) curr id node value = v; else if (type ≡ ) {

temp query = new Query Type;

temp query value type = Query Type :: ; temp query value = v; curr id node value = static cast⟨void ∗⟩(temp query );

} static cast⟨Query Node⟩(curr id node value) id node = curr id node; static cast⟨Query Node⟩(curr id node value) name = curr id node name; static cast⟨Query Node⟩(curr id node value) query type = Query Type :: ; static cast⟨Query Node⟩(curr id node value) query ctr = 0; static cast⟨Query Node⟩(curr id node value) set field specifier (field specifier , true,

scanner node); static cast⟨Query Node⟩(curr id node value) negated = (negation optional ); curr query = static cast⟨Query Node⟩(curr id node value);

} /∗ else ∗/ else {

if (type ≡ ) {

delete static cast⟨Query Node⟩(v); } else if (type ≡ ) {

delete static cast⟨Date Time Node⟩(v); } v = 0; curr query = 0;

} } /∗ if (assignment operator ≡ ∨ assignment operator ≡

∨ assignment operator ≡ ) ∗/ else if (assignment operator ≡ ) {

if (curr id node ∧ curr id node value) { curr query = static cast⟨Query Node⟩(curr id node value); while (curr query or node ≠ 0) curr query = curr query or node; if (type ≡ ) curr query or node = static cast⟨Query Node⟩(v); else if (type ≡ ) {

temp query = new Query Type;

temp query value type = Query Type :: ; temp query value = v; curr query or node = temp query ;

} curr query or node query type = Query Type :: ; curr query or node query ctr = curr query query ctr + 1; traverse query = curr query and node; while (traverse query and node) traverse query = traverse query and node; if (traverse query ) curr query or node query ctr += traverse query query ctr ; traverse query = curr query xor node; while (traverse query xor node) traverse query = traverse query xor node; if (traverse query ) curr query or node query ctr += traverse query query ctr ; curr query or node up = curr query ; curr query = curr query or node; curr query set field specifier (field specifier , true, scanner node); curr query negated = (negation optional );

} /∗ if ∗/ else if (curr id node) {

if (type ≡ ) curr id node value = v; else if (type ≡ ) {

temp query = new Query Type;

temp query value type = Query Type :: ; temp query value = v; curr id node value = static cast⟨void ∗⟩(temp query );

} static cast⟨Query Node⟩(curr id node value) id node = curr id node; static cast⟨Query Node⟩(curr id node value) name = curr id node name; static cast⟨Query Node⟩(curr id node value) query type = Query Type :: ; static cast⟨Query Node⟩(curr id node value) set field specifier (field specifier , true,

scanner node); static cast⟨Query Node⟩(curr id node value) query ctr = 0; static cast⟨Query Node⟩(curr id node value) negated = (negation optional ); curr query = static cast⟨Query Node⟩(curr id node value);

} /∗ else ∗/ else {

if (type ≡ ) {

delete static cast⟨Query Node⟩(v); } else if (type ≡ ) {

delete static cast⟨Date Time Node⟩(v); } v = 0; curr query = 0; return 1;

} } /∗ if (assignment operator ≡ ) ∗/ else if (assignment operator ≡ ) {

if (curr id node ∧ curr id node value) { curr query = static cast⟨Query Node⟩(curr id node value); while (curr query xor node ≠ 0) curr query = curr query xor node; if (type ≡ ) curr query xor node = static cast⟨Query Node⟩(v); else if (type ≡ ) {

temp query = new Query Type;

temp query value type = Query Type :: ; temp query value = v; curr query xor node = temp query ;

} curr query xor node query ctr = curr query query ctr + 1; traverse query = curr query and node; while (traverse query and node) traverse query = traverse query and node; if (traverse query ) curr query xor node query ctr += traverse query query ctr ; traverse query = curr query or node; while (traverse query or node) traverse query = traverse query or node; if (traverse query ) curr query xor node query ctr += traverse query query ctr ; curr query xor node query type = Query Type :: ; curr query xor node up = curr query ; curr query = curr query xor node; curr query set field specifier (field specifier , true, scanner node); curr query negated = (negation optional ); } /∗ if ∗/ else if (curr id node) {

if (type ≡ ) curr id node value = v; else if (type ≡ ) {

temp query = new Query Type;

temp query value type = Query Type :: ; temp query value = v; curr id node value = static cast⟨void ∗⟩(temp query );

} static cast⟨Query Node⟩(curr id node value) id node = curr id node; static cast⟨Query Node⟩(curr id node value) name = curr id node name; static cast⟨Query Node⟩(curr id node value) query type = Query Type :: ; static cast⟨Query Node⟩(curr id node value) query ctr = 0; static cast⟨Query Node⟩(curr id node value) set field specifier (field specifier , true,

scanner node); static cast⟨Query Node⟩(curr id node value) negated = (negation optional ); curr query = static cast⟨Query Node⟩(curr id node value);

} /∗ else ∗/ else {

if (type ≡ ) {

delete static cast⟨Query Node⟩(v); } else if (type ≡ ) {

delete static cast⟨Date Time Node⟩(v); } v = 0; curr query = 0; return 1;

}

}  /∗ if (assignment operator ≡  ) ∗/

671. ⟨ Define parser functions 650 ⟩ +≡

else { curr query = 0; return 1;

}

672. Set match value. [LDF 2006.12.12.]

Log

[2006.12.12.] Added this section.

⟨ Define parser functions 650 ⟩ +≡

if (curr query ) {

curr query match value = match term optional ; } /∗ if (curr query ) ∗/ 673. ⟨ Define parser functions 650 ⟩ +≡ #ifdef

temp strm ≪ endl ≪ ␣ ␣ ␣ ≪

␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

return 0; #undef

} /∗ End of Scan Parse ::query assignment func 1 definition. ∗/

674. datetime assignment func 0. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this function.

To Do

[LDF 2006.12.18.] Add range checking and code for other assignment operators.

⟨ Define parser functions 650 ⟩ +≡

int Scan Parse ::datetime assignment func 0 (void ∗v, Date Time Node &curr date time node, int

specifier , int op, void ∗val , int type){

#if 1 /∗ 0 ∗/ #define #else #undef #endif

stringstream temp strm;

Scanner Node scanner node = static cast⟨Scanner Node⟩(v); #ifdef

temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif #ifdef

temp strm ≪ ␣ ␣ ≪ token map[specifier ] ≪ endl ≪ ␣ ␣ ≪

token map[op] ≪ endl ≪ ␣ ␣ ≪ token map[type] ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

§675  IWF Metadata Harvester III  DATETIME ASSIGNMENT FUNC 0  365

#endif 675. Error handling: val ≡ 0. [LDF 2006.12.18.] ⟨ Define parser functions 650 ⟩ +≡

if (val ≡ 0) {

temp strm ≪  ␣␣  ␣  ≪
endl ≪  ␣  ␣   ␣␣      ␣  ≪ endl ≪

    ␣        ␣              ␣    ␣       ␣     ␣  ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); return 1;

} /∗ if (val ≡ 0) ∗/

676. ⟨ Define parser functions 650 ⟩ +≡

if (curr date time node ≡ 0) {

366 DATETIME ASSIGNMENT FUNC 0  IWF Metadata Harvester III  §677

curr date time node = new Date Time Type; } /∗ if (curr date time node ≡ 0) ∗/ 677. ⟨ Define parser functions 650 ⟩ +≡

if (op ≡ ) {

if (specifier ≡ ) { if (curr date time node year range begin ≡ 0) curr date time node year range begin = new short; ∗curr date time node year range begin = ∗static cast⟨short ∗⟩(val );

} /∗ if (specifier ≡ ) ∗/ if (specifier ≡ ) {

if (curr date time node year range end ≡ 0) curr date time node year range end = new short; ∗curr date time node year range end = ∗static cast⟨short ∗⟩(val );

} /∗ if (specifier ≡ ) ∗/ if (specifier ≡ ) {

if (curr date time node year ≡ 0) curr date time node year = new short; ∗curr date time node year = ∗static cast⟨short ∗⟩(val );

} /∗ if (specifier ≡ ) ∗/ else if (specifier ≡ ) {

if (curr date time node month ≡ 0) curr date time node month = new unsigned short; ∗curr date time node month = ∗static cast⟨unsigned short ∗⟩(val );

} /∗ else if (specifier ≡ ) ∗/ else if (specifier ≡ ) {

if (curr date time node day ≡ 0) curr date time node day = new unsigned short; ∗curr date time node day = ∗static cast⟨unsigned short ∗⟩(val );

} /∗ else if (specifier ≡ ) ∗/ else if (specifier ≡ ) {

if (curr date time node hour ≡ 0) curr date time node hour = new unsigned short; ∗curr date time node hour = ∗static cast⟨unsigned short ∗⟩(val );

} /∗ else if (specifier ≡ ) ∗/ else if (specifier ≡ ) {

if (curr date time node minute ≡ 0) curr date time node minute = new unsigned short; ∗curr date time node minute = ∗static cast⟨unsigned short ∗⟩(val );

} /∗ else if (specifier ≡ ) ∗/ else if (specifier ≡ ) {

if (curr date time node second ≡ 0) curr date time node second = new float; if (type ≡ ) ∗curr date time node second = ∗static cast⟨float ∗⟩(val ); else if (type ≡ )

∗curr date time node second = static cast⟨float⟩(∗static cast⟨int ∗⟩(val ));

}  /∗ else if (specifier ≡  ) ∗/
}  /∗ if (op ≡  ) ∗/

678. ⟨ Define parser functions 650 ⟩ +≡

else

if (op ≡ ) {

if (specifier ≡ ) {

if (curr date time node year range begin ≡ 0)

curr date time node year range begin = new short(0); ∗curr date time node year range begin += ∗static cast⟨short ∗⟩(val );

} /∗ if (specifier ≡ ) ∗/ if (specifier ≡ ) {

if (curr date time node year range end ≡ 0)

curr date time node year range end = new short(0); ∗curr date time node year range end += ∗static cast⟨short ∗⟩(val );

} /∗ if (specifier ≡ ) ∗/ if (specifier ≡ ) {

if (curr date time node year ≡ 0) curr date time node year = new short(0); ∗curr date time node year += ∗static cast⟨short ∗⟩(val );

} /∗ if (specifier ≡ ) ∗/ else if (specifier ≡ ) {

if (curr date time node month ≡ 0) curr date time node month = new unsigned short(0); ∗curr date time node month += ∗static cast⟨unsigned short ∗⟩(val );

} /∗ else if (specifier ≡ ) ∗/ else if (specifier ≡ ) {

if (curr date time node day ≡ 0) curr date time node day = new unsigned short(0); ∗curr date time node day += ∗static cast⟨unsigned short ∗⟩(val );

} /∗ else if (specifier ≡ ) ∗/ else if (specifier ≡ ) {

if (curr date time node hour ≡ 0) curr date time node hour = new unsigned short(0); ∗curr date time node hour += ∗static cast⟨unsigned short ∗⟩(val );

} /∗ else if (specifier ≡ ) ∗/ else if (specifier ≡ ) {

if (curr date time node minute ≡ 0) curr date time node minute = new unsigned short(0); ∗curr date time node minute += ∗static cast⟨unsigned short ∗⟩(val );

} /∗ else if (specifier ≡ ) ∗/ else if (specifier ≡ ) {

if (curr date time node second ≡ 0) curr date time node second = new float(0); if (type ≡ ) ∗curr date time node second += ∗static cast⟨float ∗⟩(val ); else if (type ≡ )

∗curr date time node second += static cast⟨float⟩(∗static cast⟨int ∗⟩(val ));

}  /∗ else if (specifier ≡  ) ∗/
}  /∗ else if (op ≡  ) ∗/

679. ⟨ Define parser functions 650 ⟩ +≡

else

if (op ≡  ) { }  /∗ else if (op ≡  ) ∗/

680. ⟨ Define parser functions 650 ⟩ +≡

else

if (op ≡  ) { }  /∗ else if (op ≡  ) ∗/

681. ⟨ Define parser functions 650 ⟩ +≡

else

if (op ≡  ) { }  /∗ else if (op ≡  ) ∗/

682. Error handling: op has invalid value. [LDF 2006.12.18.] ⟨ Define parser functions 650 ⟩ +≡

else {

temp strm ≪ ␣␣ ␣ ≪ endl ≪ ␣ ␣ ␣ ␣␣ ≪ token map[op] ≪ ␣ ≪ op ≪ ≪ endl ≪

      ␣        ␣              ␣    ␣       ␣     ␣  ≪ endl ;

cerr mutex .Lock ( );

cerr ≪ temp strm.str ( );

cerr mutex .Unlock ( );

scanner node log strm ≪ temp strm.str ( );

temp strm.str ( );

return 1; } /∗ else ∗/

#ifdef

temp strm ≪ ␣ ␣ ≪

␣ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); getchar ( );

#endif return 0; } /∗ End of Scan Parse ::datetime assignment func 0 definition. ∗/ 683. datetime assignment func 1. [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this function.

To Do

[LDF 2006.12.18.] Add range checking and perhaps code for handling different assignment operators.

⟨ Define parser functions 650 ⟩ +≡

int Scan Parse ::datetime assignment func 1 (void ∗v, Date Time Node &d, int op, void ∗&w){ #if 1 /∗ 0 ∗/ #define #else #undef #endif

stringstream temp strm;

Scanner Node scanner node = static cast⟨Scanner Node⟩(v); #ifdef

temp strm ≪ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif

684. ⟨ Define parser functions 650 ⟩ +≡

vector⟨pair⟨int, void ∗⟩⟩ ∗vec = static cast⟨vector⟨pair⟨int, void ∗⟩⟩ ∗⟩(w);

if (vec ≡ 0) {

temp strm ≪ ␣␣ ␣ ≪ endl ≪ ␣ ␣ ␣␣ ≪

        ␣        ␣              ␣    ␣       ␣     ␣  ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); return 1;

} /∗ if (vec ≡ 0) ∗/ 685. ⟨ Define parser functions 650 ⟩ +≡

if (vec size( ) ≡ 0) {

temp strm ≪  ␣␣  ␣  ≪ endl ≪

    ␣  ␣      ␣␣ ≪  ␣        ␣              ␣    ␣       ␣     ␣  ≪

endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); delete vec; vec = 0; return 1;

} /∗ if (vec size( ) ≡ 0) ∗/

686. ⟨ Define parser functions 650 ⟩ +≡

if (vec size( ) > 0 ∧ vec at (0).first ≠ /∗ year ∗/ ∨ vec size( ) > 1 ∧ vec at (1).first ≠ /∗ month ∗/ ∨ vec size( ) > 2 ∧ vec at (2).first ≠ /∗ day ∗/ ∨ vec size( ) > 3 ∧ vec at (3).first ≠ /∗ hour ∗/ ∨ vec size( ) > 4 ∧ vec at (4).first ≠ /∗ minute ∗/ ) {

temp strm ≪  ␣␣  ␣  ≪
endl ≪  ␣     ␣  ␣  ≪ endl ≪

    ␣        ␣              ␣    ␣       ␣     ␣  ≪ endl ;

cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); for (vector⟨pair⟨int, void ∗⟩⟩::iterator iter = vec begin( ); iter ≠ vec end ( ); ^{++}iter ) {

if (iter first ≡ ) {

delete static cast⟨int ∗⟩(iter second ); } else if (iter first ≡ ) {

delete static cast⟨float ∗⟩(iter second ); } iter second = 0;

} /∗ for ∗/ vec clear ( ); delete vec; vec = 0; return 1;

} /∗ if ∗/ 687. Year. [LDF 2006.12.18.] ⟨ Define parser functions 650 ⟩ +≡

if (d ≡ 0) d = new Date Time Type;

d year = static cast⟨short ∗⟩(vec at (0).second ); vec at (0).second = 0;

688. Month. [LDF 2006.12.18.] ⟨ Define parser functions 650 ⟩ +≡

if (vec size( ) > 1) { d month = static cast⟨unsigned short ∗⟩(vec at (1).second ); vec at (1).second = 0;

}

689. Day. [LDF 2006.12.18.] ⟨ Define parser functions 650 ⟩ +≡

if (vec size( ) > 2) { d day = static cast⟨unsigned short ∗⟩(vec at (2).second ); vec at (2).second = 0;

}

690. Hour. [LDF 2006.12.18.] ⟨ Define parser functions 650 ⟩ +≡

if (vec size( ) > 3) { d hour = static cast⟨unsigned short ∗⟩(vec at (3).second ); vec at (3).second = 0;

}

691. Minute. [LDF 2006.12.18.] ⟨ Define parser functions 650 ⟩ +≡

if (vec size( ) > 4) { d minute = static cast⟨unsigned short ∗⟩(vec at (4).second ); vec at (4).second = 0;

}

692. Second. [LDF 2006.12.18.] ⟨ Define parser functions 650 ⟩ +≡

if (vec size( ) > 5) { if (vec at (5).first ≡ ) d second = static cast⟨float ∗⟩(vec at (5).second ); else {

d second = new float;

∗d second = static cast⟨float⟩(∗static cast⟨int ∗⟩(vec at (5).second )); delete static cast⟨int ∗⟩(vec at (5).second );

}

vec at (5).second = 0; } 693. ⟨ Define parser functions 650 ⟩ +≡ #ifdef

temp strm ≪ ␣ ␣ ≪

␣ ␣ ␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); if (scanner node ≠ 0) scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif return 0; } /∗ End of Scan Parse ::datetime assignment func 1 definition. ∗/

694. Putting Parser Functions together. [LDF 2006.10.31.]

§695  IWF Metadata Harvester III  PUTTING PARSER FUNCTIONS TOGETHER 373

695. This is what’s compiled.

⟨ Include files 10 ⟩

  ⟨ prsrfncs.web 645 ⟩

using namespace std;

using namespace Scan Parse;

⟨ Define parser functions 650 ⟩

696. Scan Test (scantest.web). [LDF 2006.10.17.] This file is used with Microsoft Visual Studio. It’s not used when using The GNU Compiler Collection

(GCC). [LDF 2006.10.24.] Test application for the scanner yylex for ZTest. [LDF 2006.10.17.]

Log

[LDF 2006.10.17.] Created this file.

⟨ scantest.web 696 ⟩ ≡

static char id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 6 and 8. This code is used in section 700.

697. Include files. [LDF 2006.10.17.] ⟨ Include files 10 ⟩ +≡ #include #ifdef #define new #endif

698. Global variable declarations. [LDF 2006.10.19.]

Log

[LDF 2006.10.19.] Added this section.

⟨ Global variables 698 ⟩ ≡ ofstream log strm; CMutex log strm mutex ; CMutex cerr mutex ; CMutex cout mutex ; ifstream in strm;

See also section 703. This code is used in sections 700 and 715.

699. Define tmain. [LDF 2006.10.17.]

Log

[LDF 2006.10.17.] Added this function.

⟨ Define tmain 699 ⟩ ≡ CWinApp theApp;

374  DEFINE TMAIN  IWF Metadata Harvester III §699

using namespace std; int tmain(int argc, ∗ argv [ ], ∗ envp[ ]) {

int nRetCode = 0; /∗ MFC initialisieren und drucken. Bei Fehlschlag Fehlermeldung aufrufen. ∗/ if (¬AfxWinInit (::GetModuleHandle(NULL), NULL, ::GetCommandLine( ), 0)) {

/∗ TODO: Passen Sie den Fehlercode an Ihre Anforderungen an ∗/ tprintf ( ( ␣ ␣ ␣ )); nRetCode = 1;

} else {

#define using namespace Scan Parse; int status ; log strm mutex .Lock ( ); log strm.open( ); log strm ≪ ␣ ≪ copyright tex str ≪ endl ; log strm mutex .Unlock ( ); status = initialize keyword map( ); status = show keyword map( );

∗ value = new ;

∗ location = 0; Scanner Type ∗scanner node = new Scanner Type; strcpy (scanner node in filename, ); in strm.open(scanner node in filename); status = 0; while (status ≠ ) status = yylex (value, location, static cast⟨void ∗⟩(scanner node));

#ifdef temp strm ≪ ␣ ␣␣ ␣ ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); log strm mutex .Lock ( ); log strm ≪ temp strm.str ( ); log strm mutex .Unlock ( ); temp strm.str ( );

#endif in strm.close( ); log strm mutex .Lock ( ); log strm.close( ); log strm mutex .Unlock ( ); delete scanner node; scanner node = 0; char c; cerr mutex .Lock ( ); cerr ≪ ␣ ␣ ≪ status ≪ endl ≪ ␣ ␣ ␣ ␣ ␣ ; cerr mutex .Unlock ( ); cin ≫ c; return 0;

#undef }

§699  IWF Metadata Harvester III  DEFINE TMAIN 375

return nRetCode; } /∗ End of tmain definition. ∗/

This code is used in section 700.

700. Putting Scan Test together. [LDF 2006.10.17.] ⟨ Include files 10 ⟩

  ⟨ scantest.web 696 ⟩

using namespace std;

⟨ Global variables 698 ⟩

⟨ Define tmain 699 ⟩

701. Main when using GCC (main.web). [LDF 2006.10.20.]

Log

[LDF 2006.10.20.] Created this file.

⟨ main.web 701 ⟩ ≡

static char id string [ ] = ␣ ␣ ␣ ␣ ␣ ␣ ␣ ;

This code is cited in sections 6 and 8. This code is used in section 715.

702. Include files. ⟨ Include files 10 ⟩ +≡ #include #include #include #include #include #include #include #include #include

703. Global variables. [LDF 2006.10.20.]

Log

[2006.10.20.] Added this section.

[LDF 2006.11.21.] Added unsigned short tex file ctr , string tex filename str , ofstream tex file strm, and Mutex Type tex mutex .

[LDF 2006.11.30.] Added string copyright tex str .

[LDF 2006.11.30.] Added Mutex Type time mutex .

⟨ Global variables 698 ⟩ +≡ Mutex Type cerr mutex ; Mutex Type cout mutex ; Mutex Type time mutex ; ofstream tex file strm; Mutex Type tex mutex ;

376  GLOBAL VARIABLES  IWF Metadata Harvester III §703

unsigned short tex file ctr ; string tex filename str ; string copyright tex str ;

704. Scanning and parsing input. [LDF Undated.]

705. yyparse declaration. [LDF Undated.] ⟨ Declare scanning and parsing functions 705 ⟩ ≡

int yyparse(void ∗);

See also sections 706 and 708. This code is used in section 715.

706. yywrap. ⟨ Declare scanning and parsing functions 705 ⟩ +≡ #if 0

int yywrap(void); #endif

707. ⟨ Define scanning and parsing functions 707 ⟩ ≡ #if 0

int yywrap(void)

{

return 1; }

#endif

See also section 709. This code is used in section 715.

708. yyerror . [LDF 2006.10.20.] ⟨ Declare scanning and parsing functions 705 ⟩ +≡

void yyerror (const char ∗s);

§709  IWF Metadata Harvester III  SCANNING AND PARSING INPUT 377

709. ⟨ Define scanning and parsing functions 707 ⟩ +≡

void yyerror (const char ∗s) {

return; }

710. Main itself. [LDF 2006.10.20.]

Log

[LDF 2006.10.20.] Added this function.

[LDF 2006.11.02.] No longer closing scanner node in strm and scanner node log strm. This is now done in the Scanner Node destructor.

[LDF 2006.11.02.] Now calling scanner node initialize id map.

[LDF 2006.11.21.] Now initializing the global variable unsigned short tex file ctr to 0.

⟨ Define main 710 ⟩ ≡

int main(int argc, char ∗argv [ ]){ #if 0 /∗ 1 ∗/

unsigned long long temp val = 4096_{L} _{L}; bitset < 64 > b; b.flip( ); cerr ≪ ␣ ␣ ≪ b ≪ endl ≪ ␣ ␣ ≪ temp val ≪ ␣ ␣ ␣ ␣ ≪

(b & temp val ) ≪ endl ; getchar ( ); cerr ≪ ␣ ␣ ␣ ␣ ≪ sizeof (unsigned long

long) ≪ endl ≪ ␣ ␣ ≪ ≪ endl ; getchar ( ); for (int i = 27; i < 36; ^{++}i) cerr ≪ (long long) pow ((double) 2, i) ≪ ; getchar ( );

#endif #if 0 /∗ 1 ∗/ #define #else #undef #endif

378  MAIN ITSELF  IWF Metadata Harvester III §710

copyright tex str = ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣␣ ; copyright tex str += ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣ ␣␣ ; copyright tex str += ␣␣ ;

copyright tex str += ␣   ␣   ␣        ␣         ␣  ␣         ␣   ␣          ␣

    ␣  ;

copyright tex str += ␣ ␣ ␣ ; copyright tex str += ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ␣ ; copyright tex str += ␣ ␣ ; copyright tex str += ␣ ␣ ; copyright tex str += ␣ ; copyright tex str += ␣ ; copyright tex str += ␣ ; copyright tex str += ; using namespace Scan Parse; stringstream temp strm; int status ; status = initialize maps ( ); status = Query Type ::initialize type maps ( ); if ((status = Query Type ::initialize flags ( )) ≠ 0) {

cerr ≪ ␣ ␣ ≪ endl ≪ ␣ ␣ ␣ ≪ ␣ ␣ ␣ ≪ status ≪ endl ≪

      ␣      ␣              ␣    ␣       ␣     ␣  ≪ endl ;

return 1; } status = Datasource Type ::initialize type maps ( ); tex file ctr = 0; tex filename str = ; Scanner Type ∗scanner node = new Scanner Type; status = Id Type ::initialize subtype map(scanner node);

See also sections 711, 712, and 713. This code is used in section 715.

§711  IWF Metadata Harvester III  MAIN ITSELF 379

711. Process command line options. [LDF 2006.11.03.] Options:

— Enable GNU Bison’s tracing facilities.

Log

[2006.11.03.] Added this section.

⟨ Define main 710 ⟩ +≡

for (int curr opt = 0; curr opt ≥ 0; ) {

curr opt = getopt (argc, argv , ); #ifdef

temp strm ≪ ␣␣ ␣ ≪ curr opt ≪ endl ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( );

#endif switch (curr opt ) { case : yydebug = 1;

break; default: break; } /∗ switch ∗/

} /∗ for ∗/ 712. Process filename argument. [LDF 2006.11.03.]

Log

[2006.11.03.] Added this section.

⟨ Define main 710 ⟩ +≡ #if 0 /∗ 1 ∗/ #ifdef

temp strm ≪ ␣ ␣ ≪ argc ≪ ␣ ␣ ␣ ≪ optind ≪ endl ; if (argv [optind ] ≡ 0) temp strm ≪ ␣ ␣ ; else temp strm ≪ ␣ ␣ ␣ ≪ argv [optind ] ≪ ; cerr mutex .Lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .Unlock ( ); scanner node log strm ≪ temp strm.str ( ); temp strm.str ( ); getchar ( );

#endif #endif

if (argc > optind ) {

strcpy (scanner node in filename, argv [optind ]); } else strcpy (scanner node in filename, ); scanner node in strm.open(scanner node in filename); strcpy (scanner node log filename, ); scanner node log strm.open(scanner node log filename); scanner node log strm ≪ ␣ ≪ endl ≪ endl ≪ copyright tex str ≪ endl ;

713. ⟨ Define main 710 ⟩ +≡

scanner node initialize id map( ); #ifdef

status = show keyword map(scanner node); #endif

status = yyparse(scanner node); delete scanner node; scanner node = 0; return 0;

#undef } /∗ End of main definition. ∗/

714. Putting Main together.

§715  IWF Metadata Harvester III  PUTTING MAIN TOGETHER 381

715. This is what’s compiled.

⟨ Include files 10 ⟩

  ⟨ main.web 701 ⟩

using namespace std;

⟨ Global variables 698 ⟩

⟨ Declare scanning and parsing functions 705 ⟩

⟨ Define main 710 ⟩

⟨ Define scanning and parsing functions 707 ⟩

716. GNU General Public License. [LDF 2006.10.23.]

GNU GENERAL PUBLIC LICENSE Version 2, June 1991

Copyright \begin{matrix}c \\ ◯ \end{matrix} 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

Preamble

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software–to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation’s software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.

Also, for each author’s protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors’ reputations.

Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone’s free use or not licensed at all.

The precise terms and conditions for copying, distribution and modification follow.

GNU GENERAL PUBLIC LICENSE

382  GNU GENERAL PUBLIC LICENSE  IWF Metadata Harvester III §716

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The “Program”, below, refers to any such program or work, and a “work based on the Program” means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term “modification”.) Each licensee is addressed as “you”.

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.

b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.

c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.

In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

§716  IWF Metadata Harvester III  GNU GENERAL PUBLIC LICENSE 383

3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients’ exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.

7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and “any later version”, you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTH-ERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IM-PLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABIL-ITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFEC-TIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR RE-DISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PRO-GRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.

⟨one line to give the program’s name and a brief idea of what it does.⟩ Copyright (C) ⟨year⟩ ⟨name of author⟩

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WAR-RANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this when it starts in an interactive mode:

Gnomovision version 69, Copyright \begin{matrix}c \\ ◯ \end{matrix} year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type ‘show w’. This is free software, and you are welcome to redistribute it under certain conditions; type ‘show c’ for details.

The hypothetical commands ‘show w’ and ‘show c’ should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than ‘show w’ and ‘show c’; they could even be mouse-clicks or menu items–whatever suits your program.

You should also get your employer (if you work as a programmer) or your school, if any, to sign a “copyright disclaimer” for the program, if necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the program ‘Gnomovision’ (which makes passes at compilers) written by James Hacker.

⟨signature of Ty Coon⟩, 1 April 1989 Ty Coon, President of Vice

This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ⟨ GNU General Public License 716 ⟩ ≡ /∗ This section contains no C^{++} code. ∗/

This code is cited in section 2. This code is used in section 718.

717. GNU Free Documentation License. [LDF 2006.10.23.]

GNU Free Documentation License Version 1.2, November 2002

386  GNU FREE DOCUMENTATION LICENSE  IWF Metadata Harvester III §717

Copyright \begin{matrix}c \\ ◯ \end{matrix} 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

0. PREAMBLE

The purpose of this License is to make a manual, textbook, or other functional and useful document “free” in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.

This License is a kind of “copyleft”, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.

We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.

1. APPLICABILITY AND DEFINITIONS

This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a worldwide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The “Document”, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as “you”. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.

A “Modified Version” of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.

A “Secondary Section” is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document’s overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.

The “Invariant Sections” are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.

The “Cover Texts” are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.

§717  IWF Metadata Harvester III  GNU FREE DOCUMENTATION LICENSE 387

A “Transparent” copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not “Transparent” is called “Opaque”.

Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.

The “Title Page” means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, “Title Page” means the text near the most prominent appearance of the work’s title, preceding the beginning of the body of the text.

A section “Entitled XYZ” means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title” of such a section when you modify the Document means that it remains a section “Entitled XYZ” according to this definition.

The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.

2. VERBATIM COPYING

You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.

You may also lend copies, under the same conditions stated above, and you may publicly display copies.

3. COPYING IN QUANTITY

If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document’s license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.

If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.

If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.

It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.

4. MODIFICATIONS

You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:

A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document’s license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled “History”, Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled “History” in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the “History” section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled “Endorsements”. Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers.

If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version’s license notice. These titles must be distinct from any other section titles.

You may add a section Entitled “Endorsements”, provided it contains nothing but endorsements of your Modified Version by various parties–for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.

You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.

The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.

5. COMBINING DOCUMENTS

You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.

The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.

In the combination, you must combine any sections Entitled “History” in the various original documents, forming one section Entitled “History”; likewise combine any sections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. You must delete all sections Entitled “Endorsements”.

6. COLLECTIONS OF DOCUMENTS

You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.

You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.

7. AGGREGATION WITH INDEPENDENT WORKS

A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an “aggregate” if the copyright resulting from the compilation is not used to limit the legal rights of the compilation’s users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.

If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document’s Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.

8. TRANSLATION

Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.

If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.

9. TERMINATION

You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

10. FUTURE REVISIONS OF THIS LICENSE

The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/.

Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License “or any later version” applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation.

ADDENDUM: How to use this License for your documents

To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:

Copyright \begin{matrix}c \\ ◯ \end{matrix} YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with...Texts.” line with this:

with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.

If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.

If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. ⟨ GNU Free Documentation License 717 ⟩ ≡ /∗ This section contains no C^{++} code. ∗/

This code is cited in section 2. This code is used in section 718.

§719  IWF Metadata Harvester III  INDEX 391

718. Include sections without C^{++} code. These sections contain no code, or only commented-out code. However, they must be included somewhere, or CWEAVE will issue warnings. [LDF 2006.09.27.]

⟨ GNU General Public License 716 ⟩ ⟨ GNU Free Documentation License 717 ⟩

719. Index.

: 20. : \underline{20}. : 697. : 699. tmain: 6, 8, \underline{699}. tprintf : 699. aand node: \underline{84}, \underline{85}. : 102, 277, 486, 668. : \underline{58}, \underline{64}, 88, 96, 102,

113, 668. : 75, 76, 99. AfxWinInit : 699. : 276, 330, 375, 596. : 267, 330, 367, 670. and node: \underline{49}, 83, 88, 93, 104, 108, 115, 126,

148, 588, 669, 670. : 276, 330, 375, 588, 597. and or and not : 595. : \underline{55}, \underline{56}, 96, 126, 588, 669, 670. arg 0 : \underline{51}, \underline{222}, \underline{294}, \underline{662}, 665, 666, 668. arg 1 : \underline{51}, \underline{222}, \underline{294}, \underline{662}, 665, 666. argc: \underline{699}, \underline{710}, 711, 712. argv : 699, \underline{710}, 711, 712. asctime: 577. : 267, 327, 367, 457, 460, 474, 629,

669, 670, 677.

assign.w: 5, 8.

assign id string : \underline{446}. assignment operator : \underline{51}, \underline{222}, \underline{295}, \underline{670}. assignment type: \underline{51}, \underline{222}, \underline{294}, \underline{662}, 669. at : 686, 687, 688, 689, 690, 691, 692. : 264, 266, 341, 366. atof : 312, 316, 323, 328, 340, 349, 352. atoi : 311, 316, 323, 328, 349, 352. : 102, 277, 376, 487, 668. : 57, \underline{58}, \underline{64}, 88, 96, 102, 113, 668. : 75, 76, 99, 128, 129, 130. : 379. : 57, \underline{60}, \underline{66}, 88,

96, 102, 129. : 75, 76, 99, 129. : 379. : 57, \underline{60}, \underline{66}, 88, 96,

102, 130. : 75, 76, 99, 130.

: 379.

: 57, \underline{60}, \underline{66}, 88, 96,

102, 128. : 75, 76, 99, 128. begin: 93, 108, 113, 148, 229, 288, 655, 666, 686. : 102, 277, 488, 668. : \underline{58}, \underline{64}, 88, 96,

102, 113, 668. : 75, 76, 99. bitset : \underline{74}, \underline{75}, 76, 110, 123, 549, 551, 710. BUG FIX: 29, 86, 546. c: \underline{699}. c str : 308, 311, 312, 316, 323, 328, 340, 349, 352,

392  INDEX  IWF Metadata Harvester III §719

354, 547, 549, 551, 577, 615. : 102, 277, 489, 668. : \underline{58}, \underline{64}, 88, 96, 102, 113, 668. : 75, 76, 99. cerr : 37, 39, 41, 87, 89, 92, 93, 100, 107, 109, 114, 115, 123, 124, 126, 127, 152, 168, 172, 173, 176, 180, 199, 202, 205, 229, 231, 233, 234, 236, 237, 238, 239, 240, 241, 288, 303, 304, 305, 306, 308, 309, 311, 312, 313, 315, 316, 318, 319, 322, 323, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 347, 349, 350, 351, 352, 353, 354, 355, 388, 393, 394, 395, 396, 403, 404, 405, 406, 409, 410, 411, 412, 424, 426, 427, 428, 430, 431, 432, 433, 435, 436, 438, 439, 441, 442, 445, 449, 450, 452, 453, 454, 455, 457, 458, 460, 461, 462, 463, 464, 465, 466, 467, 469, 470, 472, 473, 474, 475, 477, 478, 479, 480, 481, 482, 484, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 515, 516, 519, 521, 522, 523, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 539, 540, 541, 542, 543, 545, 546, 548, 550, 553, 554, 555, 557, 558, 559, 560, 561, 562, 563, 564, 569, 570, 571, 572, 573, 574, 575, 576, 577, 581, 582, 583, 584, 585, 587, 588, 590, 591, 593, 594, 596, 597, 598, 599, 600, 601, 605, 606, 608, 610, 612, 615, 616, 617, 619, 621, 623, 627, 628, 629, 631, 633, 635, 637, 638, 639, 640, 650, 651, 652, 653, 655, 656, 658, 659, 660, 662, 663, 664, 665, 669, 670, 673, 674, 675, 682, 683, 684, 685, 686, 693, 699, 710, 711, 712. cerr mutex : \underline{14}, \underline{21}, 37, 39, 87, 89, 92, 93, 107, 109,

114, 115, 123, 124, 126, 152, 172, 173, 176, 180, 199, 202, 205, 229, 231, 233, 234, 236, 237, 238, 239, 240, 241, 288, 303, 304, 305, 306, 308, 309, 311, 312, 313, 315, 316, 318, 319, 322, 323, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 347, 349, 350, 351, 352, 353, 354, 355, 403, 404, 405, 406, 409, 410, 411, 412, 424, 426, 427, 428, 430, 431, 432, 433, 435, 436, 438, 439, 441, 442, 445, 449, 450, 452, 453, 454, 455, 457, 458, 460, 461, 462, 463, 464, 465, 466, 467, 469, 470, 472, 473, 474, 475, 477, 478, 479, 480, 481, 482, 484, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 515, 516, 519, 521, 522, 523, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 539, 540, 541, 542, 543, 545, 546, 548, 550, 553, 554, 555, 557, 558, 559, 560, 561, 562, 563, 564, 569, 570, 571, 572, 573, 574, 575, 576, 577, 581, 582, 583, 584, 585, 587, 588, 590, 591, 593, 594, 596, 597, 598, 599, 600, 601, 605, 606, 608, 610, 612, 615, 616, 617, 619, 621, 623, 627, 628, 629, 631, 633, 635, 637, 638, 639, 640, 650, 651, 652, 653, 655, 656, 658, 659, 660, 662, 663, 664, 665, 669, 670, 673, 674, 675, 682, 683, 684, 685, 686, 693, \underline{698}, 699, \underline{703}, 711, 712.

cin: 699. : 102, 277, 490, 668. : \underline{58}, \underline{64}, 88, 96, 102,

113, 668. : 75, 76, 99. : 284, 385. clear : 93, 229, 426, 652, 656, 686. close: 229, 577, 699. : 266, 345. : 266, 343. close parenthesis str : \underline{126}, 149. CMutex: 21, 698. : \underline{251}. : \underline{251}, \underline{254}, 306, 312, 316, 320,

323, 328, 340, 349, 352. : \underline{251}, \underline{254}, 306, 309, 310, 315,

316, 319, 320, 322, 323, 327, 328, 339, 340, 347, 348, 351, 352.

: \underline{251}, \underline{254}, 306, 311, 316,

318, 320, 323, 328, 340, 349, 352. : \underline{251}. : \underline{251}, \underline{254}, 308, 309, 313, 317,

320, 324, 327, 339, 349, 351. : 266, 334. column: \underline{102}, 103.

: 266, 336.

commands.w: 5, 8.

commands id string : \underline{565}. : 329, 330, 331, 332, 333,

334, 335, 336, 337, 338, 341, 342, 343, 344, 345, \underline{350}.

: 102, 277, 491, 668. : \underline{58}, \underline{64}, 88, 96, 102, 113, 668. : 75, 76, 99. compare: 241. const iterator: 93, 288, 655. : 272, 367. : \underline{78}, \underline{79}, 96, 124, 453. : 102, 277, 492, 668. : \underline{58}, \underline{64}, 88, 96, 102,

113, 668. : 75, 76, 99. : 102, 277, 376, 493, 668. : 57, \underline{58}, \underline{64}, 88, 96, 102,

113, 134, 668. : 75, 76, 99, 131, 132, 133, 134. : 104, 379. : 57, \underline{61}, \underline{67},

88, 96, 102, 104, 132. : 75, 76, 99, 132. : 104, 379. : 57, \underline{61}, \underline{67}, 88, 96,

102, 104, 133. : 75, 76, 99, 133. : 104, 379. : 57, \underline{61}, \underline{67}, 88,

96, 102, 104, 131. : 75, 76, 99, 131. copyright tex str : \underline{14}, 577, 699, \underline{703}, 710, 712. cout mutex : \underline{14}, \underline{21}, \underline{698}, \underline{703}. create: \underline{232}, \underline{233}, 236, 239, 240, 241. : 102, 277, 376, 494, 668. : \underline{57}, \underline{58}, \underline{64}, 88, 96, 102, 113,

135, 668. : 75, 76, 99, 135. curr char : \underline{305}, 306, 307, 313, 314, 315, 316, 317,

318, 320, 321, 324, 325, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 349, 351.

curr datasource node: \underline{574}, \underline{605}. curr date time node: \underline{28}, \underline{29}, \underline{51}, \underline{222}, \underline{296}, \underline{575},

\underline{674}, 676, 677, 678. curr datetime node: \underline{627}. curr field type: \underline{668}, 669. curr float str : \underline{305}, 312, 316, 320, 323, 328,

340, 349, 352. curr id : \underline{305}, 309, 310, 315, 316, 319, 320, 322,

323, 327, 328, 339, 340, 347, 348, 351, 352, 353, 354, 355.

curr id node: \underline{51}, \underline{222}, \underline{233}, 234, 236, 238, 240, 241, \underline{295}, \underline{477}, 478, \underline{480}, 481, \underline{545}, \underline{546}, 547, \underline{548}, 549, \underline{550}, 551, \underline{573}, \underline{574}, \underline{575}, \underline{581}, \underline{605}, \underline{615}, \underline{627},

\underline{653}, 654, 655, 656, 658, \underline{660}, \underline{665}, 669, \underline{670}.

curr integer str : \underline{305}, 311, 316, 318, 320, 323,

328, 340, 349, 352. curr keyword : \underline{265}, 266, 267, 268, 269, 270, 271,

272, 273, 274, 275, 276, 277, 279, 280, 281, 282, 283, 284, 285, \underline{305}.

curr name: \underline{237}, 240, 241. curr name strm: \underline{237}. curr opt : \underline{711}. curr query : \underline{219}, 230, \underline{670}, 671, 672. curr query node: \underline{573}, \underline{581}, \underline{583}, \underline{584}, \underline{585}, \underline{665},

666, 668, 669. curr string : \underline{305}, 308, 309, 313, 317, 320, 324,

327, 339, 349, 351, \underline{546}, 547, \underline{548}, 549, \underline{550},

551, \underline{668}, \underline{669}.

curr token: \underline{303}, \underline{355}, \underline{424}. curr value: \underline{305}, 656. CWinApp: 699. d: \underline{28}, \underline{29}, \underline{36}, \underline{37}, \underline{38}, \underline{39}, \underline{51}, \underline{145}, \underline{175}, \underline{176}, \underline{222},

\underline{297}, \underline{554}, \underline{555}, \underline{629}, \underline{683}. : 271, 372, 373, 472, 474, 666. : 102, 277, 495, 668. : \underline{58}, \underline{64}, 88, 96,

102, 113, 668. : 75, 76, 99. database type: \underline{110}, \underline{123}, 126, 128, 129, 130, 131,

132, 133, 134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148.

: 273, 371. : 273, 373. : \underline{161}, \underline{162}, 177, 178, 543. Datasource Node: \underline{158}, \underline{159}, 175, 176, 539, 540,

541, 542, 543, 574, 605, 606. datasource type: 164, \underline{169}, \underline{170}. Datasource Type: 6, 8, \underline{158}, \underline{159}, 162, 163, 167,

\underline{168}, 170, 171, \underline{172}, 174, 175, 176, 178, 180, 540, 541, 542, 543, 605, 710.

: 283, 384, 416, 438. datasource type map: \underline{159}, \underline{163}, 178, 180. : \underline{161}, \underline{162}, 178. : 103, 281, 531. : 103, 281, 530. : 103, 281, 532. date strm: \underline{123}, 145. Date Time Node: \underline{28}, 29, 36, 37, 51, 88, 93,

108, 113, 145, 222, \underline{248}, 296, 297, 553, 554, 555,

575, 627, 628, 629, 670, 674, 683. Date Time Type: 6, 8, \underline{28}, \underline{29}, 32, \underline{33}, 34, \underline{35}, 36, 37, 38, 39, 41, 93, \underline{248}, 627, 676, 687.

: \underline{69}, \underline{70}, 93, 96, 108, 670.

datestamp: \underline{577}.

datetime assignment func 0 : \underline{28}, \underline{29}, \underline{51}, \underline{222}, \underline{296},

554, 555, \underline{674}, 682. datetime assignment func 1 : \underline{28}, \underline{29}, \underline{51}, \underline{222},

\underline{297}, 629, \underline{683}, 693. : 274, 371. : 283, 384, 420, 444, 480, 670. day : \underline{29}, 33, 35, 37, 39, 41, 145, 677, 678, 686, 689. : 275, 374, 561, 677, 678. : 273, 373. : \underline{161}, \underline{162}, 177, 178, 540. : 697. : \underline{699}. : \underline{37}, \underline{39}, \underline{87}, 89, \underline{92}, 93, \underline{102}, 104,

\underline{107}, 109, \underline{123}, 152, \underline{172}, 173, \underline{176}, \underline{199}, \underline{202}, \underline{205}, \underline{229}, \underline{231}, \underline{233}, 236, 237, 238, 239, 240, 241, \underline{302}, 303, 304, 305, 306, 308, 309, 311, 312, 313, 315, 316, 318, 319, 322, 323, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 347, 349, 350, 351, 352, 353, 354, 355, \underline{406}, \underline{424}, \underline{426}, \underline{427}, \underline{428}, \underline{430}, \underline{431}, \underline{432}, \underline{433}, \underline{435}, \underline{436}, \underline{438}, \underline{439}, \underline{441}, \underline{442}, \underline{444}, \underline{445}, \underline{449}, \underline{450}, \underline{452}, \underline{453}, \underline{454}, \underline{455}, \underline{457}, \underline{458}, \underline{460}, \underline{461}, \underline{462}, \underline{463}, \underline{464}, \underline{469}, \underline{470}, \underline{472}, \underline{473}, \underline{474}, \underline{475}, \underline{477}, 478, 479, \underline{480}, 481, 482, \underline{484}, \underline{486}, \underline{487}, \underline{488}, \underline{489}, \underline{490}, \underline{491}, \underline{492}, \underline{493}, \underline{494}, \underline{495}, \underline{496}, \underline{497}, \underline{498}, \underline{499}, \underline{500}, \underline{501}, \underline{502}, \underline{503}, \underline{504}, \underline{505}, \underline{506}, \underline{507}, \underline{508}, \underline{509}, \underline{510}, \underline{511}, \underline{512}, \underline{513}, \underline{515}, \underline{516}, \underline{519}, \underline{521}, \underline{522}, \underline{523}, \underline{526}, \underline{527}, \underline{528}, \underline{529}, \underline{530}, \underline{531}, \underline{532}, \underline{533}, \underline{534}, \underline{535}, \underline{536}, \underline{537}, \underline{539}, \underline{540}, \underline{541}, \underline{542}, \underline{543}, \underline{545}, \underline{546}, \underline{548}, \underline{550}, \underline{553}, \underline{554}, \underline{555}, \underline{557}, \underline{558}, \underline{559}, \underline{560}, \underline{561}, \underline{562}, \underline{563}, \underline{564}, \underline{569}, \underline{570}, \underline{571}, \underline{572}, \underline{573}, \underline{574}, \underline{575}, \underline{576}, \underline{577}, \underline{581}, \underline{582}, \underline{583}, \underline{584}, \underline{585}, \underline{587}, \underline{588}, \underline{590}, \underline{591}, \underline{593}, \underline{594}, \underline{596}, \underline{597}, \underline{598}, \underline{599}, \underline{600}, \underline{601}, \underline{605}, \underline{606}, \underline{608}, \underline{610}, \underline{612}, \underline{615}, \underline{616}, \underline{617}, \underline{619}, \underline{621}, \underline{623}, \underline{627}, \underline{628}, \underline{629}, \underline{631}, \underline{633}, \underline{635}, \underline{637}, \underline{638}, \underline{639}, \underline{640}, \underline{650}, 653, 655, 656, \underline{658}, 660, \underline{662}, 665, 669, \underline{670}, 673, \underline{674}, 682, \underline{683}, 693, 699, \underline{710}, 711, 712, 713. declare variable func: \underline{51}, \underline{222}, \underline{292}, 414, 416,

418, 420, \underline{658}, 660.

                                               declrtns.w: 5, 8.

declrtns id string : \underline{401}. deque: 102, 484, 515, 516. : 102, 277, 496, 668. : \underline{58}, \underline{64}, 88, 96, 102, 113, 668. : 75, 76, 99. : 268, 368. : 267, 367, 681.

: 276, 375.

dtsrcexp.w: 5.
dtsrcexp.web: 8.

dtsrcexp id string : \underline{603}.

dtsrctyp.web: 5, 8, \underline{155}.

: \underline{183}.

dttmexp.w: 5, 8.

dttmexp id string : \underline{625}.

dttmtype.web.web: 5, 8.
dttmtype.web: \underline{25}.

: 276, 375. : 103, 281, 527. : 103, 281, 526. : 103, 281, 528. : 276, 375. end : 93, 108, 113, 148, 229, 233, 235, 288, 353,

354, 355, 652, 653, 655, 656, 666, 686. : 270. end local query func: 51, 222, 300. end query func: \underline{51}, \underline{222}, \underline{300}. endl : 37, 39, 41, 87, 89, 92, 93, 100, 107, 108, 109,

113, 115, 123, 124, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148, 150, 151, 152, 168, 172, 173, 176, 180, 199, 202, 205, 229, 231, 233, 234, 236, 237, 238, 239, 240, 241, 288, 303, 304, 306, 308, 309, 311, 312, 313, 315, 316, 318, 319, 322, 323, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 347, 349, 350, 351, 352, 353, 354, 355, 388, 393, 394, 395, 396, 403, 404, 405, 406, 409, 410, 411, 412, 424, 426, 427, 428, 430, 431, 432, 433, 435, 436, 438, 439, 441, 442, 444, 445, 449, 450, 452, 453, 454, 455, 457, 458, 460, 461, 462, 463, 464, 465, 466, 467, 469, 470, 472, 473, 474, 475, 477, 478, 479, 480, 481, 482, 484, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 515, 516, 519, 521, 522, 523, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 539, 540, 541, 542, 543, 545, 546, 548, 550, 553, 554, 555, 557, 558, 559, 560, 561, 562, 563, 564, 569, 570, 571, 572, 573, 574, 575, 576, 577, 581, 582, 583, 584, 585, 587, 588, 590, 591, 593, 594, 596, 597, 598, 599, 600, 601, 605, 606, 608, 610, 612, 615, 616, 617, 619, 621, 623, 627, 628, 629, 631, 633, 635, 637, 638, 639, 640, 650, 651, 652, 653, 655, 656, 658, 659, 660, 662, 663, 664, 665, 669, 670, 673, 674, 675, 682, 683, 684, 685, 686, 693, 699, 710, 711, 712.

envp: 699. : 305, 306.

: 284, 385, 570, 571. : 102, 277, 497,

668. : \underline{58}, \underline{64},

88, 96, 102, 113, 668. : 75, 76, 99. expression: \underline{594}. f: \underline{638}, \underline{640}. false: 83, 84, 101, 128, 129, 130, 131, 132, 133,

134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148, 232, 236, 239, 241, 588, 591, 594.

ffield : \underline{84}. ffield type: \underline{84}, \underline{85}. : 276, 375. field flags : 110, 123, 128, 129, 130, 131, 132, 133,

134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148, 549, 551.

field specifier : \underline{51}, 102, 103, \underline{222}, \underline{295}, \underline{670}. field type: \underline{49}, 53, 57, 83, 86, 88, 93, 102, 103, 104,

108, 113, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 140, 141, 142, 143, 144, 145, 146, 148, 668, 669.

field type map: \underline{49}, \underline{77}, 95, 96, 108, 113, 127. find : 233, 353, 651, 666. : 306, \underline{349}. first : 686, 692. first from: \underline{110}, \underline{123}, 128, 129, 130, 131, 132, 133,

134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148, \underline{549}, \underline{551}.

first select : \underline{110}, \underline{123}, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148, \underline{549}, \underline{551}.

first where: \underline{110}, \underline{123}, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148, \underline{549}, \underline{551}.

fixed : 145. flip: 710. : 269, 303, 312, 316, 323, 328, 340, 349, 352,

555, 638, 640, 677, 678, 686, 692. : \underline{69}, \underline{70}, 93, 96, 108, 585. float value: 303, 312, 316, 323, 328, 340, 349,

352, \underline{363}. float vector : \underline{219}, 237, 426, 428, 652, 655, 656. : 276, 375. : 272, 367. : \underline{78}, \underline{79}, 96, 124, 454. from strm: \underline{110}, \underline{123}, 128, 129, 130, 131, 132, 133,

134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148, 150, \underline{548}, 549, \underline{550}, 551.

: 273, 373. : \underline{161}, \underline{162}, 177, 178, 541. GCC. See “GNU Compiler Collection”: 6. generate sql string : 6, 8, \underline{110}, \underline{123}, 148, 152,

549, 551. generate tex string : \underline{106}, \underline{107}, 108, 109, 547. get : 305, 306, 324, 329, 330, 331, 332, 333. getchar : 100, 123, 545, 571, 572, 682, 710, 712. GetCommandLine: 699. GetModuleHandle: 699. getopt : 9, 711. : 102, 280, 379, 522. GNU Compiler Collection: 6. group statement : 397.

grpstmnt.w: 5, 8.

grpstmnt id string : \underline{398}. hour : \underline{29}, 33, 35, 37, 39, 41, 145, 677, 678, 686, 690. : 275, 374, 562, 677, 678. : 264, 266, 338, 366. i: \underline{108}, \underline{113}, \underline{148}, \underline{237}, \underline{637}, \underline{639}, \underline{655}, \underline{710}. : 103, 279, 382, 519. id iter : \underline{353}, 354, 355. id map: \underline{219}, 229, 233, 235, 236, 310, 320, 323,

328, 340, 348, 352, 353, 354, 355, 411, 651, 652, 653, 656, 660.

id node: \underline{49}, 83, \underline{469}, 477, \underline{539}, \underline{540}, \underline{541}, \underline{542}, \underline{543},

\underline{553}, \underline{554}, \underline{555}, 665, 669, 670. Id Node: \underline{48}, 49, 51, \underline{158}, \underline{187}, 188, \underline{212}, 222,

232, 233, \underline{248}, 292, 295, 414, 418, 435, 436, 438, 439, 441, 442, 445, 469, 477, 480, 539, 540, 541, 542, 543, 545, 546, 548, 550, 553, 554, 555, 573, 574, 575, 581, 605, 615, 627, 651, 653, 658, 660, 665, 670.

id string : \underline{9}, \underline{18}, \underline{25}, \underline{45}, \underline{120}, \underline{155}, \underline{184}, \underline{209}, \underline{245},

\underline{645}, \underline{696}, \underline{701}. Id Type: 6, 8, \underline{48}, \underline{158}, \underline{187}, \underline{188}, 189, 190, 191,

195, \underline{196}, 198, \underline{199}, 202, 205, \underline{212}, 219, 229, 236, 240, 241, \underline{248}, 353, 411, 435, 438, 441, 444, 546, 548, 550, 660, 710.

: 103, 281, 529. : 102, 277, 498, 668. : \underline{58}, \underline{64}, 88, 96, 102, 113, 668. : 75, 76, 99.

idtype.web.web: 5, 8.
idtype.web: \underline{184}.

: 276, 375. ifstream: 21, 219, 698. in filename: \underline{219}, 304, 699, 712. in strm: \underline{21}, \underline{219}, 229, 305, 306, 311, 312, 316,

323, 324, 328, 329, 330, 331, 332, 333, 340, 349, 352, 354, 355, \underline{698}, 699, 710, 712.

initialize flags : \underline{97}, \underline{98}, 100, 710. initialize id map: \underline{230}, \underline{231}, 710, 713. initialize keyword map: 699. initialize maps : \underline{264}, \underline{265}, 285, 710. initialize subtype map: 191, \underline{201}, \underline{202}, 710. initialize type maps : \underline{95}, \underline{96}, \underline{177}, \underline{178}, 710. : 102, 277, 499, 668. : \underline{58}, \underline{64}, 88, 96, 102, 113, 668. : 75, 76, 99. : \underline{69}, \underline{70}, 93, 96, 108, 584. int value: 216, 303, 311, 316, 323, 328, 349,

352, 355, \underline{363}. : 269, 303, 311, 316, 323, 328, 349, 352,

554, 637, 639, 677, 678, 686. is open: 114, 115, 180, 229, 231. isalpha: 314, 317. isdigit : 318, 320. isspace: 346, 349. iter : \underline{93}, \underline{108}, \underline{113}, \underline{148}, \underline{229}, \underline{233}, 235, \underline{288}, \underline{651},

652, 653, 654, 655, 656, \underline{686}.

iterator: 108, 113, 148, 229, 233, 353, 651, 686. j: \underline{237}. keyword iter : \underline{353}, 355. keyword map: \underline{259}, \underline{260}, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 279, 280, 281, 282, 283, 284, 285, 288, 308, 310, 320, 323, 328, 340, 348, 352, 353, 355.

Keyword Type: \underline{255}, \underline{257}, 259, 260, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 279, 280, 281, 282, 283, 284, 285, 288, 353.

: 102, 277, 500, 668.

: \underline{58}, \underline{64}, 88, 96, 102, 113, 668. : 75, 76, 99. left : \underline{188}, 196, 199, 238, 240, 241. level ctr : \underline{111}. : 272, 367. : \underline{78}, \underline{79}, 96, 124, 455. : 271, 373, 472, 473, 666. : \underline{71}, \underline{72}, 96, 666. : \underline{71}, \underline{72}, 96, 666. local time: \underline{577}. localtime: 577. location: 699. Lock : \underline{12}, 37, 39, 87, 89, 92, 93, 107, 109, 114,

115, 123, 124, 126, 152, 172, 173, 176, 180, 199, 202, 205, 229, 231, 233, 234, 236, 237, 238, 239, 240, 241, 288, 303, 304, 305, 306, 308, 309, 311, 312, 313, 315, 316, 318, 319, 322, 323, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 347, 349, 350, 351, 352, 353, 354, 355, 403, 404, 405, 406, 409, 410, 411, 412, 424, 426, 427, 428, 430, 431, 432, 433, 435, 436, 438, 439, 441, 442, 445, 449, 450, 452, 453, 454, 455, 457, 458, 460, 461, 462, 463, 464, 465, 466, 467, 469, 470, 472, 473, 474, 475, 477, 478, 479, 480, 481, 482, 484, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 515, 516, 519, 521, 522, 523, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 539, 540, 541, 542, 543, 545, 546, 548, 550, 553, 554, 555, 557, 558, 559, 560, 561, 562, 563, 564, 569, 570, 571, 572, 573, 574, 575, 576, 577, 581, 582, 583, 584, 585, 587, 588, 590, 591, 593, 594, 596, 597, 598, 599, 600, 601, 605, 606, 608, 610, 612, 615, 616, 617, 619, 621, 623, 627, 628, 629, 631, 633, 635, 637, 638, 639, 640, 650, 651, 652, 653, 655, 656, 658, 659, 660, 662, 663, 664, 665, 669, 670, 673, 674, 675, 682, 683, 684, 685, 686, 693, 699, 711, 712.

log filename: \underline{219}, 712. log strm: \underline{21}, 86, 92, 93, 107, 109, 114, 115, 123,

124, 126, 152, 176, 180, 199, 202, 205, \underline{219}, 229, 231, 233, 234, 236, 237, 238, 239, 240, 241, 288, 303, 304, 305, 306, 308, 309, 311, 312, 313, 315, 316, 318, 319, 322, 323, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 347, 349, 350, 351, 352, 353, 354, 355, 388, 393, 394, 395, 396, 403, 404, 405, 406, 409, 410, 411, 412, 424, 426, 427, 428, 430, 431, 432, 433, 435, 436, 438, 439, 441, 442, 445, 449, 450, 452, 453, 454, 455, 457, 458, 460, 461, 462, 463, 464, 465, 466, 467, 469, 470, 472, 473, 474, 475, 477, 478, 479, 480, 481, 482, 484, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 515, 516, 519, 521, 522, 523, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 539, 540, 541, 542, 543, 545, 546, 548, 550, 553, 554, 555, 557, 558, 559, 560, 561, 562, 563, 564, 569, 570, 571, 572, 573, 574, 575, 576, 577, 581, 582, 583, 584, 585, 587, 588, 590, 591, 593, 594, 596, 597, 598, 599, 600, 601, 605, 606, 608, 610, 612, 615, 616, 617, 619, 621, 623, 627, 628, 629, 631, 633, 635, 637, 638, 639, 640, 650, 652, 653, 655, 656, 658, 660, 662, 664, 665, 669, 670, 673, 674, 675, 682, 683, 684, 685, 686, 693, \underline{698}, 699, 710, 711, 712.

log strm mutex : \underline{21}, \underline{698}, 699. lookup: \underline{232}, \underline{233}, 241, 655. lvalp: 361. main: 6, 8, 191, \underline{220}, \underline{710}, 713. main.web: 5, 8, \underline{701}. : 102, 277, 376, 501, 668. : 57, \underline{58}, \underline{64}, 88,

95, 96, 101, 102, 113, 137, 138, 668. : 75, 76, 99, 110,

122, 138.

: \underline{349}, 351. make pair : 637, 638, 639, 640. map: 49, 77, 159, 163, 188, 191, 219, 229, 233,

259, 260, 262, 263, 288, 353, 651. match str : \underline{124}, 128, 129, 130, 131, 132, 133,

134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148.

match term optional : \underline{51}, \underline{222}, \underline{295}, \underline{670}, 672. match value: \underline{49}, 78, 83, 85, 94, 113, 124, 672. match value map: \underline{49}, \underline{77}, 95, 96, 113. match values : 49. : 284, 385, 569. Microsoft Visual Studio: 6. : 268, 368. : 267, 367, 679. : 275, 374, 563, 677, 678. minute: \underline{29}, 33, 35, 37, 39, 41, 145, 677, 678,

686, 691. month: \underline{29}, 33, 35, 37, 39, 41, 145, 677, 678,

686, 688. : 275, 374, 560, 677, 678. mutex. See CMutex: 3. Mutex Type: \underline{12}, 14, 703. name: \underline{49}, \underline{51}, 93, 108, 113, \underline{159}, \underline{188}, 196, 199,

205, \underline{222}, \underline{232}, \underline{233}, 236, 237, 238, 240, 241, \underline{257}, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 279, 280, 281, 282, 283, 284, 285, 288, \underline{291}, \underline{292}, 477, \underline{650}, 651, 652, 653, 654, 655, \underline{658}, 660, 665, 669, 670.

negate: \underline{51}, \underline{222}, \underline{294}, \underline{662}, 668, 669.
negated : \underline{49}, 83, 93, 108, 126, 588, 591, 594,

668, 669, 670. negation optional : \underline{51}, \underline{222}, \underline{295}, \underline{670}. next : \underline{49}. next char : \underline{305}, 329, 330, 331, 332, 333. nnegated : \underline{84}, \underline{85}. : 26, 46, 121, 156, 185, 210, 246,

360, 646.

                                           nonwin.web: 5, 8, \underline{9}.

: 276, 333, 375.

: 267, 333, 367, 464.

nRetCode: \underline{699}.

: 74, 76, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148.

: \underline{251}, \underline{254}, 302, 306, 309, 315, 318, 327, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 341, 342, 343, 344, 345, 347.

: 232, 264, 283, 384.

: 126, 134, 135, 136, 148, 284, 385, 549.

object : \underline{51}, \underline{222}, \underline{294}, \underline{662}, 664, 665. ofstream: 14, 21, 219, 698, 703. once: 19, 27, 47, 157, 186, 211, 247, 647. oor node: \underline{84}, \underline{85}. op: \underline{28}, \underline{29}, \underline{51}, \underline{222}, \underline{296}, \underline{297}, \underline{674}, 677, 678, 679,

680, 681, 682, \underline{683}. open: 577, 699, 712. : 266, 344. : 266, 342. open parenthesis str : \underline{126}, 128, 129, 130, 131,

132, 133, 134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148.

optind : 712. : 276, 331, 375, 598. : 267, 331, 367, 462, 669, 670. or node: \underline{49}, 83, 88, 93, 104, 108, 115, 126, 148,

594, 669, 670. : 276, 331, 375, 594, 599. or or or not : 595. : \underline{55}, \underline{56}, 96, 126, 594, 669, 670. ostream: \underline{29}, 38, \underline{39}. : 284, 385. pair: 637, 638, 639, 640, 684, 686. parameter : \underline{301}, \underline{302}, \underline{361}, 388, 393, 394, 395, 396,

403, 404, 405, 406, 409, 410, 411, 412, 414, 416, 418, 420, 424, 426, 427, 428, 430, 431, 432, 433, 435, 436, 438, 439, 441, 442, 444, 445, 449, 450, 452, 453, 454, 455, 457, 458, 460, 461, 462, 463, 464, 465, 466, 467, 469, 470, 472, 473, 474, 475, 477, 480, 484, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 515, 516, 519, 521, 522, 523, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 539, 540, 541, 542, 543, 545, 546, 548, 550, 553, 554, 555, 557, 558, 559, 560, 561, 562, 563, 564, 569, 570, 571, 572, 573, 574, 575, 576, 577, 581, 582, 583, 584, 585, 587, 588, 590, 591, 593, 594, 596, 597, 598, 599, 600, 601, 605, 606, 608, 610, 612, 615, 616, 617, 619, 621, 623, 627, 628, 629, 631, 633, 635, 637, 638, 639, 640, 643.

parser.w: 5, 8, \underline{359}. parser id string : \underline{359}. : 284, 385. peek : 329, 330, 331, 332, 333. : 264, 266, 337, 366. : 266, 339. : 102, 277, 502, 668. : \underline{58}, \underline{64}, 88, 96,

102, 113, 668. : 75, 76, 99. : 102, 277, 503, 668. : \underline{58}, \underline{64}, 88, 96, 102, 113, 668. : 75, 76, 99.

: 102, 277, 504, 668. : \underline{58}, \underline{64}, 88, 96,

102, 113, 668. : 75, 76, 99. : 128, 129, 130, 131, 132, 133, 138, 140, 141,

142, 143, 144, 145, 147, 284, 385, 551. : 268, 329, 368. : 267, 329, 367, 458, 461, 669,

670, 678. pointer value: 303, 355, \underline{363}, 656. pop: 303, 308. pow : 710. : \underline{189}, \underline{190}, 202. : 102, 280, 379, 523. primary : \underline{588}.

prsrfncs.web: \underline{645}.

: 102, 277, 505, 668. : \underline{58}, \underline{64}, 88, 96, 102, 113, 668. : 75, 76, 99. push: 309, 313, 355, 424, 656. push back : 93, 428, 516, 637, 638, 639, 640, 666. push front : 484. q: \underline{91}, \underline{92}, \underline{94}, \underline{546}, \underline{548}, \underline{550}, \underline{582}, \underline{606}, \underline{628}. qquery type: \underline{84}, \underline{85}.

qtgensql.web: 5, 8, \underline{120}.

query assignment func 0 : \underline{51}, \underline{222}, \underline{294}, 472, 473,

474, 475, \underline{662}, 669. query assignment func 1 : \underline{51}, \underline{222}, \underline{295}, 477, 478,

480, 481, \underline{670}, 673. query ctr : \underline{49}, \underline{50}, 83, 92, 107, 108, 123, 127, 148,

149, 150, 151, 588, 591, 594, 669, 670. : 271. query node: \underline{225}. Query Node: \underline{13}, \underline{48}, \underline{49}, 84, 85, 88, 91, 92, 199,

\underline{212}, 219, 225, \underline{248}, 469, 546, 548, 550, 573, 581, 582, 583, 584, 585, 588, 591, 594, 665, 670.

Query Nodes: 111. : 199, 283, 384, 414, 435, 477, 670. query type: \underline{49}, 53, 55, 83, 93, 108, 113, 123, 126,

588, 591, 594, 665, 668, 669, 670. Query Type: 6, 8, \underline{13}, \underline{28}, \underline{29}, \underline{48}, \underline{49}, 54, 56, 64,

66, 67, 68, 70, 72, 76, 77, 79, 82, \underline{83}, 85, 86, \underline{87}, 90, 91, 92, 93, 94, 96, 98, 100, 102, 104, 107, 109, 111, 112, 116, 123, 152, \underline{212}, \underline{248}, 452, 453, 454, 455, 581, 583, 584, 585, 588, 591, 594, 665, 666, 668, 669, 670, 710.

: \underline{73}, 74, 75, 76, 100,

110, 123, 549, 551. query type map: \underline{49}, \underline{77}, 96, 108, 113, 123. : \underline{53}, \underline{54}, 83, 85, 93, 96,

104, 124, 452, 668. query type str : \underline{125}, 126, 128, 129, 130, 131, 132,

133, 134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148.

: \underline{69}, \underline{70}, 93, 96, 108,

113, 148, 583, 668, 669.

queryexp.w: 5, 8.

queryexp id string : \underline{579}.

querytyp.web: 5, 8, \underline{45}.

: \underline{119}. r: \underline{549}, \underline{551}. : 103, 277, 506, 668. : \underline{62},

\underline{68}, 88, 96, 103, 113. : 75,

76, 99. : \underline{62}, \underline{68},

88, 96, 103, 113. : 75, 76, 99. : \underline{62}, \underline{68}, 88,

96, 103, 113, 145. : 75, 76,

99, 145. : \underline{62},

\underline{68}, 88, 103, 113, 142. : 75,

76, 99, 142. : \underline{62}, \underline{68},

88, 103, 113, 141. : 75, 76,

99, 141. : \underline{62}, \underline{68}, 88,

96, 103, 113, 143. : 75, 76, 99,

143. : \underline{58}, \underline{64}, 88, 96, 103, 113, 668. : 75, 76, 99, 140, 141, 142, 143,

144, 145. : \underline{62}, \underline{68}, 88, 103, 113, 140. : 75, 76, 99, 140. : \underline{62}, \underline{68},

88, 96, 103, 113, 144. : 75, 76,

99, 144. : \underline{62}, \underline{68}, 88, 103, 113. : 75, 76, 99. : \underline{62}, \underline{68},

88, 103, 113. : 75,

76, 99. : \underline{62}, \underline{68},

88, 103, 113. : 75, 76, 99.

: \underline{62},

\underline{68}, 88, 103, 113.

: 75,

76, 99. : \underline{62},

\underline{68}, 88, 103, 113. : 75,

76, 99. : 271, 474, 475, 666. : 104, 277, 507, 668. : \underline{58}, \underline{64}, 88, 96, 104,

113, 668. : 75, 76, 99. : \underline{71}, \underline{72}, 96, 666. : \underline{71}, \underline{72}, 96, 666. return str : \underline{110}, \underline{123}, 126, 148, 152. right : 145, \underline{188}, 196, 199, 241. : 104, 277, 508, 668. : \underline{58}, \underline{64}, 88, 96, 104, 113, 668. : 75, 76, 99. s: \underline{40}, \underline{41}, \underline{111}, \underline{112}, \underline{179}, \underline{180}, \underline{201}, \underline{202}, \underline{205},

\underline{362}, \underline{708}, \underline{709}. Scan Parse: \underline{28}, 29, 51, \underline{118}, \underline{154}, \underline{182}, 199, 205, 222, 234, \underline{244}, \underline{251}, \underline{252}, 255, 265, 285, 288, 299, 300, \underline{302}, 414, 416, 418, 420, 424, 477, 478, 481, 650, 656, 658, 660, 662, 669, 670, 673, 674, 682, 683, 693, \underline{695}, \underline{699}, \underline{710}.

                                               scanner.web: 5, 8, \underline{245}.

Scanner Node: \underline{13}, \underline{48}, 50, 51, 84, 85, 101, 102, 106, 107, 110, 111, 112, 123, \underline{158}, 159, 169, 170, 179, 180, \underline{187}, 188, 194, 201, 202, \underline{212}, 219, 222, \underline{248}, 295, 388, 393, 394, 395, 396, 403, 404, 405, 406, 409, 410, 411, 412, 424, 426, 427, 428, 430, 431, 432, 433, 435, 436, 438, 439, 441, 442, 444, 445, 449, 450, 452, 453, 454, 455, 457, 458, 460, 461, 462, 463, 464, 465, 466, 467, 469, 470, 472, 473, 474, 475, 477, 480, 484, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 515, 516, 519, 521, 522, 523, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 539, 540, 541, 542, 543, 545, 546, 548, 550, 553, 554, 555, 557, 558, 559, 560, 561, 562, 563, 564, 569, 570, 571, 572, 573, 574, 575, 576, 577, 581, 582, 583, 584, 585, 587, 588, 590, 591, 593, 594, 596, 597, 598, 599, 600, 601, 605, 606, 608, 610, 612, 615, 616, 617, 619, 621, 623, 627, 628, 629, 631, 633, 635, 637, 638, 639, 640, 650, 658, 662, 670, 674, 683, 710.

scanner node: \underline{50}, \underline{51}, 83, 86, 90, 92, 93, 104, \underline{106}, \underline{107}, 108, 109, \underline{110}, \underline{111}, 112, 114, 115, \underline{123}, 124, 126, 148, 152, \underline{159}, 174, 176, 180, \underline{188}, \underline{194}, 196, 199, 205, \underline{222}, \underline{287}, \underline{288}, \underline{295}, \underline{302}, 303, 304, 305, 306, 308, 309, 311, 312, 313, 315, 316, 318, 319, 322, 323, 324, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 347, 349, 350, 351, 352, 353, 354, 355, \underline{388}, \underline{393}, \underline{394}, \underline{395}, \underline{396}, \underline{403}, \underline{404}, \underline{405}, \underline{406}, \underline{409}, \underline{410}, \underline{411}, \underline{412}, \underline{424}, \underline{426}, \underline{427}, \underline{428}, \underline{430}, \underline{431}, \underline{432}, \underline{433}, \underline{435}, \underline{436}, \underline{438}, \underline{439}, \underline{441}, \underline{442}, \underline{444}, \underline{445}, \underline{449}, \underline{450}, \underline{452}, \underline{453}, \underline{454}, \underline{455}, \underline{457}, \underline{458}, \underline{460}, \underline{461}, \underline{462}, \underline{463}, \underline{464}, \underline{465}, \underline{466}, \underline{467}, \underline{469}, \underline{470}, \underline{472}, \underline{473}, \underline{474}, \underline{475}, \underline{477}, 478, 479, \underline{480}, 481, 482, \underline{484}, \underline{486}, \underline{487}, \underline{488}, \underline{489}, \underline{490}, \underline{491}, \underline{492}, \underline{493}, \underline{494}, \underline{495}, \underline{496}, \underline{497}, \underline{498}, \underline{499}, \underline{500}, \underline{501}, \underline{502}, \underline{503}, \underline{504}, \underline{505}, \underline{506}, \underline{507}, \underline{508}, \underline{509}, \underline{510}, \underline{511}, \underline{512}, \underline{513}, \underline{515}, \underline{516}, \underline{519}, \underline{521}, \underline{522}, \underline{523}, \underline{526}, \underline{527}, \underline{528}, \underline{529}, \underline{530}, \underline{531}, \underline{532}, \underline{533}, \underline{534}, \underline{535}, \underline{536}, \underline{537}, \underline{539}, \underline{540}, \underline{541}, \underline{542}, \underline{543}, \underline{545}, \underline{546}, 547, \underline{548}, 549, \underline{550}, 551, \underline{553}, \underline{554}, \underline{555}, \underline{557}, \underline{558}, \underline{559}, \underline{560}, \underline{561}, \underline{562}, \underline{563}, \underline{564}, \underline{569}, \underline{570}, \underline{571}, \underline{572}, \underline{573}, \underline{574}, \underline{575}, \underline{576}, \underline{577}, \underline{581}, \underline{582}, \underline{583}, \underline{584}, \underline{585}, \underline{587}, \underline{588}, \underline{590}, \underline{591}, \underline{593}, \underline{594}, \underline{596}, \underline{597}, \underline{598}, \underline{599}, \underline{600}, \underline{601}, \underline{605}, \underline{606}, \underline{608}, \underline{610}, \underline{612}, \underline{615}, \underline{616}, \underline{617}, \underline{619}, \underline{621}, \underline{623}, \underline{627}, \underline{628}, \underline{629}, \underline{631}, \underline{633}, \underline{635}, \underline{637}, \underline{638}, \underline{639}, \underline{640}, \underline{650}, 651, 652, 653, 655, 656, \underline{658}, 659, 660, \underline{662}, 663, 664, 665, 669, \underline{670}, 673, \underline{674}, 675, 682, \underline{683}, 684, 685, 686, 693, \underline{699}, \underline{710}, 711, 712, 713.

Scanner Type: 6, 8, \underline{13}, \underline{48}, \underline{158}, \underline{187}, \underline{188}, \underline{212}, \underline{219}, 226, \underline{227}, 228, \underline{229}, 231, 233, 241, \underline{248}, 287, 288, 302, 699, 710.

scantest.web: 5, 8, \underline{696}.
scnrtype.web: 5, 8, \underline{209}.

: \underline{244}. : 275, 374, 564, 677, 678. second : \underline{29}, 33, 35, 37, 39, 41, 145, 229, 233,

288, 355, 654, 655, 677, 678, 686, 687, 688, 689, 690, 691, 692.

secondary : \underline{588}, \underline{591}. select strm: \underline{110}, \underline{123}, 127, 128, 129, 130, 131, 132,

133, 134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148, 150, \underline{548}, 549, \underline{550}, 551.

: 266, 335. : 271, 372, 373, 473, 475, 666. set: \underline{84}, \underline{85}, \underline{169}, \underline{170}. set field specifier : \underline{101}, \underline{102}, 104, 670. set field type: 101. setfill : 145. setprecision: 145. setw : 145. shift value: \underline{98}, 99, 100. shorts : \underline{57}, \underline{71}, \underline{78}, \underline{86}, \underline{95}, \underline{101}, \underline{110}, \underline{113}, \underline{122},

\underline{189}, \underline{190}. show : \underline{40}, \underline{41}, \underline{111}, \underline{112}, 115, 116, \underline{179}, \underline{180}, \underline{204}, \underline{205}, 435, 436, 438, 439, 441, 442, 445, 573, 574, 575.

: 284, 385.

show keyword map: \underline{287}, \underline{288}, 699, 713.

size: 102, 103, 108, 148, 303, 655, 685, 686, 688,

689, 690, 691, 692. : 104, 277, 509, 668. : \underline{58}, \underline{64}, 88, 96, 104, 113, 668. : 75, 76, 99. : 103, 281, 533. specifier : \underline{28}, \underline{29}, \underline{51}, \underline{222}, \underline{296}, \underline{674}, 677, 678. : 284, 385. : \underline{189}, \underline{190}, 202, 548, 550. sql strm: \underline{110}, \underline{123}, 148, 150, 151, 152. sscanner node: \underline{84}, \underline{85}, \underline{101}, \underline{102}, \underline{111}, \underline{112}, 115,

\underline{169}, \underline{170}, \underline{179}, \underline{180}.

stack : 219, 302. : 270. start local database query func: \underline{51}, \underline{222}, \underline{299}. start local query func: 51, 222, 299. state: \underline{302}, 306, 308, 309, 310, 311, 312, 313, 315, 316, 317, 318, 319, 320, 322, 323, 324, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 347, 348, 349, 351, 352. state stack : 302, 308, 309, 313. status : \underline{477}, 478, \underline{480}, 481, \underline{699}, \underline{710}, 713. std: \underline{16}, \underline{43}, \underline{44}, \underline{118}, \underline{119}, \underline{154}, \underline{182}, \underline{183}, \underline{207}, \underline{208},

\underline{243}, \underline{244}, \underline{357}, \underline{358}, \underline{695}, \underline{699}, \underline{700}, \underline{715}.

                                           stdafx.web: 5, 8, \underline{18}.

str : 37, 39, 41, 87, 89, 92, 93, 107, 109, 114, 115, 123, 124, 126, 145, 150, 151, 152, 172, 173, 176, 180, 199, 202, 205, 229, 231, 233, 234, 236, 237, 238, 239, 240, 241, 288, 303, 304, 305, 306, 308, 309, 311, 312, 313, 315, 316, 318, 319, 322, 323, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 347, 349, 350, 351, 352, 353, 354, 355, 388, 393, 394, 395, 396, 403, 404, 405, 406, 409, 410, 411, 412, 424, 426, 427, 428, 430, 431, 432, 433, 435, 436, 438, 439, 441, 442, 445, 449, 450, 452, 453, 454, 455, 457, 458, 460, 461, 462, 463, 464, 465, 466, 467, 469, 470, 472, 473, 474, 475, 477, 478, 479, 480, 481, 482, 484, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 515, 516, 519, 521, 522, 523, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 539, 540, 541, 542, 543, 545, 546, 547, 548, 549, 550, 551, 553, 554, 555, 557, 558, 559, 560, 561, 562, 563, 564, 569, 570, 571, 572, 573, 574, 575, 576, 577, 581, 582, 583, 584, 585, 587, 588, 590, 591, 593, 594, 596, 597, 598, 599, 600, 601, 605, 606, 608, 610, 612, 615, 616, 617, 619, 621, 623, 627, 628, 629, 631, 633, 635, 637, 638, 639, 640, 650, 651, 652, 653, 655, 656, 658, 659, 660, 662, 663, 664, 665, 669, 670, 673, 674, 675, 682, 683, 684, 685, 686, 693, 699, 711, 712.

strcat : 410, 411, 427, 428. strchar : 236, 237, 241. strchr : 236, 654, 655. strcpy : 303, 308, 354, 409, 426, 427, 545, 546,

547, 548, 549, 550, 551, 615, 616, 617, 619, 621, 623, 699, 712.

: 269, 303, 308. string: 14, 40, 41, 49, 77, 86, 88, 93, 106, 107,

108, 110, 111, 112, 113, 123, 124, 125, 126, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 144, 147, 148, 159, 163, 179, 180, 188, 189, 191, 204, 205, 219, 229, 233, 237, 257, 259, 260, 262, 263, 288, 305, 353, 545, 546, 548, 550, 583, 615, 651, 668, 669, 703.

: 271, 371. : 283, 384, 418, 441. string value: 303, 308, 354, \underline{363}. strings : 188. strings id string : \underline{613}. stringstream: 37, 39, 41, 87, 92, 102, 106, 107,

110, 112, 123, 172, 176, 180, 199, 202, 205, 229, 231, 233, 237, 288, 302, 546, 547, 548, 550, 577, 643, 650, 658, 662, 670, 674, 683, 710.

strlen: 237. : 104, 277, 376, 510, 668. : 57, \underline{58}, \underline{64}, 88, 96, 104, 113,

146, 148, 668. : 75, 76, 99, 147, 148. subscript iter : \underline{655}. subtype: \underline{188}, 196, 205, 546, 548, 550. subtype map: \underline{188}, \underline{191}, 202, 205. : 104, 277, 511, 668. : \underline{58}, \underline{64}, 88,

96, 104, 113, 668. : 75, 76, 99. : 102, 280, 379, 521. table: \underline{102}, 103, 104. target type: 53, \underline{85}, 113. target type map: \underline{49}, \underline{77}, 95, 96, 108, 113, 148. target types : \underline{49}, 71, 93, 108, 113, 148, 666. : 699. temp filename: \underline{577}. temp query : \underline{670}. temp strm: \underline{37}, \underline{39}, \underline{41}, \underline{87}, 89, \underline{92}, 93, \underline{102}, \underline{107},

109, \underline{112}, 113, 114, 115, \underline{123}, 124, 126, 148, 151,

152, \underline{172}, 173, \underline{176}, \underline{180}, \underline{199}, \underline{202}, \underline{205}, \underline{229}, \underline{231},

\underline{233}, 234, 236, 237, 238, 239, 240, 241, \underline{288}, \underline{302}, 303, 304, 305, 306, 308, 309, 311, 312, 313, 315, 316, 318, 319, 322, 323, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 347, 349, 350, 351, 352, 353, 354, 355, 388, 393, 394, 395, 396, 403, 404, 405, 406, 409, 410, 411, 412, 424, 426, 427, 428, 430, 431, 432, 433, 435, 436, 438, 439, 441, 442, 444, 445, 449, 450, 452, 453, 454, 455, 457, 458, 460, 461, 462, 463, 464, 465, 466, 467, 469, 470, 472, 473, 474, 475, 477, 478, 479, 480, 481, 482, 484, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 515, 516, 519, 521, 522, 523, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 539, 540, 541, 542, 543, 545, 546, 548, 550, 553, 554, 555, 557, 558, 559, 560, 561, 562, 563, 564, 569, 570, 571, 572, 573, 574, 575, 576, 577, 581, 582, 583, 584, 585, 587, 588, 590, 591, 593, 594, 596, 597, 598, 599, 600, 601, 605, 606, 608, 610, 612, 615, 616, 617, 619, 621, 623, 627, 628, 629, 631, 633, 635, 637, 638, 639, 640, \underline{643}, \underline{650}, 651, 652, 653, 655, 656, \underline{658}, 659, 660, \underline{662}, 663, 664, 665, 669, \underline{670}, 673, \underline{674}, 675, 682, \underline{683}, 684, 685, 686, 693, 699, \underline{710}, 711, 712.

temp val : \underline{710}.

: 285, 699. tertiary : \underline{591}, \underline{594}. : 284, 385. tex file ctr : \underline{14}, 577, \underline{703}, \underline{710}. tex file strm: \underline{14}, 577, \underline{703}. tex filename str : \underline{14}, 577, \underline{703}, 710. tex mutex : \underline{14}, 577, \underline{703}. : \underline{189}, \underline{190}, 202, 546. tex strm: \underline{106}, \underline{107}, 108, 109, \underline{546}, \underline{547}, \underline{548},

549, \underline{550}, 551.

theApp: \underline{699}.

this : 37, 92, 93, 94, 176, 230.

time: 577.

time mutex : \underline{14}, 577, \underline{703}.

: 268, 368.

: 267, 367, 680.

: 273, 373.

: \underline{161}, \underline{162}, 177, 178, 542.

: 104, 277, 376, 512, 668.

: 57, \underline{58}, \underline{64}, 88, 96, 104, 113,

135, 136, 668. : 75, 76, 99, 136. tm: 577. TO DO: 86, 88, 674, 683. token map: 123, 199, 205, 234, \underline{262}, \underline{263}, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 279, 280, 281, 282, 283, 284, 285, 288, 303, 658, 660, 665, 674, 682.

token stack : 219, 303, 355, 424, 656. Token Type: \underline{213}, 215, \underline{216}, 217, \underline{218}, 219,

303, 355, 424, 656. top: 303, 308. : \underline{55}, \underline{56}, 96, \underline{164}, 665, 668, 669, 670. tp: \underline{577}. traverse: \underline{101}, \underline{102}, 104. traverse query : \underline{670}. true: 104, 236, 240, 241, 549, 551, 588, 591,

594, 655, 670. ttarget : 84. ttarget type: \underline{84}. ttype: \underline{217}, \underline{218}. type: \underline{28}, \underline{29}, \underline{51}, \underline{159}, 176, 180, \underline{188}, 196, 199, 205,

\underline{213}, 216, \underline{218}, \underline{222}, \underline{232}, \underline{233}, 234, 236, 240, 241, \underline{292}, \underline{295}, \underline{296}, 303, 355, 424, 540, 541, 542, 543, 655, 656, \underline{658}, 660, \underline{670}, \underline{674}, 677, 678.

: 104, 277, 513, 668. : \underline{58}, \underline{64}, 88, 96, 104, 113, 668. : 75, 76, 99. : 710. : 366. unget : 311, 312, 316, 323, 328, 340, 349, 352,

354, 355. Unlock : \underline{12}, 37, 39, 87, 89, 92, 93, 107, 109, 114,

115, 123, 124, 126, 152, 172, 173, 176, 180, 199, 202, 205, 229, 231, 233, 234, 236, 237, 238, 239, 240, 241, 288, 303, 304, 305, 306, 308, 309, 311, 312, 313, 315, 316, 318, 319, 322, 323, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 347, 349, 350, 351, 352, 353, 354, 355, 403, 404, 405, 406, 409, 410, 411, 412, 424, 426, 427, 428, 430, 431, 432, 433, 435, 436, 438, 439, 441, 442, 445, 449, 450, 452, 453, 454, 455, 457, 458, 460, 461, 462, 463, 464, 465, 466, 467, 469, 470, 472, 473, 474, 475, 477, 478, 479, 480, 481, 482, 484, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 515, 516, 519, 521, 522, 523, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 539, 540, 541, 542, 543, 545, 546, 548, 550, 553, 554, 555, 557, 558, 559, 560, 561, 562, 563, 564, 569, 570, 571, 572, 573, 574, 575, 576, 577, 581, 582, 583, 584, 585, 587, 588, 590, 591, 593, 594, 596, 597, 598, 599, 600, 601, 605, 606, 608, 610, 612, 615, 616, 617, 619, 621, 623, 627, 628, 629, 631, 633, 635, 637, 638, 639, 640, 650, 651, 652, 653, 655, 656, 658, 659, 660, 662, 663, 664, 665, 669, 670, 673, 674, 675, 682, 683, 684, 685, 686, 693, 699, 711, 712.

up: \underline{49}, 83, 88, 93, 108, 113, 148, \underline{188}, 196, 240,

241, 588, 591, 594, 668, 669, 670. uup: \underline{84}, \underline{85}. v: \underline{28}, \underline{29}, \underline{51}, \underline{101}, \underline{102}, \underline{222}, \underline{291}, \underline{292}, \underline{294}, \underline{295}, \underline{296}, \underline{297}, \underline{637}, \underline{638}, \underline{639}, \underline{640}, \underline{650}, \underline{658}, \underline{662}, \underline{670}, \underline{674}, \underline{683}.

val : \underline{28}, \underline{29}, \underline{51}, \underline{222}, \underline{296}, \underline{554}, \underline{555}, \underline{674}, 675,

677, 678. value: \underline{49}, \underline{51}, 83, 88, 93, 108, 113, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148, \underline{159}, \underline{188}, 196, 199, 205, 213, 216, 218, \underline{222}, \underline{257}, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 279, 280, 281, 282, 283, 284, 285, 288, \underline{294}, 301, 302, 303, 308, 311, 312, 316, 323, 328, 340, 349, 352, 354, 355, 424, 469, 477, 539, 540, 541, 542, 543, 545, 546, 548, 550, 553, 554, 555, 573, 574, 575, 581, 583, 584, 585, 605, 615, 627, \underline{662}, 665, 668, 669, 670, 699.

value name: \underline{257}, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 279, 280, 281, 282, 283, 284, 285, 288, 308, 355.

value type: \underline{49}, 53, 69, 83, 93, 108, 113, 148, 583,

584, 585, 668, 669, 670. value type map: \underline{49}, \underline{77}, 96, 108, 113, 148. values : 86. : 282, 355, 435, 438, 441, 444. variable func: \underline{51}, \underline{222}, \underline{291}, 424, \underline{650}, 656. : 282, 354.

                                           variabls.w : 5, 8.

variabls id string : \underline{422}. : \underline{20}. vec: \underline{28}, \underline{29}, \underline{51}, \underline{222}, \underline{297}, \underline{684}, 685, 686, 687,

688, 689, 690, 691, 692. vector: 49, 93, 108, 113, 148, 219, 637, 638,

639, 640, 655, 684, 686. vvalue: \underline{84}, \underline{85}, 217, 218.

vvalue type: \underline{84}, \underline{85}.
w: \underline{683}.

where strm 0 : \underline{110}, \underline{123}, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 140, 141, 142, 143, 144, 145, 147, 148, 149, 150, \underline{548}, 549, \underline{550}, 551. where strm 1 : \underline{110}, \underline{123}, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 147, 148, 150, \underline{548}, 549, \underline{550}, 551. : 276, 375. : 19, 27, 47, 157, 186, 211, 247, 647. : 276, 332, 375, 600. : 267, 332, 367, 463, 669, 670. xor node: \underline{49}, 83, 88, 93, 104, 108, 115, 126,

148, 591, 669, 670. : 276, 332, 375, 591, 601. xor or xor not : 595. : \underline{55}, \underline{56}, 96, 126, 591, 669, 670. xxor node: \underline{84}, \underline{85}. year : \underline{29}, 33, 35, 37, 39, 41, 145, 677, 678, 686, 687. : 275, 374, 559, 677, 678. : 103, 281, 534. : 103, 281, 535. : 103, 281, 537. : 103, 281, 536. : 275, 374, 557, 677, 678. year range begin: \underline{29}, 33, 35, 37, 39, 41, 677, 678. year range end : \underline{29}, 33, 35, 37, 39, 41, 677, 678. : 275, 374, 558, 677, 678. yychar : 424. yyclearin: 424. yydebug : \underline{14}, 711. yyerror : \underline{362}, \underline{708}, \underline{709}. yylex : 6, 8, 219, 220, \underline{301}, \underline{302}, 350, 353, \underline{361},

696, 699. : \underline{643}. : 699. yylval : 424. yyparse: \underline{29}, \underline{51}, \underline{160}, 219, \underline{220}, \underline{705}, 713. : \underline{643}. : 213, 217, 218, 220, 301, 302, 361,

363, 656, 699. yywrap: \underline{706}, \underline{707}.

IWF Metadata Harvester III NAMES OF THE SECTIONS 403

⟨ Bison declarations 364 ⟩ Used in section 643. ⟨ Common code for punctuation 351, 352 ⟩ Cited in section 339. Used in section 350. ⟨ Declare namespace Scan Parse 251 ⟩ Used in section 357.

⟨ Declare non-member functions for Date Time Type 38 ⟩ Used in sections 43 and 44. ⟨ Declare scanning and parsing functions 705, 706, 708 ⟩ Used in section 715.

⟨ Declare Datasource Type functions 167, 169, 171, 175, 177, 179 ⟩ Used in section 159. ⟨ Declare Date Time Type functions 32, 34, 36, 40 ⟩ Used in section 29. ⟨ Declare Id Type functions 195, 198, 201, 204 ⟩ Used in section 188. ⟨ Declare Query Type functions 82, 84, 86, 91, 95, 97, 101, 106, 110, 111 ⟩ Used in section 50. ⟨ Declare Scan Parse functions 264, 287, 291, 292, 294, 295, 296, 297, 299, 300 ⟩ Used in sections 251 and 255. ⟨ Declare Scanner Type functions 226, 228, 230, 232 ⟩ Used in section 219. ⟨ Declare Token Type functions 215, 217 ⟩ Used in section 213. ⟨ Declare class Datasource Type 159 ⟩ Used in sections 182 and 183. ⟨ Declare class Date Time Type 29 ⟩ Used in sections 43 and 44. ⟨ Declare class Query Type 49, 50 ⟩ Used in sections 118 and 119. ⟨ Declare class Scanner Type 219 ⟩ Used in sections 243 and 244. ⟨ Declare keyword map 259 ⟩ Used in section 251. ⟨ Declare static Datasource Type constants 161, 164 ⟩ Used in section 159. ⟨ Declare static Id Type constants 189 ⟩ Used in section 188. ⟨ Declare static Id Type variables 191 ⟩ Used in section 207. ⟨ Declare static Query Type constants 53, 55, 58, 60, 61, 62, 69, 71, 78 ⟩ Used in section 50. ⟨ Declare static Query Type variables 74, 75 ⟩ Used in section 50. ⟨ Declare struct Id Type 188 ⟩ Used in sections 207 and 208. ⟨ Declare struct Keyword Type 257 ⟩ Used in section 251. ⟨ Declare struct Token Type 213 ⟩ Used in sections 243 and 244. ⟨ Declare token map 262 ⟩ Used in section 251. ⟨ Declare yyerror 362 ⟩ Used in section 643. ⟨ Declare yylex 301, 361 ⟩ Used in sections 358 and 643.

⟨ Define non-member functions for Date Time Type 39 ⟩ Used in section 43.

⟨ Define parser functions 650, 651, 652, 653, 654, 655, 656, 658, 659, 660, 662, 663, 664, 665, 666, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693 ⟩ Used in section 695.

⟨ Define scanning and parsing functions 707, 709 ⟩ Used in section 715.

⟨ Define Datasource Type functions 168, 170, 172, 173, 174, 176, 178, 180 ⟩ Used in section 182. ⟨ Define Date Time Type functions 33, 35, 37, 41 ⟩ Used in section 43. ⟨ Define Id Type functions 196, 199, 202, 205 ⟩ Used in section 207. ⟨ Define Query Type functions 83, 85, 87, 88, 89, 90, 92, 93, 94, 96, 98, 99, 100, 102, 103, 104, 107, 108, 109, 112, 113,

114, 115, 116, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ⟩ Used in sections 118 and 154.

⟨ Define Scan Parse functions 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 279, 280, 281, 282, 283,

284, 285, 288 ⟩ Used in section 357. ⟨ Define Scanner Type functions 227, 229, 231, 233, 234, 235, 236, 237, 238, 239, 240, 241 ⟩ Used in section 243. ⟨ Define Token Type functions 216, 218 ⟩ Used in section 243. ⟨ Define tmain 699 ⟩ Used in section 700. ⟨ Define main 710, 711, 712, 713 ⟩ Used in section 715. ⟨ Define yylex 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,

325, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350 ⟩ Used in section 357.

⟨ Filename sections 642 ⟩ Used in sections 643 and 644. ⟨ Forward declarations 13, 28, 48, 158, 187, 212, 248 ⟩ Used in sections 16, 43, 44, 118, 119, 182, 183, 207, 208, 243, 244,

357, and 358. ⟨ GNU Free Documentation License 717 ⟩ Cited in section 2. Used in section 718.

⟨ GNU General Public License 716 ⟩ Cited in section 2. Used in section 718. ⟨ Garbage 393 ⟩ Used in section 644. ⟨ Global variables 698, 703 ⟩ Used in sections 700 and 715. ⟨ Include files 10, 20, 26, 46, 121, 156, 185, 210, 246, 360, 646, 697, 702 ⟩ Used in sections 16, 24, 43, 118, 154, 182, 207,

243, 357, 643, 695, 700, and 715.

⟨ Initialize static Datasource Type constants 162 ⟩ Used in section 182. ⟨ Initialize static Datasource Type variables 163 ⟩ Used in section 182. ⟨ Initialize static Id Type constants 190 ⟩ Used in section 207.

⟨ Initialize static Query Type constants 54, 56, 63, 64, 66, 67, 68, 70, 72, 79 ⟩ Used in section 118. ⟨ Initialize static Query Type variables 76, 77 ⟩ Used in section 118. ⟨ Look up curr id in keyword map and possibly id map 353, 354, 355 ⟩ Used in sections 310, 320, 323, 328, 340,

348, and 352. ⟨ Parser rules 388, 390, 391, 394, 395, 396, 403, 404, 405, 406, 409, 410, 411, 412, 414, 416, 418, 420, 424, 426, 427, 428, 430,

431, 432, 433, 435, 436, 438, 439, 441, 442, 444, 445, 449, 450, 452, 453, 454, 455, 457, 458, 460, 461, 462, 463, 464, 465, 466, 467, 469, 470, 472, 473, 474, 475, 477, 478, 479, 480, 481, 482, 484, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 515, 516, 519, 521, 522, 523, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 539, 540, 541, 542, 543, 545, 546, 547, 548, 549, 550, 551, 553, 554, 555, 557, 558, 559, 560, 561, 562, 563, 564, 569, 570, 571, 572, 573, 574, 575, 576, 577, 581, 582, 583, 584, 585, 587, 588, 590, 591, 593, 594, 596, 597, 598, 599, 600, 601, 605, 606, 608, 610, 612, 615, 616, 617, 619, 621, 623, 627, 628, 629, 631, 633, 635, 637, 638, 639, 640 ⟩ Used in section 643.

⟨ Preprocessor macro calls 19, 27, 47, 157, 186, 211, 247, 647 ⟩ Used in sections 24, 44, 119, 183, 208, 244, and 358.

⟨ Preprocessor macro definitions 73 ⟩ Used in sections 118 and 119.

⟨ Token and type declarations 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 382, 383, 384, 385 ⟩

Used in section 643. ⟨ Type declarations for non-terminal symbols 399, 402, 407, 408, 413, 415, 417, 419, 423, 425, 429, 434, 437, 440, 443,

447, 448, 451, 456, 459, 468, 483, 485, 514, 517, 538, 544, 552, 556, 566, 568, 580, 586, 589, 592, 595, 604, 607, 609, 611, 614, 618, 620, 622, 626, 630, 632, 634, 636 ⟩ Used in section 643.

⟨ assign.w 446 ⟩ Cited in sections 7 and 8. Used in section 642. ⟨ commands.w 565 ⟩ Cited in sections 7 and 8. Used in section 642. ⟨ declrtns.w 401 ⟩ Cited in sections 7 and 8. Used in section 642. ⟨ dtsrcexp.w 603 ⟩ Cited in sections 7 and 8. Used in section 642. ⟨ dtsrctyp.web 155 ⟩ Cited in sections 6 and 8. Used in section 182. ⟨ dttmexp.w 625 ⟩ Cited in sections 7 and 8. Used in section 642. ⟨ dttmtype.web 25 ⟩ Cited in sections 6 and 8. Used in section 43. ⟨ grpstmnt.w 398 ⟩ Cited in sections 7 and 8. Used in section 642. ⟨ idtype.web 184 ⟩ Cited in sections 6 and 8. Used in section 207. ⟨ main.web 701 ⟩ Cited in sections 6 and 8. Used in section 715. ⟨ nonwin.web 9 ⟩ Cited in sections 6, 8, and 17. Used in section 17. ⟨ parser.w 359 ⟩ Cited in sections 6, 7, 8, and 644. Used in section 642. ⟨ prsrfncs.web 645 ⟩ Used in section 695. ⟨ qtgensql.web 120 ⟩ Cited in sections 6 and 8. Used in section 154. ⟨ queryexp.w 579 ⟩ Cited in sections 7 and 8. Used in section 642. ⟨ querytyp.web 45 ⟩ Cited in sections 6 and 8. Used in section 118. ⟨ scanner.web 245 ⟩ Cited in sections 6 and 8. Used in section 357. ⟨ scantest.web 696 ⟩ Cited in sections 6 and 8. Used in section 700. ⟨ scnrtype.web 209 ⟩ Cited in sections 6 and 8. Used in section 243. ⟨ stdafx.web 18 ⟩ Cited in sections 6 and 8. Used in section 23. ⟨ strings.w 613 ⟩ Used in section 642. ⟨ variabls.w 422 ⟩ Cited in sections 7 and 8. Used in section 642. ⟨ 183 ⟩

⟨ 44 ⟩

⟨ 208 ⟩

⟨ 16 ⟩

⟨ 643 ⟩ ⟨ 119 ⟩ ⟨ 358 ⟩ ⟨ 244 ⟩

⟨ 24 ⟩

⟨ Mutex Type declaration 12 ⟩ Used in section 16. ⟨ extern declaration of namespace Scan Parse 252, 254, 255 ⟩ Used in section 358.

⟨ extern declarations for global variables 14, 21 ⟩ Used in sections 16 and 24.

⟨ extern keyword map declaration 260 ⟩ Used in section 255. ⟨ extern token map declaration 263 ⟩ Used in section 255. ⟨ friend declarations for Scanner Type 220, 222 ⟩ Used in section 219. ⟨ friend declarations for class Datasource Type 160 ⟩ Used in section 159. ⟨ friend declarations for class Query Type 51 ⟩ Used in section 49. ⟨ union declaration for 363 ⟩ Used in section 643.

IWF Metadata Harvester III Scantest: The Program Version 1.0 by Laurence D. Finston

December 2006

Section Page

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 Copyright and licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1 Formatting commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1 File Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1

Source Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1 Logical and Hierarchical Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 Parser files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2 Alphabetical Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3

Non-Windows Code (nonwin.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 4 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4 Type declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4

Mutex Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4 Forward declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5 extern declarations for global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5 Putting Non-Win together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 6 stdafx (stdafx.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 7 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 7 Include files in stdafx.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 7 extern declarations for global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 8 Putting stdafx.web together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 8 Date Time Type (dttmtype.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 9 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 9 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 9 class Date Time Type declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 10 Date Time Type functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 10

Constructors and setting functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 10 Default constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 11 Destructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 11 Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 12 Output operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 15 Show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 17

Putting Date Time Type together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 18

ii  TABLE OF CONTENTS  IWF Metadata Harvester III

Query Type (querytyp.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 20 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 20 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 20 Forward declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 20 class Query Type declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 21 friend declarations for class Query Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 22 Declare static Query Type constants and variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 22

Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 28 Initialize static Query Type variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 31 Query Type functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 31

Constructor and setting functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 31 Default constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 32 Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 32 Destructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 33 Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 35 Initialize type maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 39 Initialize flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 41 Set field specifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 44 Functions for generating strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 47 Generate TEX string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 47 Generate SQL string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 51 Show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 51

Putting Query Type together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 55 Query Type::generate sql string definition (qtgensql.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 57 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 57

Generate SQL string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 57 Putting Query Type::generate sql string together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 79 datasource type (dtsrctyp.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 80 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 80 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 80 Forward declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 80 class datasource type declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 81 friend declarations for class datasource type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 81 Declare static datasource type constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 81 Initialize static Datasource Type variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 82 datasource type functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 82

Constructor and setting functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 82 Default constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 82 Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 83 Destructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 83 Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 84 Initialize type maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 85 Show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 86

Putting datasource type together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 86 id type (idtype.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 87 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 87 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 87 struct id type declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 88

static Id Type constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 88 id type functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 89

Constructors and setting functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 89 Default constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 89

IWF Metadata Harvester III TABLE OF CONTENTS iii

Destructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 90 Initialize subtype map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 91 Show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 92

Putting id type together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 93 Scanner Type (scnrtype.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 94 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 94 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 94 Forward declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 94 struct Token Type declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 95

Token Type functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 95 Default Constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 95 Non-Default Constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 96

class Scanner Type declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 97 friend declarations for Scanner Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 97

friend declarations for parser rule functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 97 friend declarations for functions for group statements . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 98

Scanner Type functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 98

Constructors and setting functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 98 Default constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 99 Destructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 99 Initialize id map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 100 Lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 101

Putting Scanner Type together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 108 Scanning (scanner.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 109 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 109 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 109 Forward declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 109 Type declarations for the scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 110 Declare namespace Scan Parse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 110 extern declaration of namespace Scan Parse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 110 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 111

Declare struct Keyword Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 111 Keyword map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 111 Declare keyword map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 111 Token map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 112 Declare token map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 112 Initialize keyword map and token map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 112 Show keyword map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 134

Parser rule functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 135

Functions for variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 135 variable func . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 136 Functions for declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292 136 Functions for assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 136 query assignment func 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 136 query assignment func 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 136 datetime assignment func 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 137 datetime assignment func 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 137 Functions for Group Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 137 Start local database query function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 137 End query function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 138

The scanning function yylex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 138 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 141

iv  TABLE OF CONTENTS  IWF Metadata Harvester III

Double-quote symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 142 Alphabetical characters and underline character . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 144 Digits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 147 Escaped characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 148 Punctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 149 Space characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 163

Common code for punctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 165 Look up curr id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 166

Putting the scanner together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 168

Parser (parser.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 169 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 169 Declare yylex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 169 Declare yyerror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 169 union declaration for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 169 Bison declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 170

Token and Type Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 170 Punctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 170 Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 171 Arithmetical Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 171 Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 172 Declarators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 172 Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 172 Predicates and Control Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 173 Columns of individual tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 175

Pica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 175 Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 176

Parser rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 177

Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 177

⟨program⟩ ⟶ ⟨statement list⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 177 Statement list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 177

⟨statement list⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 178 ⟨statement list⟩ ⟶ ⟨statement list⟩ ⟨statement⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 178

Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 178 ⟨statement⟩ ⟶ ⟨group statement⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 178 ⟨statement⟩ ⟶ ⟨declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 178 ⟨statement⟩ ⟶ ⟨assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 179 ⟨statement⟩ ⟶ ⟨command⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 179

Group Statement (grpstmnt.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 179 Declarations (declrtns.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 180

⟨declaration⟩ ⟶ ⟨query declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 180 ⟨declaration⟩ ⟶ ⟨string declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 181 ⟨declaration⟩ ⟶ ⟨datasource declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 181 ⟨declaration⟩ ⟶ ⟨datetime declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 182 ⟨variable declaration segment list⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 182 ⟨subscript placeholder⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 182

⟨variable declaration segment list⟩ ⟶ . . . . . . . . . . . . . . 409 183 ⟨variable declaration segment list⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 183 ⟨variable declaration segment list⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 184 ⟨subscript placeholder⟩ ⟶ . . . . . . . . . . . . . . . . . . . 412 184

⟨query declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 185

⟨query declaration⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 185 ⟨datasource declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 185

IWF Metadata Harvester III TABLE OF CONTENTS v

⟨datasource declaration⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 185 ⟨string declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 186

⟨string declaration⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 186 ⟨datetime declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 186

⟨datetime declaration⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 187

Variables (variabls.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 187

⟨variable name⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 187

⟨variable name⟩ ⟶ ⟨variable segment list⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 188 ⟨variable segment list⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 188

⟨variable segment list⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . 426 189 ⟨variable segment list⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 190 ⟨variable segment list⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 191 ⟨subscript⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 191 ⟨subscript⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 192 ⟨subscript⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 193 ⟨subscript⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . 432 194 ⟨subscript⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . 433 195 ⟨query variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 195

⟨query variable⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 196 ⟨query variable⟩ ⟶ ⟨variable name⟩ . . . . . . . . . . . . . . . . . . . . . . . 436 197

⟨datasource variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 197 ⟨datasource variable⟩ ⟶ . . . . . . . . . . . . . . . . . . . 438 198 ⟨datasource variable⟩ ⟶ ⟨variable name⟩ . . . . . . . . . . . . . . 439 199

⟨string variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 199 ⟨string variable⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 200 ⟨string variable⟩ ⟶ ⟨variable name⟩ . . . . . . . . . . . . . . . . . . . . . . 442 201

⟨datetime variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 201 ⟨datetime variable⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . 444 202 ⟨datetime variable⟩ ⟶ ⟨variable name⟩ . . . . . . . . . . . . . . . . . 445 203

Assignment (assign.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 203

⟨negation optional⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 204 ⟨negation optional⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 204 ⟨negation optional⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 205

⟨match term optional⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 205 ⟨match term optional⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452 206 ⟨match term optional⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 207 ⟨match term optional⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 208 ⟨match term optional⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 209

⟨assign or plus-assign⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 209 ⟨assign or plus-assign⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 210 ⟨assign or plus-assign⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 211

⟨assignment operator⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 211 ⟨assignment operator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 212 ⟨assignment operator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 213 ⟨assignment operator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 214 ⟨assignment operator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 215 ⟨assignment operator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 216

⟨assignment⟩ ⟶ ⟨query assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 216 ⟨assignment⟩ ⟶ ⟨datasource assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 217 ⟨assignment⟩ ⟶ ⟨string assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 217 ⟨query assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 217

⟨query assignment⟩ ⟶ ⟨query variable⟩ ⟨query expression⟩ . . . . . . . . . . . . 469 218

vi  TABLE OF CONTENTS  IWF Metadata Harvester III

⟨assignment⟩ ⟶ ⟨datetime assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 219

Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 219 ⟨query assignment⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 220 ⟨query assignment⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 221 ⟨query assignment⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474 222 ⟨query assignment⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 223

Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 223 ⟨query assignment⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 224 ⟨query assignment⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 226 ⟨field specifier⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 227

⟨field specifier⟩ ⟶ ⟨field designator⟩ ⟨field qualifier list⟩ . . . . . . . . . . . . . 484 227 ⟨field designator⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485 228

⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 228 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 229 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . 488 230 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 231 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 232 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491 233 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 234 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493 235 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 236 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . 495 237 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 238 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . 497 239 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498 240 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499 241 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500 242 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . 501 243 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . 502 244 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503 245 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . 504 246 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505 247 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 248 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 249 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 250 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 251 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510 252 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . 511 253 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512 254 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 255

⟨field qualifier⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 255 ⟨field qualifier list⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 256 ⟨field qualifier list⟩ ⟶ ⟨field qualifier list⟩ ⟨field qualifier⟩ . . . . . 516 256

⟨field qualifier⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517 257 Generic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 257 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519 257 Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520 257

⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521 258 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 259 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523 260

Field qualifiers for database table columns . . . . . . . . . . . . . . . . . . . . . . . . . . 524 260 Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525 260

IWF Metadata Harvester III TABLE OF CONTENTS vii

⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . 526 261 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . 527 262 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . 528 263 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . 529 264 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . 530 265 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . 531 266 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . 532 267 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533 268 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . 534 269 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . 535 270 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . 536 271 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . 537 272

⟨datasource assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538 272 ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ ⟨datasource expression⟩ 539 273 ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ . . . . . . . . . . . . . . . . 540 274 ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ . . . . . . . . . . . 541 275 ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ . . . . . . . . . . . . . . 542 276 ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ … 543 277

⟨string assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 277 ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨string expression⟩ . . . . . . . . . . . 545 278 ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨query expression⟩ . . . . . . . . 546 279 ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨query expression⟩ …. 548 280 ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨query expression⟩ … 550 282

⟨datetime assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 283 ⟨datetime assignment⟩ ⟶ ⟨datetime variable⟩ ⟨datetime expression⟩ … 553 284 ⟨datetime assignment⟩ ⟶ ⟨datetime variable⟩ ⟨datetime specifier⟩ (etc.) . 554 285 ⟨datetime assignment⟩ ⟶ ⟨datetime variable⟩ ⟨datetime specifier⟩ (etc.) . 555 286

Datetime specifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 287 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557 287 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558 288 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559 289 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560 290 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 291 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562 292 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563 293 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564 294

Commands (commands.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 294

Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 294

⟨message or errmessage⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 295 ⟨message or errmessage⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569 295 ⟨message or errmessage⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570 296

⟨command⟩ ⟶ ⟨message or errmessage⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571 297 ⟨command⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572 298 ⟨command⟩ ⟶ ⟨query variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 299 ⟨command⟩ ⟶ ⟨datasource variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 301 ⟨command⟩ ⟶ ⟨datetime variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575 303 ⟨command⟩ ⟶ ⟨string expression⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576 304 ⟨command⟩ ⟶ ⟨string expression⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 305

Query expressions (queryexp.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578 305

query primary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580 306 ⟨query primary⟩ ⟶ ⟨query variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581 307 ⟨query primary⟩ ⟶ ⟨query expression⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582 308

viii  TABLE OF CONTENTS  IWF Metadata Harvester III

⟨query primary⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 309 ⟨query primary⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584 310 ⟨query primary⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585 311

query secondary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586 311 ⟨query secondary⟩ ⟶ ⟨query primary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 312 ⟨query secondary⟩ ⟶ ⟨query secondary⟩ ⟨and or and not⟩ ⟨query primary⟩ . . . . . 588 313

query tertiary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 313 ⟨query tertiary⟩ ⟶ ⟨query secondary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 314 ⟨query tertiary⟩ ⟶ ⟨query tertiary⟩ ⟨xor or xor not⟩ ⟨query secondary⟩ . . . . . . . . 591 315

query expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592 315 ⟨query expression⟩ ⟶ ⟨query tertiary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 316 ⟨query expression⟩ ⟶ ⟨query expression⟩ ⟨or or or not⟩ ⟨query tertiary⟩ . . . . . . . 594 317

Boolean operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595 317 ⟨and or and not⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596 318 ⟨and or and not⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 319 ⟨or or or not⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 320 ⟨or or or not⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 321 ⟨xor or xor not⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600 322 ⟨xor or xor not⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601 323

Datasource expressions (dtsrcexp.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602 323

datasource primary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604 323 ⟨datasource primary⟩ ⟶ ⟨datasource variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605 324 ⟨datasource primary⟩ ⟶ ⟨datasource expression⟩ . . . . . . . . . . . . . . . . . . . . . . . . 606 325

datasource secondary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607 325

⟨datasource secondary⟩ ⟶ ⟨datasource primary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 326 datasource tertiary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 326

⟨datasource tertiary⟩ ⟶ ⟨datasource secondary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610 327 datasource expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 327

⟨datasource expression⟩ ⟶ ⟨datasource tertiary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 328

String expressions (strings.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 328

⟨string primary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 328 ⟨string primary⟩ ⟶ ⟨string variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615 329 ⟨string primary⟩: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 330 ⟨string primary⟩ ⟶ ⟨string expression⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 331

string secondary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 331

⟨string secondary⟩ ⟶ ⟨string primary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 332 string tertiary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 332

⟨string tertiary⟩ ⟶ ⟨string secondary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 333 string expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622 333

⟨string expression⟩ ⟶ ⟨string tertiary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623 334

Datetime expressions (dttmexp.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624 334

datetime primary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626 334 ⟨datetime primary⟩ ⟶ ⟨datetime variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627 335 ⟨datetime primary⟩ ⟶ ⟨datetime expression⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . 628 336 ⟨datetime primary⟩ ⟶ ⟨datetime element list⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629 337

datetime secondary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630 337

⟨datetime secondary⟩ ⟶ ⟨datetime primary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631 338 datetime tertiary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632 338

⟨datetime tertiary⟩ ⟶ ⟨datetime secondary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 339 datetime expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634 339

⟨datetime expression⟩ ⟶ ⟨datetime tertiary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635 340 Datetime element list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636 340

IWF Metadata Harvester III TABLE OF CONTENTS ix

⟨datetime element list⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . 637 341 ⟨datetime element list⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638 342 ⟨datetime element list⟩ ⟶ ⟨datetime element list⟩ . . . . . . . . . . . . 639 343 ⟨datetime element list⟩ ⟶ ⟨datetime element list⟩ . . . . . . . . . . . . . . 640 344

Putting the parser together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641 344 Parser functions (prsrfncs.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 346 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646 346 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647 346 Parser function definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 346

Functions for variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649 346 variable func . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650 347 Functions for declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 350 Declare variable function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658 351 Functions for assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661 352 query assignment func 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662 353 query assignment func 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670 360 datetime assignment func 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674 364 datetime assignment func 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683 369

Putting Parser Functions together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694 372 Scan Test (scantest.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696 373 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697 373 Global variable declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698 373 Define tmain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699 373 Putting Scan Test together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700 375 Main when using GCC (main.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 375 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702 375 Global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 375 Scanning and parsing input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704 376 Main itself . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710 377 Putting Main together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714 380 GNU General Public License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716 381 GNU Free Documentation License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717 385 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 391