§1  LDF Metadata Exchange Utilities  INTRODUCTION 1

1. Introduction. [LDF 2006.10.18.]

2. Copyright and licenses. [LDF 2006.10.23.]

This document is part of the LDF Metadata Exchange Utilities, a package for metadata exchange. The LDF Metadata Exchange Utilities contain code from the the IWF Metadata Harvester, a package for metadata harvesting.

The following copyright notice applies to the contents of this document up to and including January 31, 2007:

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

The following copyright notice applies to all changes and additions to this document starting on February 1, 2007:

Copyright \begin{matrix}c \\ ◯ \end{matrix} 2007 Laurence D. Finston

The states of the files used for creating this document as of January 31, 2007 are stored in the revisions of these files with the symbolic tag “LAST IWF” in the CVS repository for the LDF Metadata Exchange Utilities:

http://cvs.savannah.nongnu.org/viewcvs/iwf-mdh/?root=iwf-mdh

If necessary, changes and additions after this date can be determined by comparing these revisions with later ones using the GNU diffutils:

http://www.gnu.org/software/diffutils/diffutils.html

The author is Laurence D. Finston.

The LDF Metadata Exchange Utilities are free software; you can redistribute them and/or modify them 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 LDF Metadata Exchange Utilities are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the section ⟨ GNU General Public License 751 ⟩ for more details.

You should have received a copy of the GNU General Public License along with the LDF Metadata Exchange Utilities; 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 752 ⟩ for the copying conditions that apply to this document.

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

The LDF Metadata Exchange Utilities are available for downloading from the following FTP server:

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

2  COPYRIGHT AND LICENSES  LDF Metadata Exchange Utilities §2

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.]

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

⟨ nonwin.web 9 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Main header file when using The GNU Compiler Collection
⟨ stdafx.web 22 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Main header file when using Microsoft Visual Studio
⟨ querytyp.web 49 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . Query Type
⟨ qtgensql.web 124 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . Query Type ::generate sql string definition
⟨ dtsrctyp.web 159 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . Datasource Type
⟨ dttmtype.web 29 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date Time Type
⟨ idtype.web 188 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Id Type
⟨ scnrtype.web 213 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . Scanner Type
⟨ scanner.web 249 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . Type declarations and the yylex function
⟨ scantest.web 729 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . The tmain function when using Microsoft Visual Studio
⟨ dbcrscan.web 381 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . Dublin Core (XML) Scanner
⟨ dbcrprsr.w 363 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dublin Core (XML) Parser
⟨ parser.w 392 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The parser
⟨ main.web 734 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The main function when using The GNU Compiler Collection

§7  LDF Metadata Exchange Utilities  PARSER FILES 3

7. Parser files. [LDF 2006.11.16.] Log

[2006.11.16.] Added this section.

⟨ parser.w 392 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The main parser input file.
⟨ grpstmnt.w 431 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Group statements.
⟨ declrtns.w 434 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Declarations.
⟨ variabls.w 455 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Variables.
⟨ assign.w 479 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Assignment.
⟨ commands.w 598 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Commands.
⟨ dttmexp.w 658 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Datetime expressions.
⟨ queryexp.w 612 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Query expressions.
⟨ dtsrcexp.w 636 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Datasource expressions.

8. Alphabetical Order. [LDF 2006.09.27.]

⟨ assign.w 479 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Assignment.
⟨ commands.w 598 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Commands.
⟨ dbcrprsr.w 363 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dublin Core (XML) Parser
⟨ dbcrscan.web 381 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . Dublin Core (XML) Scanner
⟨ declrtns.w 434 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Declarations.
⟨ dtsrcexp.w 636 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Datasource expressions.
⟨ dtsrctyp.web 159 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . Datasource Type
⟨ dttmexp.w 658 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Datetime expressions.
⟨ dttmtype.web 29 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date Time Type
⟨ grpstmnt.w 431 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Group statements.
⟨ idtype.web 188 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Id Type
⟨ main.web 734 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The main function when using The GNU Compiler Collection
⟨ nonwin.web 9 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Main header file when using The GNU Compiler Collection
⟨ parser.w 392 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The parser
⟨ qtgensql.web 124 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . Query Type ::generate sql string definition
⟨ queryexp.w 612 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Query expressions.
⟨ querytyp.web 49 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . Query Type
⟨ scanner.web 249 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . Type declarations and the yylex function
⟨ scantest.web 729 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . The tmain function when using Microsoft Visual Studio
⟨ scnrtype.web 213 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . Scanner Type
⟨ stdafx.web 22 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Main header file when using Microsoft Visual Studio
⟨ variabls.w 455 ⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Variables.

4  ALPHABETICAL ORDER  LDF Metadata Exchange Utilities §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 .

[LDF 2007.02.13.] Now including pthread.h.

⟨ nonwin.web 9 ⟩ ≡

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

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

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

See also sections 24, 30, 50, 125, 160, 189, 214, 250, 364, 382, 393, 679, 730, and 735. This code is used in sections 20, 21, 28, 47, 122, 158, 186, 211, 247, 361, 379, 390, 676, 728, 733, and 750.

11. Type declarations. [LDF 2006.10.20.]

§12  LDF Metadata Exchange Utilities  MUTEX TYPE  5

12. Mutex Type. [LDF 2006.10.20.]

Log

[LDF 2006.10.20.] Added this type declaration.

⟨ Mutex Type declaration 12 ⟩ ≡

struct Mutex Type { pthread mutex t inner mutex ; Mutex Type(void) {

pthread mutex init (&inner mutex , 0); } ; ⟨ Declare Mutex Type functions 13 ⟩

};

This code is used in sections 20 and 21.

13. Lock. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this function.

⟨ Declare Mutex Type functions 13 ⟩ ≡

int lock (void);

See also section 15. This code is used in section 12.

14. ⟨ Define Mutex Type functions 14 ⟩ ≡

int Mutex Type ::lock (void)

{

return pthread mutex lock (&inner mutex ); }

See also section 16. This code is used in section 21.

15. Unlock. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this function.

⟨ Declare Mutex Type functions 13 ⟩ +≡ int unlock (void);

6  UNLOCK  LDF Metadata Exchange Utilities §16

16. ⟨ Define Mutex Type functions 14 ⟩ +≡

int Mutex Type ::unlock (void) {

return pthread mutex unlock (&inner mutex ); }

17. Forward declarations. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

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

See also sections 32, 52, 162, 191, 216, and 252. This code is used in sections 20, 47, 48, 122, 123, 186, 187, 211, 212, 247, 248, 361, and 362.

18. 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 18 ⟩ ≡ 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 25. This code is used in sections 20 and 28.

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

§20  LDF Metadata Exchange Utilities  PUTTING NON-WIN TOGETHER 7

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

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

8  PUTTING NON-WIN TOGETHER  LDF Metadata Exchange Utilities §21

21. This is what’s compiled. [LDF 2007.02.13.]

  ⟨ nonwin.web 9 ⟩

⟨ Include files 10 ⟩

using namespace std;

⟨ Mutex Type declaration 12 ⟩

⟨ Define Mutex Type functions 14 ⟩

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

Log

[LDF 2006.10.17.] Created this file.

⟨ stdafx.web 22 ⟩ ≡

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

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

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

See also sections 31, 51, 161, 190, 215, 251, and 680. This code is used in sections 28, 48, 123, 187, 212, 248, and 362.

24. 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

§24  LDF Metadata Exchange Utilities  INCLUDE FILES IN STDAFX.H 9

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

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

Log

[LDF 2006.10.19.] Added this section.

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

26. Putting stdafx.web together.

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

  ⟨ stdafx.web 22 ⟩

10  PUTTING STDAFX.WEB TOGETHER  LDF Metadata Exchange Utilities §28

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

⟨ Preprocessor macro calls 23 ⟩

⟨ Include files 10 ⟩

⟨ extern declarations for global variables 18 ⟩

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

Log

[LDF 2006.10.31.] Created this file.

⟨ dttmtype.web 29 ⟩ ≡

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

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

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

§32  LDF Metadata Exchange Utilities  PREPROCESSOR MACRO CALLS 11

31. Preprocessor macro calls. ⟨ Preprocessor macro calls 23 ⟩ +≡ #ifdef #pragma once #endif 32. Forward declarations. [LDF 2006.10.31.] ⟨ Forward declarations 17 ⟩ +≡

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);

};

33. 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 33 ⟩ ≡

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 36 ⟩ };

This code is used in sections 47 and 48.

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

Log

[2006.10.31.] Added this section.

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

12  CONSTRUCTORS AND SETTING FUNCTIONS  LDF Metadata Exchange Utilities §35

Log

[2006.10.31.] Added this section.

36. Default constructor. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this function.

⟨ Declare Date Time Type functions 36 ⟩ ≡

Date Time Type(void);

See also sections 38, 40, and 44. This code is used in section 33.

37. ⟨ Define Date Time Type functions 37 ⟩ ≡

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 39, 41, and 45. This code is used in section 47.

38. Destructor. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this function.

§39  LDF Metadata Exchange Utilities  DESTRUCTOR 13

⟨ Declare Date Time Type functions 36 ⟩ +≡ ∼Date Time Type(void); 39. ⟨ Define Date Time Type functions 37 ⟩ +≡

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. ∗/

40. Assignment. [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this function.

14  ASSIGNMENT  LDF Metadata Exchange Utilities §41

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

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 ) {

§41  LDF Metadata Exchange Utilities  ASSIGNMENT 15

∗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. ∗/

42. Output operator. [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this function.

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

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

This code is used in sections 47 and 48.

§43  LDF Metadata Exchange Utilities  OUTPUT OPERATOR 17

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

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 47.

18  SHOW  LDF Metadata Exchange Utilities §44

44. Show. [LDF 2006.12.15.] Log

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

§45  LDF Metadata Exchange Utilities  SHOW 19

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

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. ∗/

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

20  PUTTING DATE TIME TYPE TOGETHER  LDF Metadata Exchange Utilities §47

47. This is what’s compiled.

⟨ Include files 10 ⟩

⟨ dttmtype.web 29 ⟩

using namespace std; ⟨ Forward declarations 17 ⟩ ⟨ Declare class Date Time Type 33 ⟩ ⟨ Declare non-member functions for Date Time Type 42 ⟩ ⟨ Define Date Time Type functions 37 ⟩ ⟨ Define non-member functions for Date Time Type 43 ⟩

§48  LDF Metadata Exchange Utilities  PUTTING DATE TIME TYPE TOGETHER 21

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

⟨ Preprocessor macro calls 23 ⟩

using namespace std;

⟨ Forward declarations 17 ⟩

⟨ Declare class Date Time Type 33 ⟩

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

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

Log

[LDF 2006.10.31.] Created this file.

⟨ querytyp.web 49 ⟩ ≡

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

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

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

51. Preprocessor macro calls. ⟨ Preprocessor macro calls 23 ⟩ +≡ #ifdef #pragma once #endif

52. Forward declarations. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this section.

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

22  FORWARD DECLARATIONS  LDF Metadata Exchange Utilities §52

typedef Id Type ∗Id Node;

53. 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 53 ⟩ ≡ class Query Type; typedef Query Type ∗Query Node; class Query Type { ⟨ friend declarations for class

Query Type 55 ⟩

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 54. This code is used in sections 122 and 123.

§54  LDF Metadata Exchange Utilities  CLASS QUERY TYPE DECLARATION 23

54. ⟨ Declare class Query Type 53 ⟩ +≡

Scanner Node scanner node;

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

⟨ Declare static Query Type variables 78 ⟩

⟨ Declare Query Type functions 86 ⟩

} ;

55. 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 55 ⟩ ≡ 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 53.

24 DECLARE STATIC QUERY TYPE CONSTANTS AND VARIABLESLDF Metadata Exchange Utilities §57

56. Declare static Query Type constants and variables. [LDF 2006.10.31.] 57. 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 57 ⟩ ≡

static const unsigned short ;

See also sections 59, 62, 64, 65, 66, 73, 75, and 82. This code is used in section 54.

58. ⟨ Initialize static Query Type constants 58 ⟩ ≡

const unsigned short Query Type :: = 0;

See also sections 60, 67, 68, 70, 71, 72, 74, 76, and 83. This code is used in section 122.

59. 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 57 ⟩ +≡ static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ;

60. ⟨ Initialize static Query Type constants 58 ⟩ +≡

const unsigned short Query Type :: = 1;

const unsigned short Query Type :: = 2;

const unsigned short Query Type :: = 3;

§61 LDF Metadata Exchange UtilitiesDECLARE STATIC QUERY TYPE CONSTANTS AND VARIABLES 25

const unsigned short Query Type :: = 4; 61. 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).

62. Tables. [LDF 2006.12.13.] ⟨ Declare static Query Type constants 57 ⟩ +≡

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 ;

63. Columns. [LDF 2006.12.13.] 64. Authors. [LDF 2006.12.13.] ⟨ Declare static Query Type constants 57 ⟩ +≡

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

65. Contributors. [LDF 2006.12.14.] ⟨ Declare static Query Type constants 57 ⟩ +≡

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

66. Records. [LDF 2006.12.14.] ⟨ Declare static Query Type constants 57 ⟩ +≡

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 ;

67. Initialization. [LDF 2006.12.13.] ⟨ Initialize static Query Type constants 58 ⟩ +≡ 68. Tables. [LDF 2006.12.13.] ⟨ Initialize static Query Type constants 58 ⟩ +≡

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;

69. Columns. [LDF 2006.12.13.]

70. Authors. [LDF 2006.12.13.] ⟨ Initialize static Query Type constants 58 ⟩ +≡

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

71. Contributors. [LDF 2006.12.13.] ⟨ Initialize static Query Type constants 58 ⟩ +≡

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

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;

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

Log

[2006.10.31.] Added this section.

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

74. ⟨ Initialize static Query Type constants 58 ⟩ +≡

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

75. 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 57 ⟩ +≡ static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; 76. ⟨ Initialize static Query Type constants 58 ⟩ +≡

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

77. Flags. [LDF 2006.12.13.]

Log

[2006.12.13.] Added this section.

⟨ Preprocessor macro definitions 77 ⟩ ≡ #define 96

See also section 365. This code is used in sections 122, 123, and 379.

78. ⟨ Declare static Query Type variables 78 ⟩ ≡

static bitset <  >  ;

See also section 79. This code is used in section 54.

30  FLAGS  LDF Metadata Exchange Utilities §79

79. Tables. [LDF 2006.12.13.] ⟨ Declare static Query Type variables 78 ⟩ +≡

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 <  >  ;

§80  LDF Metadata Exchange Utilities  FLAGS 31

80. ⟨ Initialize static Query Type variables 80 ⟩ ≡

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 81. This code is used in section 122.

32  INITIALIZE STATIC QUERY TYPE VARIABLES  LDF Metadata Exchange Utilities §81

81. 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 80 ⟩ +≡ 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;

82. 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 57 ⟩ +≡ static const unsigned short ; static const unsigned short ; static const unsigned short ;

83. ⟨ Initialize static Query Type constants 58 ⟩ +≡

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

84. Query Type functions. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

§86  LDF Metadata Exchange Utilities  DEFAULT CONSTRUCTOR 33

85. Constructor and setting functions. [LDF 2006.10.31.] 86. Default constructor. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this function.

⟨ Declare Query Type functions 86 ⟩ ≡

Query Type(void);

See also sections 88, 90, 95, 99, 101, 105, 110, 114, and 115. This code is used in section 54.

87. ⟨ Define Query Type functions 87 ⟩ ≡

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 89, 91, 92, 93, 94, 96, 97, 98, 100, 102, 103, 104, 106, 107, 108, 111, 112, 113, 116, 117, 118, 119, 120, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, and 156.

This code is used in sections 122 and 158.

88. 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 86 ⟩ +≡

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);

34  SET  LDF Metadata Exchange Utilities §89

89. ⟨ Define Query Type functions 87 ⟩ +≡

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. ∗/

90. 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 86 ⟩ +≡ ∼Query Type(void);

91. ⟨ Define Query Type functions 87 ⟩ +≡

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 92. 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 87 ⟩ +≡ 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);

36  DESTRUCTOR  LDF Metadata Exchange Utilities §93

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

temp strm ≪ ␣ ␣ ≪ endl ; cerr mutex .lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .unlock ( ); temp strm.str ( );

#endif

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

scanner node = 0;

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

95. Assignment. [LDF 2006.11.15.]

Log

[2006.11.15.] Added this function.

⟨ Declare Query Type functions 86 ⟩ +≡ Query Node operator=(const Query Type &q); 96. ⟨ Define Query Type functions 87 ⟩ +≡

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 ; } 97.

Log

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

⟨ Define Query Type functions 87 ⟩ +≡ 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

40  ASSIGNMENT  LDF Metadata Exchange Utilities §98

98. ⟨ Define Query Type functions 87 ⟩ +≡

match value = q.match value;

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

99. 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).

§100  LDF Metadata Exchange Utilities  INITIALIZE TYPE MAPS 41

⟨ Declare Query Type functions 86 ⟩ +≡ static int initialize type maps (void); 100. ⟨ Define Query Type functions 87 ⟩ +≡

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[  ] =  ;

42  INITIALIZE TYPE MAPS  LDF Metadata Exchange Utilities §100
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. ∗/

101. Initialize flags. [LDF 2006.12.13.]

Log

[2006.12.13.] Added this function.

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

102. ⟨ Define Query Type functions 87 ⟩ +≡

§103  LDF Metadata Exchange Utilities  INITIALIZE FLAGS 43

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

= 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^{++};

44  INITIALIZE FLAGS  LDF Metadata Exchange Utilities §103

= 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^{++}; 104. Error handling. too small. [LDF 2006.12.13.] ⟨ Define Query Type functions 87 ⟩ +≡

if (shift value > ) {

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

␣ ␣ ␣ ␣ ≪ endl ≪

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

getchar ( ); return 1;

} /∗ if (shift value > ) ∗/

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

105. 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 .

46  SET FIELD SPECIFIER  LDF Metadata Exchange Utilities §106

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

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 =  ;

§107  LDF Metadata Exchange Utilities  SET FIELD SPECIFIER 47

107. table ≡ .

Log

[2006.12.14.] Added this section.

⟨ Define Query Type functions 87 ⟩ +≡

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 ≡  ) ∗/

108. ⟨ Define Query Type functions 87 ⟩ +≡

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. ∗/

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

Log

[LDF 2006.11.21.] Added this section.

110. Generate TEX string. [LDF 2006.11.21.]

Log

[2006.11.21.] Added this function.

§111  LDF Metadata Exchange Utilities  GENERATE TEX STRING 49

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

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

50  GENERATE TEX STRING  LDF Metadata Exchange Utilities §112

112. ⟨ Define Query Type functions 87 ⟩ +≡

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);

}

113. Return string. [LDF 2006.11.21.] ⟨ Define Query Type functions 87 ⟩ +≡ #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 ( );

52  GENERATE SQL STRING  LDF Metadata Exchange Utilities §114

#endif return tex strm str ( ); } /∗ Query Type ::generate tex string ∗/ 114. 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 86 ⟩ +≡

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 );

115. 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 86 ⟩ +≡ int show (string s = , Scanner Node sscanner node = 0);

116. ⟨ Define Query Type functions 87 ⟩ +≡

int Query Type ::show (string s, Scanner Node sscanner node){ stringstream temp strm; if (scanner node ≡ 0 ∧ sscanner node ≠ 0) scanner node = sscanner node; 117. 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 87 ⟩ +≡

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 ≡ )

54  SHOW  LDF Metadata Exchange Utilities §117

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 ; }

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

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; 119. Show subsidiary nodes recursively. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this section.

⟨ Define Query Type functions 87 ⟩ +≡

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 ( );

120. ⟨ Define Query Type functions 87 ⟩ +≡

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

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

§122  LDF Metadata Exchange Utilities  PUTTING QUERY TYPE TOGETHER 57

122. This is what’s compiled.

⟨ Include files 10 ⟩

⟨ querytyp.web 49 ⟩

using namespace std; using namespace Scan Parse; ⟨ Preprocessor macro definitions 77 ⟩ ⟨ Forward declarations 17 ⟩ ⟨ Declare class Query Type 53 ⟩ ⟨ Initialize static Query Type constants 58 ⟩ ⟨ Initialize static Query Type variables 80 ⟩ ⟨ Define Query Type functions 87 ⟩

58  PUTTING QUERY TYPE TOGETHER  LDF Metadata Exchange Utilities §123

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

⟨ Preprocessor macro definitions 77 ⟩

⟨ Preprocessor macro calls 23 ⟩

using namespace std;

⟨ Forward declarations 17 ⟩

⟨ Declare class Query Type 53 ⟩

#endif  /∗  is defined. ∗/

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

Log

[LDF 2006.12.14.] Created this file.

⟨ qtgensql.web 124 ⟩ ≡

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

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

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

126. 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).

§127  LDF Metadata Exchange Utilities  GENERATE SQL STRING 59

127. ⟨ Define Query Type functions 87 ⟩ +≡

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

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

Log

[2006.12.12.] Added this declaration.

⟨ Define Query Type functions 87 ⟩ +≡ 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 ( );

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

string query type str ;

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

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 += ␣ ;

131. ⟨ Define Query Type functions 87 ⟩ +≡

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

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

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 ≡  ) ∗/

133. . Pica Only. [LDF 2006.12.13.] ⟨ Define Query Type functions 87 ⟩ +≡

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. . Pica Only. [LDF 2006.12.13.] ⟨ Define Query Type functions 87 ⟩ +≡

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 ≡  ) ∗/

135. . Pica Only. [LDF 2006.12.14.] ⟨ Define Query Type functions 87 ⟩ +≡

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 ≡  ) ∗/

136. . Pica Only. [LDF 2006.12.14.] ⟨ Define Query Type functions 87 ⟩ +≡

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 ≡  ) ∗/

137. . Pica Only. [LDF 2006.12.14.] ⟨ Define Query Type functions 87 ⟩ +≡

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 ≡  ) ∗/

138. OAI. [LDF 2006.12.06.] ⟨ Define Query Type functions 87 ⟩ +≡

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 ≡ ) ∗/

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

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 ≡ ) { 140. OAI. [LDF 2006.12.12.]

Log

[2006.12.11.] Added this section.

⟨ Define Query Type functions 87 ⟩ +≡

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 ≡  ) ∗/

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

Log

[LDF 2006.12.12.] Added this section.

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

Log

[LDF 2006.12.12.] Added this section.

⟨ Define Query Type functions 87 ⟩ +≡

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 ≡  ) ∗/

143. Record. [LDF 2006.12.14.] 144. Record ID. [LDF 2006.12.14.]

Log

[2006.12.14.] Added this section.

⟨ Define Query Type functions 87 ⟩ +≡

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 ≡  ) ∗/

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

Log

[2006.12.14.] Added this section.

⟨ Define Query Type functions 87 ⟩ +≡

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 ≡  ) ∗/

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

Log

[2006.12.14.] Added this section.

⟨ Define Query Type functions 87 ⟩ +≡

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 ≡  ) ∗/

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

Log

[LDF 2006.12.15.] Added this section.

⟨ Define Query Type functions 87 ⟩ +≡

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 ≡  ) ∗/

148. Record Identification Number. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this section.

⟨ Define Query Type functions 87 ⟩ +≡

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 ≡  ) ∗/

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

Log

[LDF 2006.12.19.] Added this section.

⟨ Define Query Type functions 87 ⟩ +≡

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 ≡  ) ∗/

150. Subject. [LDF Undated.] ⟨ Define Query Type functions 87 ⟩ +≡

else if (field type ≡ ) {

151.

Log

[2006.12.12.] Added this section.

⟨ Define Query Type functions 87 ⟩ +≡

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 ≡  ) ∗/

152. ⟨ Define Query Type functions 87 ⟩ +≡

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 ); }

153. ⟨ Define Query Type functions 87 ⟩ +≡

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

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

if (query ctr ≡ 0) {

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

where strm 1 str ( ); }

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

if (query ctr ≡ 0) temp strm ≪ endl ≪ ␣ ␣ ≪ endl ≪ sql strm str ( ) ≪ endl ≪ ␣ ␣ ␣ ␣ ; 156. Store string and return. [LDF 2006.12.01.] ⟨ Define Query Type functions 87 ⟩ +≡ #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 ∗/

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

§158 LDF Metadata Exchange UtilitiesPUTTING QUERY TYPE::GENERATE SQL STRING TOGETHER 81

158. This is what’s compiled.

⟨ Include files 10 ⟩

  ⟨ qtgensql.web 124 ⟩

using namespace std;

using namespace Scan Parse;

⟨ Define Query Type functions 87 ⟩

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

Log

[LDF 2006.12.08.] Created this file.

⟨ dtsrctyp.web 159 ⟩ ≡

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

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

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

161. Preprocessor macro calls. ⟨ Preprocessor macro calls 23 ⟩ +≡ #ifdef #pragma once #endif

162. Forward declarations. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this section.

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

82 CLASS DATASOURCE TYPE DECLARATION LDF Metadata Exchange Utilities §163

163. 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 163 ⟩ ≡ class Datasource Type; typedef Datasource Type ∗Datasource Node; class Datasource Type {

⟨ friend declarations for class Datasource Type 164 ⟩ 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 165 ⟩

⟨ Declare Datasource Type functions 171 ⟩ };

This code is used in sections 186 and 187.

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

Log

[LDF 2006.12.08.] Added this section.

⟨ friend declarations for class Datasource Type 164 ⟩ ≡

friend int yyparse(void ∗);

This code is used in section 163.

165. 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 165 ⟩ ≡ static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ; static const unsigned short ;

See also section 168. This code is used in section 163.

§166  LDF Metadata Exchange Utilities  DECLARE STATIC DATASOURCE TYPE CONSTANTS 83

166. ⟨ Initialize static Datasource Type constants 166 ⟩ ≡

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 186.

167. 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 167 ⟩ ≡

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

This code is used in section 186.

168. 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 165 ⟩ +≡

169. datasource type functions. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this section.

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

171. Default constructor. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this function.

⟨ Declare Datasource Type functions 171 ⟩ ≡

Datasource Type(void);

See also sections 173, 175, 179, 181, and 183. This code is used in section 163.

84  DEFAULT CONSTRUCTOR  LDF Metadata Exchange Utilities §172

172. ⟨ Define Datasource Type functions 172 ⟩ ≡

Datasource Type ::Datasource Type(void)

{ cerr ≪ ␣ ≪ endl ; return;

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

See also sections 174, 176, 177, 178, 180, 182, and 184. This code is used in section 186.

173. Set. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this function.

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

174. ⟨ Define Datasource Type functions 172 ⟩ +≡

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

{

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

175. Destructor. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this function.

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

176. ⟨ Define Datasource Type functions 172 ⟩ +≡

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 177. ⟨ Define Datasource Type functions 172 ⟩ +≡ #ifdef

temp strm ≪ ␣ ␣ ≪ endl ; cerr mutex .lock ( ); cerr ≪ temp strm.str ( ); cerr mutex .unlock ( ); temp strm.str ( );

#endif

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

scanner node = 0;

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

179. Assignment. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this function.

⟨ Declare Datasource Type functions 171 ⟩ +≡ Datasource Node operator=(const Datasource Type &d); 180. ⟨ Define Datasource Type functions 172 ⟩ +≡

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. ∗/

181. 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 171 ⟩ +≡

static int initialize type maps (void);

182. ⟨ Define Datasource Type functions 172 ⟩ +≡

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. ∗/

183. Show. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this function.

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

184. ⟨ Define Datasource Type functions 172 ⟩ +≡

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. ∗/

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

186. This is what’s compiled.

⟨ Include files 10 ⟩

⟨ dtsrctyp.web 159 ⟩

using namespace std; using namespace Scan Parse; ⟨ Forward declarations 17 ⟩ ⟨ Declare class Datasource Type 163 ⟩ ⟨ Initialize static Datasource Type constants 166 ⟩ ⟨ Initialize static Datasource Type variables 167 ⟩ ⟨ Define Datasource Type functions 172 ⟩

88  PUTTING DATASOURCE TYPE TOGETHER  LDF Metadata Exchange Utilities §187

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

⟨ Preprocessor macro calls 23 ⟩

using namespace std;

⟨ Forward declarations 17 ⟩

⟨ Declare class Datasource Type 163 ⟩

#endif  /∗  is defined. ∗/

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

Log

[LDF 2006.11.01.] Created this file.

⟨ idtype.web 188 ⟩ ≡

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

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

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

190. Preprocessor macro calls. ⟨ Preprocessor macro calls 23 ⟩ +≡ #ifdef #pragma once #endif 191. Forward declarations. [LDF 2006.10.31.] ⟨ Forward declarations 17 ⟩ +≡

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

192. 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 192 ⟩ ≡

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 199 ⟩ ⟨ Declare static Id Type constants 193 ⟩

};

This code is used in sections 211 and 212.

193. 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 193 ⟩ ≡ static const unsigned short ; static const unsigned short ; static const unsigned short ;

This code is used in section 192.

90 STATIC ID TYPE CONSTANTS LDF Metadata Exchange Utilities §194

194.

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 194 ⟩ ≡ const unsigned short Id Type :: = 1; const unsigned short Id Type :: = 2; const unsigned short Id Type :: = 3;

This code is used in section 211.

195. 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 195 ⟩ ≡

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

This code is used in section 211.

196. id type functions. [LDF 2006.11.01.]

Log

[LDF 2006.11.01.] Added this section.

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

Log

[LDF 2006.11.01.] Added this section.

198. Default constructor. [LDF 2006.11.01.]

Log

[2006.10.31.] Added this function.

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

199. ⟨ Declare Id Type functions 199 ⟩ ≡

Id Type(void);

See also sections 202, 205, and 208. This code is used in section 192.

200. ⟨ Define Id Type functions 200 ⟩ ≡

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 203, 206, and 209. This code is used in section 211.

201. Destructor. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this function.

202. ⟨ Declare Id Type functions 199 ⟩ +≡

∼Id Type(void); 203. ⟨ Define Id Type functions 200 ⟩ +≡

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. ∗/

204. Initialize subtype map. [LDF 2006.12.01.]

Log

[LDF 2006.12.01.] Added this function.

205. ⟨ Declare Id Type functions 199 ⟩ +≡

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

§206  LDF Metadata Exchange Utilities  INITIALIZE SUBTYPE MAP 93

206. ⟨ Define Id Type functions 200 ⟩ +≡

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. ∗/

207. Show. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this function.

208. ⟨ Declare Id Type functions 199 ⟩ +≡

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

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. ∗/

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

211. This is what’s compiled.

⟨ Include files 10 ⟩

⟨ idtype.web 188 ⟩

using namespace std; ⟨ Forward declarations 17 ⟩ ⟨ Declare struct Id Type 192 ⟩ ⟨ Initialize static Id Type constants 194 ⟩ ⟨ Declare static Id Type variables 195 ⟩ ⟨ Define Id Type functions 200 ⟩

§212  LDF Metadata Exchange Utilities  PUTTING ID TYPE TOGETHER 95

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

⟨ Preprocessor macro calls 23 ⟩

using namespace std;

⟨ Forward declarations 17 ⟩

⟨ Declare struct Id Type 192 ⟩

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

Log

[LDF 2006.10.31.] Created this file.

⟨ scnrtype.web 213 ⟩ ≡

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

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

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

215. Preprocessor macro calls. ⟨ Preprocessor macro calls 23 ⟩ +≡ #ifdef #pragma once #endif

216. Forward declarations. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this section.

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

typedef Id Type ∗Id Node;

217. 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 217 ⟩ ≡

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

};

This code is used in sections 247 and 248.

218. Token Type functions. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this section.

219. Default Constructor. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this function.

⟨ Declare Token Type functions 219 ⟩ ≡

Token Type(void);

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

220. ⟨ Define Token Type functions 220 ⟩ ≡

Token Type ::Token Type(void)

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

}

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

§221  LDF Metadata Exchange Utilities  NON-DEFAULT CONSTRUCTOR 97

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

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

Token Type(unsigned int ttype, vvalue);

98  NON-DEFAULT CONSTRUCTOR  LDF Metadata Exchange Utilities §222

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

{

return; }

223. 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 223 ⟩ ≡ class Scanner Type { ⟨ friend declarations for Scanner Type 224 ⟩ 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 230 ⟩ } ;

This code is used in sections 247 and 248.

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

Log

[2006.10.31.] Added this section.

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

See also section 226. This code is used in section 223.

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

§226 LDF Metadata Exchange UtilitiesFRIEND DECLARATIONS FOR FUNCTIONS FOR GROUP STATEMENTS 99

226. 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 224 ⟩ +≡ 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);

227. Scanner Type functions. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

228. Constructors and setting functions. [LDF 2006.10.31.] 229. 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.

230. ⟨ Declare Scanner Type functions 230 ⟩ ≡

Scanner Type(void);

See also sections 232, 234, and 236. This code is used in section 223.

231. ⟨ Define Scanner Type functions 231 ⟩ ≡

Scanner Type ::Scanner Type(void)

{

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

See also sections 233, 235, 237, 238, 239, 240, 241, 242, 243, 244, and 245. This code is used in section 247.

232. Destructor. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this function.

⟨ Declare Scanner Type functions 230 ⟩ +≡ ∼Scanner Type(void); 233. ⟨ Define Scanner Type functions 231 ⟩ +≡

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. ∗/

234. 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 230 ⟩ +≡ int initialize id map(void);

102  INITIALIZE ID MAP  LDF Metadata Exchange Utilities §235

235. ⟨ Define Scanner Type functions 231 ⟩ +≡

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. ∗/

236. Lookup. [LDF 2006.11.03.]

Log

[LDF 2006.11.03.] Added this function.

§237  LDF Metadata Exchange Utilities  LOOKUP 103

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

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 ;

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

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) ∗/

239. ⟨ Define Scanner Type functions 231 ⟩ +≡

104  LOOKUP  LDF Metadata Exchange Utilities §240

} /∗ else (iter ≠ id map.end ( )) ∗/ 240. name doesn’t refer to an array. [LDF 2006.11.03.] ⟨ Define Scanner Type functions 231 ⟩ +≡

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) ∗/

241. name refers to an array. [LDF 2006.11.03.] ⟨ Define Scanner Type functions 231 ⟩ +≡

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 242. No elements on array. [LDF 2006.11.03.] ⟨ Define Scanner Type functions 231 ⟩ +≡

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

243. create ≡ false. Return 0. [LDF 2006.11.03.] ⟨ Define Scanner Type functions 231 ⟩ +≡

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) ∗/

244. create ≡ true. Create array element. [LDF 2006.11.03.] ⟨ Define Scanner Type functions 231 ⟩ +≡

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) ∗/ 245. Array isn’t empty. Traverse the tree. [LDF 2006.11.03.] ⟨ Define Scanner Type functions 231 ⟩ +≡

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. ∗/

246. Putting Scanner Type together. [LDF 2006.10.31.]

247. This is what’s compiled.

⟨ Include files 10 ⟩

⟨ scnrtype.web 213 ⟩

using namespace std; ⟨ Forward declarations 17 ⟩ ⟨ Declare struct Token Type 217 ⟩ ⟨ Declare class Scanner Type 223 ⟩ ⟨ Define Token Type functions 220 ⟩ ⟨ Define Scanner Type functions 231 ⟩

110  PUTTING SCANNER TYPE TOGETHER  LDF Metadata Exchange Utilities §248

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

⟨ Preprocessor macro calls 23 ⟩

using namespace std; #include

using namespace Scan Parse;

⟨ Forward declarations 17 ⟩

⟨ Declare struct Token Type 217 ⟩

⟨ Declare class Scanner Type 223 ⟩

#endif  /∗  is defined. ∗/

249. Scanning (scanner.web). [LDF 2006.10.17.]

Log

[LDF 2006.10.17.] Created this file.

⟨ scanner.web 249 ⟩ ≡

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

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

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

251. Preprocessor macro calls. ⟨ Preprocessor macro calls 23 ⟩ +≡ #ifdef #pragma once #endif

252. Forward declarations. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this section.

⟨ Forward declarations 17 ⟩ +≡ class Scanner Type;

§252  LDF Metadata Exchange Utilities  FORWARD DECLARATIONS 111

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;

253. Type declarations for the scanner. [LDF 2006.10.17.]

254. Declare namespace Scan Parse. [LDF 2006.10.17.]

255. 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 255 ⟩ ≡

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 261 ⟩ ⟨ Declare keyword map 263 ⟩ ⟨ Declare token map 266 ⟩ ⟨ Declare Scan Parse functions 268 ⟩

} /∗ End of namespace Scan Parse declaration. ∗/

This code is used in section 361.

256. extern declaration of namespace Scan Parse. [LDF 2006.10.19.] ⟨ extern declaration of namespace Scan Parse 256 ⟩ ≡

namespace Scan Parse {

See also sections 258 and 259. This code is used in section 362.

257. Constants. [LDF 2006.10.19.]

112 EXTERN DECLARATION OF NAMESPACE SCAN PARSE LDF Metadata Exchange Utilities §258

258. Scanner state (“start conditions”). [LDF 2006.10.19.] ⟨ extern declaration of namespace Scan Parse 256 ⟩ +≡

extern const unsigned int ; extern const unsigned int ; extern const unsigned int ; extern const unsigned int ; extern const unsigned int ;

259. ⟨ extern declaration of namespace Scan Parse 256 ⟩ +≡

struct Keyword Type; ⟨ extern keyword map declaration 264 ⟩ ⟨ extern token map declaration 267 ⟩ ⟨ Declare Scan Parse functions 268 ⟩ } /∗ End of extern declaration of namespace Scan Parse. ∗/

260. Keywords. [LDF 2006.10.19.]

261. 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 261 ⟩ ≡

struct Keyword Type { string name; int value; string value name;

};

This code is used in section 255.

262. Keyword map. [LDF 2006.10.19.]

Log

[LDF 2006.10.19.] Added this section.

263. Declare keyword map. [LDF 2006.10.19.] ⟨ Declare keyword map 263 ⟩ ≡

map⟨string, Keyword Type ∗⟩ keyword map;

This code is used in section 255.

§264  LDF Metadata Exchange Utilities  DECLARE KEYWORD MAP 113

264. extern declaration of keyword map for the header file. [LDF 2006.10.19.] ⟨ extern keyword map declaration 264 ⟩ ≡

extern map⟨string, Keyword Type ∗⟩ keyword map;

This code is used in section 259.

265. Token map. [LDF 2006.11.01.]

Log

[LDF 2006.11.01.] Added this section.

266. Declare token map. [LDF 2006.11.01.] ⟨ Declare token map 266 ⟩ ≡

map⟨unsigned int, string⟩ token map;

This code is used in section 255.

267. extern declaration of token map for the header file. [LDF 2006.11.01.] ⟨ extern token map declaration 267 ⟩ ≡

extern map⟨unsigned int, string⟩ token map;

This code is used in section 259.

268. 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 268 ⟩ ≡

int initialize maps (void);

See also sections 291, 295, 296, 298, 299, 300, 301, 303, and 304. This code is used in sections 255 and 259.

269. ⟨ Define Scan Parse functions 269 ⟩ ≡

int Scan Parse ::initialize maps (void){ Keyword Type ∗curr keyword ;

This code is used in section 361.

See also sections 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 283, 284, 285, 286, 287, 288, 289, and 292.

114  INITIALIZE KEYWORD MAP AND TOKEN MAP  LDF Metadata Exchange Utilities §270

270. Punctuation. [LDF 2006.10.19.] ⟨ Define Scan Parse functions 269 ⟩ +≡

§270  LDF Metadata Exchange Utilities  INITIALIZE KEYWORD MAP AND TOKEN MAP 115

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; 271. 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 269 ⟩ +≡ 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;

272. Arithmetical Operations. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this section with code for  ,  ,  , and  .

⟨ Define Scan Parse functions 269 ⟩ +≡ 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; 273. Types with values. [LDF 2006.10.19.] ⟨ Define Scan Parse functions 269 ⟩ +≡

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. Control. [LDF 2006.10.19.] ⟨ Define Scan Parse functions 269 ⟩ +≡

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; 275. Queries. [LDF 2006.10.19.]

Log

[2006.11.16.] Added code for .

⟨ Define Scan Parse functions 269 ⟩ +≡ 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. 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 269 ⟩ +≡ 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. Datasources. [LDF 2006.12.08.]

Log

[2006.11.16.] Added this section with code for .

⟨ Define Scan Parse functions 269 ⟩ +≡ 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. Datetime. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this section with code for .

⟨ Define Scan Parse functions 269 ⟩ +≡ 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; 279. 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 269 ⟩ +≡ 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; 280. Predicates and Control Structures. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this section with code for ,  ,  , ,  , ,  ,  , ,  ,  ,
,  , and  .

⟨ Define Scan Parse functions 269 ⟩ +≡ 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; 281. 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 269 ⟩ +≡ 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;

282. Keywords for database table columns. [LDF 2006.12.14.]

Log

[2006.12.14.] Added this section.

283. Generic. [LDF 2006.12.14.]

Log

[2006.12.14.] Added this section.

⟨ Define Scan Parse functions 269 ⟩ +≡ 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. Names. [2006.12.07.]

Log

[2006.12.07.] Added this section with code for  ,  , and  .

⟨ Define Scan Parse functions 269 ⟩ +≡ 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. Records. [2006.12.07.]

Log

[2006.12.14.] Added this section.

⟨ Define Scan Parse functions 269 ⟩ +≡ 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;

286. Variables. [LDF Undated.] ⟨ Define Scan Parse functions 269 ⟩ +≡

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; 287.

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 269 ⟩ +≡ 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; 288. 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 269 ⟩ +≡ 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;

289. Control. [LDF 2006.10.19.] ⟨ Define Scan Parse functions 269 ⟩ +≡

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. ∗/

290. Show keyword map. [LDF 2006.10.19.]

291. ⟨ Declare Scan Parse functions 268 ⟩ +≡

int show keyword map(Scanner Type ∗scanner node);

136  SHOW KEYWORD MAP  LDF Metadata Exchange Utilities §292

292. ⟨ Define Scan Parse functions 269 ⟩ +≡

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. ∗/

293. 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.

294. Functions for variables. [LDF 2006.11.02.]

§295  LDF Metadata Exchange Utilities  VARIABLE FUNC  137

295. variable func. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this declaration.

⟨ Declare Scan Parse functions 268 ⟩ +≡ void ∗variable func(void ∗v, char ∗name);

296. 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 268 ⟩ +≡ Id Node declare variable func(void ∗v, const unsigned short type, char ∗name);

297. Functions for assignments. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this section.

298. query assignment func 0. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this declaration.

⟨ Declare Scan Parse functions 268 ⟩ +≡

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);

299. query assignment func 1. [LDF 2006.12.19.]

Log

[LDF 2006.12.19.] Added this declaration.

⟨ Declare Scan Parse functions 268 ⟩ +≡

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);

138 DATETIME ASSIGNMENT FUNC 0  LDF Metadata Exchange Utilities  §300

300. datetime assignment func 0. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this declaration.

⟨ Declare Scan Parse functions 268 ⟩ +≡

int datetime assignment func 0 (void ∗v, Date Time Node &curr date time node, int specifier , int op, void ∗val , int type);

301. datetime assignment func 1. [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this declaration.

⟨ Declare Scan Parse functions 268 ⟩ +≡ int datetime assignment func 1 (void ∗v, Date Time Node &d, int op, void ∗&vec);

302. Functions for Group Statements. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

303. 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 268 ⟩ +≡ int start local database query func(void ∗);

§304  LDF Metadata Exchange Utilities  END QUERY FUNCTION 139

304. 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 268 ⟩ +≡ int end query func(void ∗);

305. The scanning function yylex. [LDF 2006.10.17.]

Log

[LDF 2006.11.13.] Added code for handling .

⟨ Declare yylex 305 ⟩ ≡

int yylex ( ∗ value, void ∗parameter );

See also section 394. This code is used in sections 362 and 676.

306. ⟨ Define yylex 306 ⟩ ≡

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 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,

331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, and 354. This code is used in section 361.

140  THE SCANNING FUNCTION YYLEX  LDF Metadata Exchange Utilities §307

307. “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 306 ⟩ +≡

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 }

§308  LDF Metadata Exchange Utilities  THE SCANNING FUNCTION YYLEX 141

308. Open input file. [LDF 2006.10.17.] ⟨ Define yylex 306 ⟩ +≡ #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 309. 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 306 ⟩ +≡ 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

310. 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 306 ⟩ +≡

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 ( );

§310  LDF Metadata Exchange Utilities  COMMENTS 143

#endif } /∗ if (curr char ≡ ) (Discarding comment) ∗/

311. Double-quote symbol. . [LDF 2006.10.17.] ⟨ Define yylex 306 ⟩ +≡

else if (curr char ≡ ) {

312. state ≡ [LDF 2006.10.17.] ⟨ Define yylex 306 ⟩ +≡

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 ≡  ) ∗/

144  DOUBLE-QUOTE SYMBOL  LDF Metadata Exchange Utilities §313

313. state ≡ . Start collecting string. [LDF 2006.10.18.] ⟨ Define yylex 306 ⟩ +≡

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

314. Look up curr id in keyword map and possibly id map. [LDF 2006.10.19.] ⟨ Define yylex 306 ⟩ +≡

⟨ Look up curr id in keyword map and possibly id map 357 ⟩

}  /∗ else if (state ≡  ) ∗/

315. state ≡ . [LDF 2006.11.02.] ⟨ Define yylex 306 ⟩ +≡

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 ≡  ) ∗/

§316  LDF Metadata Exchange Utilities  DOUBLE-QUOTE SYMBOL 145

316. state ≡ . [LDF 2006.11.02.] ⟨ Define yylex 306 ⟩ +≡

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. Any other state (shouldn’t occur.) [LDF 2006.11.02.] ⟨ Define yylex 306 ⟩ +≡

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 ≡ ) ∗/

318. 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 306 ⟩ +≡

146 ALPHABETICAL CHARACTERS AND UNDERLINE CHARACTER LDF Metadata Exchange Utilities §319

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 ≡ ) { 319. state ≡ . [LDF 2006.10.18.] ⟨ Define yylex 306 ⟩ +≡

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 ≡  ) ∗/

§320 LDF Metadata Exchange Utilities ALPHABETICAL CHARACTERS AND UNDERLINE CHARACTER 147

320. state ≡ . [LDF 2006.10.18.] ⟨ Define yylex 306 ⟩ +≡

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 ≡  ) ∗/

321. state ≡ . [LDF 2006.10.18.] ⟨ Define yylex 306 ⟩ +≡

else

if (state ≡ ) {

curr string += curr char ; } /∗ if (state ≡ ) ∗/

} /∗ else if (isalpha(curr char ) ∨ curr char ≡ ) ∗/

322. Digits. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this section.

⟨ Define yylex 306 ⟩ +≡ 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 ≡  ) ∗/

323. state ≡ . [LDF 2006.10.18.] ⟨ Define yylex 306 ⟩ +≡

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

§324  LDF Metadata Exchange Utilities  DIGITS 149

324. Look up curr id in keyword map and possibly id map. [LDF 2006.10.19.] ⟨ Define yylex 306 ⟩ +≡

⟨ Look up curr id in keyword map and possibly id map 357 ⟩ } /∗ 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 )) ∗/

325. Escaped characters. '\. [LDF 2006.10.18.] ⟨ Define yylex 306 ⟩ +≡

else if (curr char ≡ ) {

326. state ≡ . [LDF 2006.10.18.] ⟨ Define yylex 306 ⟩ +≡

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

150  ESCAPED CHARACTERS  LDF Metadata Exchange Utilities §327

327. Look up curr id in keyword map and possibly id map. [LDF 2006.10.19.] ⟨ Define yylex 306 ⟩ +≡

⟨ Look up curr id in keyword map and possibly id map 357 ⟩ } /∗ 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 ≡  ) ∗/

328. state ≡ . [LDF 2006.10.18.] ⟨ Define yylex 306 ⟩ +≡

if (state ≡ ) { curr char = scanner node in strm.get ( ); curr string += curr char ; continue;

}  /∗ if (state ≡  ) ∗/

329. ⟨ Define yylex 306 ⟩ +≡

}  /∗ else if (curr char ≡  ) ∗/

§331  LDF Metadata Exchange Utilities  PUNCTUATION 151

330. Punctuation. [LDF 2006.10.31.] 331. (Equals sign). [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

⟨ Define yylex 306 ⟩ +≡ 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 ( );

152  PUNCTUATION  LDF Metadata Exchange Utilities §332

#endif 332. Look up curr id in keyword map and possibly id map. [LDF 2006.10.19.] ⟨ Define yylex 306 ⟩ +≡

⟨ Look up curr id in keyword map and possibly id map 357 ⟩ } /∗ 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 ≡ ) ∗/ 333. (Plus sign). [LDF 2006.11.13.]

Log

[LDF 2006.11.13.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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 ≡ ) ∗/ 334. (Ampersand). [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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 ≡ ) ∗/ 335. (Vertical line). [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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 ≡ ) ∗/ 336. (Circumflex accent). [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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 ≡ ) ∗/ 337. (Exclamation mark). [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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 ≡ ) ∗/

338. (Colon). [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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. (Semi-colon). [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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 ≡ ) ∗/

340. (Comma). [LDF 2006.12.06.]

Log

[LDF 2006.12.06.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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 ≡ ) ∗/ 341. (Percent). [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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. (Hyphen). [LDF 2006.12.07.]

Log

[LDF 2006.12.07.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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. (Period). [LDF 2006.11.02.]

Please note: ⟨ Common code for punctuation 355 ⟩ 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 306 ⟩ +≡ 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 344. Look up curr id in keyword map and possibly id map. [LDF 2006.10.19.] ⟨ Define yylex 306 ⟩ +≡

⟨ Look up curr id in keyword map and possibly id map 357 ⟩ } /∗ 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 ≡ ) ∗/ 345. (At-symbol). [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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. (Open parenthesis). [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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 ≡ ) ∗/ 347. (Close parenthesis). [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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 ≡ ) ∗/

348. (Open bracket). [LDF 2006.11.01.]

Log

[LDF 2006.11.01.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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 ≡ ) ∗/ 349. (Close bracket). [LDF 2006.11.01.]

Log

[LDF 2006.11.01.] Added this section.

⟨ Define yylex 306 ⟩ +≡

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 ≡ ) ∗/

350. Space characters. [LDF 2006.10.18.] ⟨ Define yylex 306 ⟩ +≡

else if (isspace(curr char )) {

351. state ≡ . Skip whitespace. [LDF 2006.10.18.] ⟨ Define yylex 306 ⟩ +≡

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

352. Look up curr id in keyword map and possibly id map. [LDF 2006.10.19.] ⟨ Define yylex 306 ⟩ +≡

⟨ Look up curr id in keyword map and possibly id map 357 ⟩

}  /∗ else if (state ≡  ) ∗/

§353  LDF Metadata Exchange Utilities  SPACE CHARACTERS 165

353. state ≡ . [LDF 2006.10.18.] ⟨ Define yylex 306 ⟩ +≡

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

166  SPACE CHARACTERS  LDF Metadata Exchange Utilities §354

354. Close input file and exit successfully with return value 0. [LDF 2006.10.17.] ⟨ Define yylex 306 ⟩ +≡ #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 355 ⟩

} /∗ End of yylex definition. ∗/

355. Common code for punctuation. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this declaration.

⟨ Common code for punctuation 355 ⟩ ≡

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 356. This code is cited in section 343. This code is used in section 354.

§356  LDF Metadata Exchange Utilities  COMMON CODE FOR PUNCTUATION 167

356. Look up curr id in keyword map and possibly id map. [LDF 2006.10.19.] ⟨ Common code for punctuation 355 ⟩ +≡

⟨ Look up curr id in keyword map and possibly id map 357 ⟩ } /∗ 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 ≡  ) ∗/

357. 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 357 ⟩ ≡

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 ( );

168  LOOK UP CURR ID  LDF Metadata Exchange Utilities §357

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 358 and 359. This code is used in sections 314, 324, 327, 332, 344, 352, and 356.

358. curr id not found in scanner node id map. [LDF 2006.11.01.] ⟨ Look up curr id in keyword map and possibly id map 357 ⟩ +≡

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) ∗/

§359  LDF Metadata Exchange Utilities  LOOK UP CURR ID 169

359. curr id found in scanner node id map. [LDF 2006.11.01.] ⟨ Look up curr id in keyword map and possibly id map 357 ⟩ +≡

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) ∗/

360. Putting the scanner together.

361. This is what’s compiled.

⟨ Include files 10 ⟩

⟨ scanner.web 249 ⟩

using namespace std; ⟨ Forward declarations 17 ⟩ ⟨ Declare namespace Scan Parse 255 ⟩ ⟨ Define Scan Parse functions 269 ⟩ ⟨ Define yylex 306 ⟩

170  PUTTING THE SCANNER TOGETHER  LDF Metadata Exchange Utilities §362

362. This is what’s written to scanner.h. ⟨ 362 ⟩ ≡

⟨ Preprocessor macro calls 23 ⟩

using namespace std;

⟨ Forward declarations 17 ⟩

⟨ extern declaration of namespace Scan Parse 256 ⟩

⟨ Declare yylex 305 ⟩

363. Dublin Core Parser (dbcrprsr.w). [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this file.

⟨ dbcrprsr.w 363 ⟩ ≡

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

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

364. Include files. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

⟨ Include files 10 ⟩ +≡ #include #include #include #include #include #include #include #include #include #include #include #include #include #include

365. Preprocessor macro definitions. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

⟨ Preprocessor macro definitions 77 ⟩ +≡ #define parameter #define parameter

§366  LDF Metadata Exchange Utilities  DECLARE XXERROR 171

366. Declare xxerror. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

⟨ Declare Dublin Core parser functions 366 ⟩ ≡

void xxerror (const char ∗s);

This code is used in section 379.

367. Bison options. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

⟨ Bison options 367 ⟩ ≡

(((\underline{\overline{}}) / (\underline{\overline{}})) / (\underline{\overline{}})) / (\underline{\overline{}})

\underline{\overline{}}

(\underline{\overline{}}) / (\underline{\overline{}})

This code is used in section 379.

368. union declaration for . [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

⟨ union declaration for 368 ⟩ ≡

   \underline{\overline{␣}}

int int value; float float value; char string value[2048]; void ∗pointer value; }

See also section 396. This code is used in sections 379 and 676.

369. Token and type declarations. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

370. Record. [LDF 2007.02.13.]

172  RECORD  LDF Metadata Exchange Utilities §370

Log

[LDF 2007.02.13.] Added this section.

⟨ Token and type declarations 370 ⟩ ≡

\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 371, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 415, 416, 417, and 418. This code is used in sections 379 and 676.

371. Dublin Core Namespace. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

⟨ Token and type declarations 370 ⟩ +≡

\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{␣}}

372. Dublin Core parser rules. [LDF 2007.02.13.]

§372  LDF Metadata Exchange Utilities  DUBLIN CORE PARSER RULES 173

Log

[LDF 2007.02.13.] Added this section.

373. ⟨program⟩ (Start symbol). [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this rule.

⟨ Dublin Core parser rules 373 ⟩ ≡

   \underline{\overline{␣             ␣}}

{ cerr ≪ ␣ ␣ ≪ endl ; return 0;

} ;

See also sections 375, 376, and 378. This code is used in section 379.

374. ⟨statement list⟩. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

375. ⟨statement list⟩ ⟶ . [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this rule.

⟨ Dublin Core parser rules 373 ⟩ +≡

   \underline{\overline{␣  ␣     ␣␣}}

{

cerr ≪ ␣ ≪ endl ; } ; 174 ⟨STATEMENT LIST⟩ ⟶ ⟨STATEMENT LIST⟩ ⟨STATEMENT⟩LDF Metadata Exchange Utilities §376

376. ⟨statement list⟩ ⟶ ⟨statement list⟩ ⟨statement⟩. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this rule.

⟨ Dublin Core parser rules 373 ⟩ +≡

   \underline{\overline{␣             ␣}}

{

cerr ≪ ␣ ␣ ≪ endl ; } ;

377. ⟨statement⟩.

Log

[LDF 2007.02.13.] Added this section.

378. ⟨statement list⟩ ⟶ . . .. ⟨statement list⟩ ⟶ RECORD START TAG . [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this rule.

⟨ Dublin Core parser rules 373 ⟩ +≡

   \underline{\overline{␣               ␣}}

{

cerr ≪ ␣ ␣ ≪ endl ; } ;

§379  LDF Metadata Exchange Utilities  ⟨STATEMENT LIST⟩ ⟶ … 175

379. Putting the Dublin Core parser together. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

⟨ 379 ⟩ ≡ \underline{\overline{}} ⟨ Include files 10 ⟩ using namespace std; ⟨ Preprocessor macro definitions 77 ⟩ ⟨ Declare Dublin Core parser functions 366 ⟩

⟨ dbcrprsr.w 363 ⟩

\underline{\overline{}} ⟨ union declaration for 368 ⟩ ⟨ Bison options 367 ⟩ ⟨ Token and type declarations 370 ⟩ \underline{\overline{}} ⟨ Dublin Core parser rules 373 ⟩

176 ⟨STATEMENT LIST⟩ ⟶ … LDF Metadata Exchange Utilities §380

380. Empty C section. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

/∗ Empty ∗/

381. Dublin Core (XML) Scanner.

⟨ dbcrscan.web 381 ⟩ ≡

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

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

382. Include files. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

⟨ Include files 10 ⟩ +≡ #include #include

383. Flex Options. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

⟨ Flex options 383 ⟩ ≡

   \underline{\overline{␣}}
   \underline{\overline{␣}}
   \underline{\overline{␣}}
   \underline{\overline{␣}}
   \underline{\overline{␣}}
   \underline{\overline{␣}}
   \underline{\overline{␣}}
   \underline{\overline{␣}}
   \underline{\overline{␣}}

This code is used in section 390.

384. Start conditions for the Dublin Core scanner. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

⟨ Start conditions for the Dublin Core scanner 384 ⟩ ≡

   \underline{\overline{␣}}

§384  LDF Metadata Exchange Utilities  START CONDITIONS FOR THE DUBLIN CORE SCANNER 177

This code is used in section 390.

385. Dublin Core scanner rules. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

386. ⟨record⟩ start tag. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this rule.

⟨ Dublin Core scanner rules 386 ⟩ ≡

   \underline{\overline{␣ ␣}}

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

cerr ≪ ␣ ␣␣ ≪ yytext ≪ endl ≪ ␣ ≪ endl ; #endif

yylval int value = ;

return ; }

See also sections 387, 388, and 389. This code is used in section 390.

387. ⟨/record⟩ end tag. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this rule.

⟨ Dublin Core scanner rules 386 ⟩ +≡

   \underline{\overline{␣ ␣}}

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

cerr ≪ ␣ ␣␣ ≪ yytext ≪ endl ≪ ␣ ≪ endl ; #endif

yylval int value = ;

return ; }

178  DUBLIN CORE SCANNER RULES  LDF Metadata Exchange Utilities §388

388. End-of-file ( ). [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this rule.

⟨ Dublin Core scanner rules 386 ⟩ +≡

   \underline{\overline{␣ ␣}}

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

cerr ≪ ␣        ␣␣  ≪ endl ≪  ␣  ≪ endl ;
#endif  /∗  ∗/

yylval int value = ;

return ; }

§389  LDF Metadata Exchange Utilities  DUBLIN CORE SCANNER RULES 179

389. Whitespace. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this rule.

⟨ Dublin Core scanner rules 386 ⟩ +≡

   \underline{\overline{␣ ␣}}

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

/∗ START HERE!! Change Mutex Type so that it uses the pthreads type. LDF 2007.02.13. ∗/ cerr mutex .lock ( ); cerr ≪ ␣ ␣␣ ≪ endl ≪ ≪ endl ; cerr mutex .unlock ( );

#endif /∗ ∗/ }

390. Putting the Dublin Core scanner together. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

⟨  390 ⟩ ≡  /∗ Definitions ∗/

⟨ Flex options 383 ⟩

⟨ Start conditions for the Dublin Core scanner 384 ⟩

\underline{\overline{}}

⟨ Include files 10 ⟩

using namespace std;

  ⟨ dbcrscan.web 381 ⟩

(\underline{\overline{}}) / (\underline{\overline{}})

⟨ Dublin Core scanner rules 386 ⟩

180  PUTTING THE DUBLIN CORE SCANNER TOGETHER  LDF Metadata Exchange Utilities §391

391. Empty C section. [LDF 2007.02.13.]

Log

[LDF 2007.02.13.] Added this section.

/∗ Empty ∗/

392. Parser (parser.w). [LDF 2006.10.20.]

Log

[LDF 2006.10.20.] Added this file.

[LDF 2006.10.31.] Renamed this file. Old name: parser.web. New name: parser.w.

⟨ parser.w 392 ⟩ ≡

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

This code is cited in sections 6, 7, 8, and 677. This code is used in section 675.

393. Include files. [LDF 2006.10.20.] ⟨ Include files 10 ⟩ +≡ #include #ifdef #include #else #include #endif #include #include #include #include #include #include #include

394. Declare yylex. [LDF 2006.10.20.] ⟨ Declare yylex 305 ⟩ +≡

int yylex ( ∗ lvalp, void ∗parameter );

395. Declare yyerror. [LDF 2006.10.20.] ⟨ Declare yyerror 395 ⟩ ≡

void yyerror (const char ∗s);

This code is used in section 676.

396. union declaration for . ⟨ union declaration for 368 ⟩ +≡

   \underline{\overline{␣}}

int int value; float float value; char string value[2048];

§396  LDF Metadata Exchange Utilities  UNION DECLARATION FOR  181

void ∗pointer value; }

397. Bison declarations. [LDF 2006.10.20.] ⟨ Bison declarations 397 ⟩ ≡

\underline{\overline{}}\underline{\overline{}}

This code is used in section 676.

398. Token and Type Declarations. [LDF 2006.10.20.]

399. 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 370 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

182  ASSIGNMENTS  LDF Metadata Exchange Utilities §400

400. 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 370 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

401. Arithmetical Operations. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this section with the token declarations of  ,  ,  , and  .

⟨ Token and type declarations 370 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

402. Types with values. [LDF 2006.10.31.]

Log

[2006.10.31.] Added this section.

⟨ Token and type declarations 370 ⟩ +≡

\underline{\overline{␣             ␣}}
\underline{\overline{␣          ␣␣␣␣}}
\underline{\overline{␣            ␣␣}}

§403  LDF Metadata Exchange Utilities  CONTROL 183

403. Control. [LDF 2006.10.20.] ⟨ Token and type declarations 370 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

404. 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 370 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

405. Queries. [LDF 2006.10.20.]

Log

[LDF 2006.10.31.] Added token declarations for  and  .

⟨ Token and type declarations 370 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

406. 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 370 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

184  QUERIES  LDF Metadata Exchange Utilities §407

407. 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 370 ⟩ +≡

\underline{\overline{␣          ␣␣␣}}
\underline{\overline{␣          ␣␣␣}}
\underline{\overline{␣          ␣␣␣}}
\underline{\overline{␣          ␣␣␣}}
\underline{\overline{␣          ␣␣␣}}
\underline{\overline{␣          ␣␣␣}}
\underline{\overline{␣          ␣␣␣}}
\underline{\overline{␣          ␣␣␣}}

408. 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 370 ⟩ +≡

\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{␣          ␣}}

§409  LDF Metadata Exchange Utilities  PREDICATES AND CONTROL STRUCTURES 185

409. 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 370 ⟩ +≡

\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{␣          ␣}}

186  PREDICATES AND CONTROL STRUCTURES  LDF Metadata Exchange Utilities §410

410. Database table columns (field qualifiers). [LDF 2006.12.13.]

Log

[2006.12.13.] Added this section.

⟨ Token and type declarations 370 ⟩ +≡

411. Generic columns. [LDF 2006.12.13.]

Log

[2006.12.13.] Added this section.

⟨ Token and type declarations 370 ⟩ +≡

   \underline{\overline{␣          ␣}}

412. 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 370 ⟩ +≡

   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}
   \underline{\overline{␣          ␣}}

413. Columns of individual tables. [LDF 2006.12.14.]

Log

[2006.12.14.] Added this section.

414. Pica. [LDF 2006.12.14.]

§415  LDF Metadata Exchange Utilities  RECORDS 187

415. Records. [LDF 2006.12.14.] in “Generic” section. [LDF 2006.12.14.]

Log

[2006.12.14.] Added this section.

⟨ Token and type declarations 370 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

416. Variables. [LDF 2006.11.01.]

Log

[2006.11.01.] Added this section.

⟨ Token and type declarations 370 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣             ␣}}

417. 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 370 ⟩ +≡

\underline{\overline{␣              ␣}}
\underline{\overline{␣              ␣}}
\underline{\overline{␣              ␣}}
\underline{\overline{␣              ␣}}
\underline{\overline{␣              ␣}}

188  RECORDS  LDF Metadata Exchange Utilities §418

418. 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 370 ⟩ +≡

\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}
\underline{\overline{␣          ␣}}

419. Parser rules. [LDF 2006.10.20.]

420. Program. [LDF 2006.10.31.]

421. ⟨program⟩ ⟶ ⟨statement list⟩ . [LDF 2006.10.31.] ⟨ Parser rules 421 ⟩ ≡

\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 423, 424, 427, 428, 429, 436, 437, 438, 439, 442, 443, 444, 445, 447, 449, 451, 453, 457, 459, 460, 461, 463, 464, 465, 466, 468, 469, 471, 472, 474, 475, 477, 478, 482, 483, 485, 486, 487, 488, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 502, 503, 505, 506, 507, 508, 510, 511, 512, 513, 514, 515, 517, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 548, 549, 552, 554, 555, 556, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 572, 573, 574, 575, 576, 578, 579, 580, 581, 582, 583, 584, 586, 587, 588, 590, 591, 592, 593, 594, 595, 596, 597, 602, 603, 604, 605, 606, 607, 608, 609, 610, 614, 615, 616, 617, 618, 620, 621, 623, 624, 626, 627, 629, 630, 631, 632, 633, 634, 638, 639, 641, 643, 645, 648, 649, 650, 652, 654, 656, 660, 661, 662, 664, 666, 668, 670, 671, 672, and 673.

This code is used in section 676.

422. Statement list. [LDF 2006.10.31.]

§423  LDF Metadata Exchange Utilities  ⟨STATEMENT LIST⟩ ⟶  189

423. ⟨statement list⟩ ⟶ . [LDF 2006.10.31.] ⟨ Parser rules 421 ⟩ +≡

   \underline{\overline{␣  ␣     ␣}} ;

424. ⟨statement list⟩ ⟶ ⟨statement list⟩ ⟨statement⟩. [LDF 2006.10.31.] ⟨ Parser rules 421 ⟩ +≡

   \underline{\overline{␣             ␣}} ;

425. Statement. [LDF 2006.10.31.]

426. ⟨statement⟩ ⟶ ⟨group statement⟩ . [LDF 2006.10.31.]

Log

[2006.10.31.] Added this rule.

[LDF 2006.11.13.] Commented-out this rule.

⟨ Garbage 426 ⟩ ≡

{ 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 677.

427. ⟨statement⟩ ⟶ ⟨declaration⟩ . [LDF 2006.11.01.]

Log

[2006.11.01.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 ( );

} ; 190 ⟨STATEMENT⟩ ⟶ ⟨ASSIGNMENT⟩ LDF Metadata Exchange Utilities §428

428. ⟨statement⟩ ⟶ ⟨assignment⟩ . [LDF 2006.10.31.] ⟨ Parser rules 421 ⟩ +≡

   \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 ( );

}

;

429. ⟨statement⟩ ⟶ ⟨command⟩ . [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 ( );

}

;

430. 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 .

431.

⟨ grpstmnt.w 431 ⟩ ≡

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

This code is cited in sections 7 and 8. This code is used in section 675.

§432  LDF Metadata Exchange Utilities  GROUP STATEMENT (GRPSTMNT.W) 191

432. ⟨ Type declarations for non-terminal symbols 432 ⟩ ≡

See also sections 435, 440, 441, 446, 448, 450, 452, 456, 458, 462, 467, 470, 473, 476, 480, 481, 484, 489, 492, 501, 516, 518, 547, 550, 571, 577, 585, 589, 599, 601, 613, 619, 622, 625, 628, 637, 640, 642, 644, 647, 651, 653, 655, 659, 663, 665, 667, and 669.

This code is used in section 676.

433. Declarations (declrtns.w). [LDF 2006.11.01.]

Log

[LDF 2006.11.01.] Added this file.

434.

⟨ declrtns.w 434 ⟩ ≡

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

This code is cited in sections 7 and 8. This code is used in section 675.

435. ⟨ Type declarations for non-terminal symbols 432 ⟩ +≡

   \underline{\overline{␣          ␣}}

436. ⟨declaration⟩ ⟶ ⟨query declaration⟩. [LDF 2006.11.01.] ⟨ Parser rules 421 ⟩ +≡

   \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 ( );

}

; 192 ⟨DECLARATION⟩ ⟶ ⟨STRING DECLARATION⟩ LDF Metadata Exchange Utilities §437

437. ⟨declaration⟩ ⟶ ⟨string declaration⟩. [LDF 2006.11.16.]

Log

[2006.11.16.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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 ( );

} ;

438. ⟨declaration⟩ ⟶ ⟨datasource declaration⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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 ( );

} ;

§439  LDF Metadata Exchange Utilities  ⟨DECLARATION⟩ ⟶ ⟨DATETIME DECLARATION⟩ 193

439. ⟨declaration⟩ ⟶ ⟨datetime declaration⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 } ;

440. ⟨variable declaration segment list⟩. [LDF 2006.11.01.]

Log

[2006.11.01.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 432 ⟩ +≡

   \underline{\overline{␣             ␣}}

441. ⟨subscript placeholder⟩. [LDF 2006.11.01.]

Log

[2006.11.01.] Added this type declaration.

194 ⟨VARIABLE DECLARATION SEGMENT LIST⟩ ⟶ LDF Metadata Exchange Utilities §442

442. ⟨variable declaration segment list⟩ ⟶ . [LDF 2006.11.01.]

Log

[2006.11.01.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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 ( );

} ;

443. ⟨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 421 ⟩ +≡

\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 ( );

} ; §444 LDF Metadata Exchange Utilities ⟨VARIABLE DECLARATION SEGMENT LIST⟩ ⟶ (ETC.) 195

444. ⟨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 421 ⟩ +≡

\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 ( );

} ;

445. ⟨subscript placeholder⟩ ⟶ . [LDF 2006.11.01.]

Log

[2006.11.01.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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 ( );

} ;

196 ⟨QUERY DECLARATION⟩ LDF Metadata Exchange Utilities §446

446. ⟨query declaration⟩. [LDF 2006.11.01.]

Log

[2006.11.01.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 432 ⟩ +≡

   \underline{\overline{␣          ␣}}

447. ⟨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 421 ⟩ +≡

   \underline{\overline{␣               ␣}}

{ Scan Parse ::declare variable func(parameter , , \underline{\overline{}}); \underline{\overline{}}= 0;

} ;

448. ⟨datasource declaration⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 432 ⟩ +≡

   \underline{\overline{␣          ␣}}

449. ⟨datasource declaration⟩ ⟶ (etc.). ⟨datasource declaration⟩ ⟶ ⟨variable declaration segment list⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \underline{\overline{␣                    ␣}}

{ Scan Parse ::declare variable func(parameter , , \underline{\overline{}}); \underline{\overline{}}= 0;

} ;

§450  LDF Metadata Exchange Utilities  ⟨STRING DECLARATION⟩ 197

450. ⟨string declaration⟩. [LDF 2006.11.01.]

Log

[2006.11.01.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 432 ⟩ +≡

   \underline{\overline{␣          ␣}}

451. ⟨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 421 ⟩ +≡

   \underline{\overline{␣                ␣}}

{ Scan Parse ::declare variable func(parameter , , \underline{\overline{}}); \underline{\overline{}}= 0;

} ;

452. ⟨datetime declaration⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this type declaration.

198 ⟨DATETIME DECLARATION⟩ ⟶ (ETC.) LDF Metadata Exchange Utilities §453

453. ⟨datetime declaration⟩ ⟶ (etc.). ⟨datetime declaration⟩ ⟶ ⟨variable declaration segment list⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \underline{\overline{␣                  ␣}}

{ Scan Parse ::declare variable func(parameter , , \underline{\overline{}}); \underline{\overline{}}= 0;

}

;

454. Variables (variabls.w). [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this file.

455.

⟨ variabls.w 455 ⟩ ≡

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

This code is cited in sections 7 and 8. This code is used in section 675.

456. ⟨variable name⟩. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this type declaration.

§457 LDF Metadata Exchange Utilities ⟨VARIABLE NAME⟩ ⟶ ⟨VARIABLE SEGMENT LIST⟩ 199

457. ⟨variable name⟩ ⟶ ⟨variable segment list⟩. [LDF 2006.11.02.] ⟨ Parser rules 421 ⟩ +≡

   \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 } ;

458. ⟨variable segment list⟩. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this type declaration.

200 ⟨VARIABLE SEGMENT LIST⟩ ⟶ LDF Metadata Exchange Utilities §459

459. ⟨variable segment list⟩ ⟶ . [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

} ;

§460  LDF Metadata Exchange Utilities  ⟨VARIABLE SEGMENT LIST⟩ ⟶ (ETC.) 201

460. ⟨variable segment list⟩ ⟶ (etc.). ⟨variable segment list⟩ ⟶ ⟨variable segment list⟩ .

[LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 } ;

202 ⟨VARIABLE SEGMENT LIST⟩ ⟶ (ETC.) LDF Metadata Exchange Utilities §461

461. ⟨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 421 ⟩ +≡

   \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

} ;

462. ⟨subscript⟩. [LDF 2006.11.03.]

Log

[LDF 2006.11.03.] Added this type declaration.

§463  LDF Metadata Exchange Utilities  ⟨SUBSCRIPT⟩ ⟶  203

463. ⟨subscript⟩ ⟶ . [LDF 2006.11.03.]

Log

[LDF 2006.11.03.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

204 ⟨SUBSCRIPT⟩ ⟶ LDF Metadata Exchange Utilities §464

} ; 464. ⟨subscript⟩ ⟶ . [LDF 2006.11.03.]

Log

[LDF 2006.11.03.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

} ; 465. ⟨subscript⟩ ⟶ . [LDF 2006.11.03.]

Log

[LDF 2006.11.03.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

} ; 466. ⟨subscript⟩ ⟶ . [LDF 2006.11.03.]

Log

[LDF 2006.11.03.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

} ;

467. ⟨query variable⟩. [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this type declaration.

§468  LDF Metadata Exchange Utilities  ⟨QUERY VARIABLE⟩ ⟶  207

468. ⟨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 421 ⟩ +≡

   \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

}

; 208 ⟨QUERY VARIABLE⟩ ⟶ ⟨VARIABLE NAME⟩ LDF Metadata Exchange Utilities §469

469. ⟨query variable⟩ ⟶ ⟨variable name⟩ . [LDF 2006.11.02.]

Log

[LDF 2006.11.02.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

} ;

470. ⟨datasource variable⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this type declaration.

§471  LDF Metadata Exchange Utilities⟨DATASOURCE VARIABLE⟩ ⟶  209

471. ⟨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 421 ⟩ +≡

   \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

}

; 210 ⟨DATASOURCE VARIABLE⟩ ⟶ ⟨VARIABLE NAME⟩ LDF Metadata Exchange Utilities §472

472. ⟨datasource variable⟩ ⟶ ⟨variable name⟩ . [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

} ;

473. ⟨string variable⟩. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this type declaration.

§474  LDF Metadata Exchange Utilities  ⟨STRING VARIABLE⟩ ⟶  211

474. ⟨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 421 ⟩ +≡

   \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

}

; 212 ⟨STRING VARIABLE⟩ ⟶ ⟨VARIABLE NAME⟩ LDF Metadata Exchange Utilities §475

475. ⟨string variable⟩ ⟶ ⟨variable name⟩ . [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

} ;

476. ⟨datetime variable⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this type declaration.

§477  LDF Metadata Exchange Utilities  ⟨DATETIME VARIABLE⟩ ⟶  213

477. ⟨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 421 ⟩ +≡

   \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

}

; 214 ⟨DATETIME VARIABLE⟩ ⟶ ⟨VARIABLE NAME⟩ LDF Metadata Exchange Utilities §478

478. ⟨datetime variable⟩ ⟶ ⟨variable name⟩ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

}

;

479. 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 479 ⟩ ≡

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

This code is cited in sections 7 and 8. This code is used in section 675.

§480  LDF Metadata Exchange Utilities  ASSIGNMENT (ASSIGN.W) 215

480. ⟨ Type declarations for non-terminal symbols 432 ⟩ +≡

   \underline{\overline{␣          ␣}}

481. ⟨negation optional⟩. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this section.

⟨ Type declarations for non-terminal symbols 432 ⟩ +≡

   \underline{\overline{␣          ␣}}

482. ⟨negation optional⟩ ⟶ . [LDF 2006.11.14.]

Log

[2006.11.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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; } ;

216 ⟨NEGATION OPTIONAL⟩ ⟶ LDF Metadata Exchange Utilities §483

483. ⟨negation optional⟩ ⟶ . [LDF 2006.11.14.]

Log

[2006.11.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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; } ;

484. ⟨match term optional⟩. [LDF 2006.12.11.]

Log

[LDF 2006.12.11.] Added this section.

§485  LDF Metadata Exchange Utilities  ⟨MATCH TERM OPTIONAL⟩ ⟶  217

485. ⟨match term optional⟩ ⟶ . [LDF 2006.12.11.]

Log

[LDF 2006.12.11.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

218 ⟨MATCH TERM OPTIONAL⟩ ⟶ LDF Metadata Exchange Utilities §486

\underline{\overline{}}= Query Type :: ; } ; 486. ⟨match term optional⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 :: ; } ; 487. ⟨match term optional⟩ ⟶ . [LDF 2006.12.11.]

Log

[LDF 2006.12.11.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 :: ; } ; 488. ⟨match term optional⟩ ⟶ . [LDF 2006.12.11.]

Log

[LDF 2006.12.11.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 :: ; } ;

489. ⟨assign or plus-assign⟩. [LDF 2006.11.13.]

Log

[2006.11.13.] Added this type declaration.

§490  LDF Metadata Exchange Utilities  ⟨ASSIGN OR PLUS-ASSIGN⟩ ⟶  221

490. ⟨assign or plus-assign⟩ ⟶ . [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 222 ⟨ASSIGN OR PLUS-ASSIGN⟩ ⟶ LDF Metadata Exchange Utilities §491

491. ⟨assign or plus-assign⟩ ⟶ . [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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. ⟨assignment operator⟩. [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this type declaration.

§493  LDF Metadata Exchange Utilities  ⟨ASSIGNMENT OPERATOR⟩ ⟶  223

493. ⟨assignment operator⟩ ⟶ . [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

224 ⟨ASSIGNMENT OPERATOR⟩ ⟶ LDF Metadata Exchange Utilities §494

\underline{\overline{}}= ; } ; 494. ⟨assignment operator⟩ ⟶ . [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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. ⟨assignment operator⟩ ⟶ . [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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. ⟨assignment operator⟩ ⟶ . [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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. ⟨assignment operator⟩ ⟶ . [LDF 2006.11.14.]

Log

[LDF 2006.11.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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. ⟨assignment⟩ ⟶ ⟨query assignment⟩. [LDF 2006.11.02.] ⟨ Parser rules 421 ⟩ +≡

\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 ( );

} ; 228 ⟨ASSIGNMENT⟩ ⟶ ⟨DATASOURCE ASSIGNMENT⟩ LDF Metadata Exchange Utilities §499

499. ⟨assignment⟩ ⟶ ⟨datasource assignment⟩. [LDF 2006.12.08.]

Log

[2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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 ( );

} ;

500. ⟨assignment⟩ ⟶ ⟨string assignment⟩. [LDF 2006.11.16.]

Log

[2006.11.16.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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 ( );

} ;

501. ⟨query assignment⟩. ⟨ Type declarations for non-terminal symbols 432 ⟩ +≡

\underline{\overline{␣              ␣}}

§502  LDF Metadata Exchange Utilities⟨QUERY ASSIGNMENT⟩ ⟶ ⟨QUERY VARIABLE⟩  ⟨QUERY EXPRESSION⟩ 229

502. ⟨query assignment⟩ ⟶ ⟨query variable⟩ ⟨query expression⟩. [LDF 2006.11.17.]

Log

[2006.11.17.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

} ; 230 ⟨ASSIGNMENT⟩ ⟶ ⟨DATETIME ASSIGNMENT⟩ LDF Metadata Exchange Utilities §503

503. ⟨assignment⟩ ⟶ ⟨datetime assignment⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 } ;

§505  LDF Metadata Exchange Utilities  ⟨QUERY ASSIGNMENT⟩ ⟶ (ETC.) 231

504. Targets. [LDF 2006.11.13.] 505. ⟨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 421 ⟩ +≡

   \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

232 ⟨QUERY ASSIGNMENT⟩ ⟶ (ETC.) LDF Metadata Exchange Utilities §506

} ; 506. ⟨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 421 ⟩ +≡

   \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

} ; 507. ⟨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 421 ⟩ +≡

   \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

} ; 508. ⟨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 421 ⟩ +≡

   \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

} ;

509. Fields. [LDF 2006.11.13.] 510. ⟨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 421 ⟩ +≡

   \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); 511. 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 421 ⟩ +≡ #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

512. ⟨ Parser rules 421 ⟩ +≡ #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

} ; 513. ⟨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 421 ⟩ +≡

   \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);

514. 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 421 ⟩ +≡ #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 515. ⟨ Parser rules 421 ⟩ +≡ #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

} ;

516. ⟨field specifier⟩. [LDF 2006.12.13.]

Log

[LDF 2006.12.13.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 432 ⟩ +≡

   \underline{\overline{␣              ␣}}

517. ⟨field specifier⟩ ⟶ ⟨field designator⟩ ⟨field qualifier list⟩. [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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); \} ;

§518  LDF Metadata Exchange Utilities  ⟨FIELD DESIGNATOR⟩ 239

518. ⟨field designator⟩. [LDF 2006.11.14.]

Log

[2006.11.14.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 432 ⟩ +≡

   \underline{\overline{␣          ␣}}

519. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

240 ⟨FIELD DESIGNATOR⟩ ⟶ LDF Metadata Exchange Utilities §520

\underline{\overline{}}= ; } ; 520. ⟨field designator⟩ ⟶ . [LDF 2006.11.14.]

Log

[2006.11.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

§521  LDF Metadata Exchange Utilities  ⟨FIELD DESIGNATOR⟩ ⟶  241

\underline{\overline{}}= ; } ; 521. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 522. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 525. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 526. ⟨field designator⟩ ⟶ . [LDF 2006.11.14.]

Log

[2006.11.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 designator⟩ ⟶ . [LDF 2006.12.05.]

Log

[LDF 2006.12.05.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 539. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 540. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 541. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 542. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 543. ⟨field designator⟩ ⟶ . [LDF 2006.11.14.]

Log

[2006.11.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 544. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 545. ⟨field designator⟩ ⟶ . [LDF 2006.11.14.]

Log

[2006.11.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 546. ⟨field designator⟩ ⟶ . [LDF 2006.12.12.]

Log

[LDF 2006.12.12.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ;

547. ⟨field qualifier⟩. [LDF 2006.12.13.]

Log

[LDF 2006.12.13.] Added this type declaration.

§548  LDF Metadata Exchange Utilities  ⟨FIELD QUALIFIER LIST⟩ ⟶  267

548. ⟨field qualifier list⟩ ⟶ . [LDF 2006.12.13.]

Log

[LDF 2006.12.13.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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); \} ;

549. ⟨field qualifier list⟩ ⟶ ⟨field qualifier list⟩ ⟨field qualifier⟩. [LDF 2006.12.13.]

Log

[LDF 2006.12.13.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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); \} ;

268 ⟨FIELD QUALIFIER⟩ LDF Metadata Exchange Utilities §550

550. ⟨field qualifier⟩. [LDF 2006.12.07.]

Log

[LDF 2006.12.07.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 432 ⟩ +≡

   \underline{\overline{␣          ␣}}

551. Generic. [LDF 2006.12.13.]

Log

[2006.12.13.] Added this section.

552. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.13.]

Log

[LDF 2006.12.13.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ;

§554  LDF Metadata Exchange Utilities  ⟨FIELD QUALIFIER⟩ ⟶  269

553. Names. [LDF 2006.12.13.] 554. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.07.]

Log

[LDF 2006.12.07.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

270 ⟨FIELD QUALIFIER⟩ ⟶ LDF Metadata Exchange Utilities §555

\underline{\overline{}}= ; } ; 555. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.13.]

Log

[LDF 2006.12.13.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 556. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.13.]

Log

[LDF 2006.12.13.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ;

557. Field qualifiers for database table columns. [LDF 2006.12.14.]

Log

[2006.12.14.] Added this section.

558. Records. [LDF 2006.12.14.] 559. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 566. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 567. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 568. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 569. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 570. ⟨field qualifier⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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. ⟨datasource assignment⟩. [LDF 2006.12.08.]

Log

[2006.12.08.] Added this type declaration.

284 ⟨DATASOURCE ASSIGNMENT⟩ ⟶ ⟨DATASOURCE VARIABLE⟩ ⟨DATASOURCE EXPRESSION⟩LDF Metadata Exchange Utilities §572

572. ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ ⟨datasource expression⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

§573  LDF Metadata Exchange Utilities⟨DATASOURCE ASSIGNMENT⟩ ⟶ ⟨DATASOURCE VARIABLE⟩  285

} ; 573. ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ . [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

286 ⟨DATASOURCE ASSIGNMENT⟩ ⟶ ⟨DATASOURCE VARIABLE⟩ LDF Metadata Exchange Utilities §574

} ; 574. ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ . [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

} ; 575. ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ . [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

} ; 576. ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ . [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 } ;

577. ⟨string assignment⟩. [LDF 2006.11.16.]

Log

[2006.11.16.] Added this type declaration.

§578  LDF Metadata Exchange Utilities⟨STRING ASSIGNMENT⟩ ⟶ ⟨STRING VARIABLE⟩  ⟨STRING EXPRESSION⟩ 289

578. ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨string expression⟩. [LDF 2006.11.16.]

Log

[2006.11.16.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

290 ⟨STRING ASSIGNMENT⟩ ⟶ ⟨STRING VARIABLE⟩ ⟨QUERY EXPRESSION⟩LDF Metadata Exchange Utilities §579

} ; 579. ⟨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 421 ⟩ +≡

\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);

}

580. ⟨ Parser rules 421 ⟩ +≡

§581  LDF Metadata Exchange Utilities⟨STRING ASSIGNMENT⟩ ⟶ ⟨STRING VARIABLE⟩  ⟨QUERY EXPRESSION⟩ 291

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) ∗/ } ; 581. ⟨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 421 ⟩ +≡

\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);

} 582. ⟨ Parser rules 421 ⟩ +≡

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) ∗/ } ; 583. ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨query expression⟩. [LDF 2006.12.01.]

Log

[LDF 2006.12.06.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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);

} 584. ⟨ Parser rules 421 ⟩ +≡

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) ∗/ } ;

585. ⟨datetime assignment⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this type declaration.

§586  LDF Metadata Exchange Utilities⟨DATETIME ASSIGNMENT⟩ ⟶ ⟨DATETIME VARIABLE⟩  ⟨DATETIME EXPRESSION⟩ 295

586. ⟨datetime assignment⟩ ⟶ ⟨datetime variable⟩ ⟨datetime expression⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

} ; 296 ⟨DATETIME ASSIGNMENT⟩ ⟶ ⟨DATETIME VARIABLE⟩ ⟨DATETIME SPECIFIER⟩ (ETC.)LDF Metadata Exchange Utilities §587

587. ⟨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 421 ⟩ +≡

   \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 } ;

§588  LDF Metadata Exchange Utilities⟨DATETIME ASSIGNMENT⟩ ⟶ ⟨DATETIME VARIABLE⟩  ⟨DATETIME SPECIFIER⟩ (ETC.) 297

588. ⟨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 421 ⟩ +≡

   \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 } ;

298  DATETIME SPECIFIER  LDF Metadata Exchange Utilities §589

589. Datetime specifier.

Log

[2006.12.15.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 432 ⟩ +≡

   \underline{\overline{␣          ␣}}

590. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

§591  LDF Metadata Exchange Utilities  ⟨DATETIME SPECIFIER⟩ ⟶  299

\underline{\overline{}}= ; } ; 591. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

300 ⟨DATETIME SPECIFIER⟩ ⟶ LDF Metadata Exchange Utilities §592

\underline{\overline{}}= ; } ; 592. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 593. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 594. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 595. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 596. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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. ⟨datetime specifier⟩ ⟶ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ;

598. Commands (commands.w). [LDF 2006.11.13.]

Log

[LDF 2006.11.13.] Added this file.

⟨ commands.w 598 ⟩ ≡

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

      ␣        ␣   ␣ ;

This code is cited in sections 7 and 8. This code is used in section 675.

599. ⟨ Type declarations for non-terminal symbols 432 ⟩ +≡

   \underline{\overline{␣          ␣}}

600. Messages. [LDF 2006.11.15.] 306 ⟨MESSAGE OR ERRMESSAGE⟩ LDF Metadata Exchange Utilities §601

601. ⟨message or errmessage⟩. [LDF 2006.11.15.]

Log

[2006.11.15.] Added this type declaration.

⟨ Type declarations for non-terminal symbols 432 ⟩ +≡

   \underline{\overline{␣          ␣}}

602. ⟨message or errmessage⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ;

§603  LDF Metadata Exchange Utilities  ⟨MESSAGE OR ERRMESSAGE⟩ ⟶  307

603. ⟨message or errmessage⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ; 308 ⟨COMMAND⟩ ⟶ ⟨MESSAGE OR ERRMESSAGE⟩ LDF Metadata Exchange Utilities §604

604. ⟨command⟩ ⟶ ⟨message or errmessage⟩. . [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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 ( );

} ;

§605  LDF Metadata Exchange Utilities  ⟨COMMAND⟩ ⟶  309

605. ⟨command⟩ ⟶ . [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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 ( );

} ;

310 ⟨COMMAND⟩ ⟶  ⟨QUERY VARIABLE⟩  LDF Metadata Exchange Utilities §606

606. ⟨command⟩ ⟶ ⟨query variable⟩. [LDF 2006.11.13.]

Log

[2006.11.13.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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;

§606  LDF Metadata Exchange Utilities  ⟨COMMAND⟩ ⟶  ⟨QUERY VARIABLE⟩ 311

} #undef

} ;

312 ⟨COMMAND⟩ ⟶  ⟨DATASOURCE VARIABLE⟩  LDF Metadata Exchange Utilities §607

607. ⟨command⟩ ⟶ ⟨datasource variable⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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;

§607  LDF Metadata Exchange Utilities  ⟨COMMAND⟩ ⟶  ⟨DATASOURCE VARIABLE⟩ 313

} #undef

} ;

314 ⟨COMMAND⟩ ⟶  ⟨DATETIME VARIABLE⟩  LDF Metadata Exchange Utilities §608

608. ⟨command⟩ ⟶ ⟨datetime variable⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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;

§608  LDF Metadata Exchange Utilities  ⟨COMMAND⟩ ⟶  ⟨DATETIME VARIABLE⟩ 315
}

#undef } ;

609. ⟨command⟩ ⟶ ⟨string expression⟩. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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

} ;

316 ⟨COMMAND⟩ ⟶  ⟨STRING EXPRESSION⟩  LDF Metadata Exchange Utilities §610

610. ⟨command⟩ ⟶ ⟨string expression⟩. [LDF 2006.11.23.]

Log

[LDF 2006.11.23.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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 } ;

611. Query expressions (queryexp.w). [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this file.

§612  LDF Metadata Exchange Utilities  QUERY EXPRESSIONS (QUERYEXP.W) 317

612.

⟨ queryexp.w 612 ⟩ ≡

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

This code is cited in sections 7 and 8. This code is used in section 675.

613. query primary. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this type declaration.

318 ⟨QUERY PRIMARY⟩ ⟶ ⟨QUERY VARIABLE⟩ LDF Metadata Exchange Utilities §614

614. ⟨query primary⟩ ⟶ ⟨query variable⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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 } ;

§615  LDF Metadata Exchange Utilities  ⟨QUERY PRIMARY⟩ ⟶ ⟨QUERY EXPRESSION⟩  319

615. ⟨query primary⟩ ⟶ ⟨query expression⟩ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}});

320 ⟨QUERY PRIMARY⟩ ⟶ LDF Metadata Exchange Utilities §616

\underline{\overline{}}= \underline{\overline{}}; } ; 616. ⟨query primary⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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);

} ;

§617  LDF Metadata Exchange Utilities  ⟨QUERY PRIMARY⟩ ⟶  321

617. ⟨query primary⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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);

} ; 618. ⟨query primary⟩ ⟶ . [LDF 2006.12.14.]

Log

[LDF 2006.12.14.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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);

} ;

619. query secondary. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this type declaration.

§620  LDF Metadata Exchange Utilities  ⟨QUERY SECONDARY⟩ ⟶ ⟨QUERY PRIMARY⟩ 323

620. ⟨query secondary⟩ ⟶ ⟨query primary⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}; } ; 324 ⟨QUERY SECONDARY⟩ ⟶ ⟨QUERY SECONDARY⟩ ⟨AND OR AND NOT⟩ ⟨QUERY PRIMARY⟩LDF Metadata Exchange Utilities §621

621. ⟨query secondary⟩ ⟶ ⟨query secondary⟩ ⟨and or and not⟩ ⟨query primary⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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{}};

} ;

622. query tertiary. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this type declaration.

§623  LDF Metadata Exchange Utilities  ⟨QUERY TERTIARY⟩ ⟶ ⟨QUERY SECONDARY⟩ 325

623. ⟨query tertiary⟩ ⟶ ⟨query secondary⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}; } ; 326 ⟨QUERY TERTIARY⟩ ⟶ ⟨QUERY TERTIARY⟩ ⟨XOR OR XOR NOT⟩ ⟨QUERY SECONDARY⟩LDF Metadata Exchange Utilities §624

624. ⟨query tertiary⟩ ⟶ ⟨query tertiary⟩ ⟨xor or xor not⟩ ⟨query secondary⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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{}};

} ;

625. query expression. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this type declaration.

§626  LDF Metadata Exchange Utilities  ⟨QUERY EXPRESSION⟩ ⟶ ⟨QUERY TERTIARY⟩ 327

626. ⟨query expression⟩ ⟶ ⟨query tertiary⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}; } ; 328 ⟨QUERY EXPRESSION⟩ ⟶ ⟨QUERY EXPRESSION⟩ ⟨OR OR OR NOT⟩ ⟨QUERY TERTIARY⟩LDF Metadata Exchange Utilities §627

627. ⟨query expression⟩ ⟶ ⟨query expression⟩ ⟨or or or not⟩ ⟨query tertiary⟩. [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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{}};

} ;

628. 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 432 ⟩ +≡

\underline{\overline{␣          ␣}} \underline{\overline{␣          ␣}} \underline{\overline{␣          ␣}}

§629  LDF Metadata Exchange Utilities  ⟨AND OR AND NOT⟩ ⟶  329

629. ⟨and or and not⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ;

330 ⟨AND OR AND NOT⟩ ⟶ LDF Metadata Exchange Utilities §630

630. ⟨and or and not⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ;

§631  LDF Metadata Exchange Utilities  ⟨OR OR OR NOT⟩ ⟶  331

631. ⟨or or or not⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ;

332 ⟨OR OR OR NOT⟩ ⟶ LDF Metadata Exchange Utilities §632

632. ⟨or or or not⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ;

§633  LDF Metadata Exchange Utilities  ⟨XOR OR XOR NOT⟩ ⟶  333

633. ⟨xor or xor not⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ;

334 ⟨XOR OR XOR NOT⟩ ⟶ LDF Metadata Exchange Utilities §634

634. ⟨xor or xor not⟩ ⟶ . [LDF 2006.11.15.]

Log

[LDF 2006.11.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}= ; } ;

635. Datasource expressions (dtsrcexp.w). [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this file.

636.

⟨ dtsrcexp.w 636 ⟩ ≡

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

This code is cited in sections 7 and 8. This code is used in section 675.

637. datasource primary. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this type declaration.

§638 LDF Metadata Exchange Utilities⟨DATASOURCE PRIMARY⟩ ⟶ ⟨DATASOURCE VARIABLE⟩ 335

638. ⟨datasource primary⟩ ⟶ ⟨datasource variable⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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 } ; 336 ⟨DATASOURCE PRIMARY⟩ ⟶ ⟨DATASOURCE EXPRESSION⟩ LDF Metadata Exchange Utilities §639

639. ⟨datasource primary⟩ ⟶ ⟨datasource expression⟩ . [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}; } ;

640. datasource secondary. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this type declaration.

§641 LDF Metadata Exchange Utilities⟨DATASOURCE SECONDARY⟩ ⟶ ⟨DATASOURCE PRIMARY⟩ 337

641. ⟨datasource secondary⟩ ⟶ ⟨datasource primary⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}; } ;

642. datasource tertiary. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this type declaration.

338 ⟨DATASOURCE TERTIARY⟩ ⟶ ⟨DATASOURCE SECONDARY⟩LDF Metadata Exchange Utilities §643

643. ⟨datasource tertiary⟩ ⟶ ⟨datasource secondary⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}; } ;

644. datasource expression. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this type declaration.

§645 LDF Metadata Exchange Utilities⟨DATASOURCE EXPRESSION⟩ ⟶ ⟨DATASOURCE TERTIARY⟩ 339

645. ⟨datasource expression⟩ ⟶ ⟨datasource tertiary⟩. [LDF 2006.12.08.]

Log

[LDF 2006.12.08.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}; } ;

646. String expressions (strings.w). [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this file.

⟨ strings.w 646 ⟩ ≡

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

This code is used in section 675.

647. ⟨string primary⟩. [LDF 2006.11.16.]

Log

[2006.11.16.] Added this type declaration.

340 ⟨STRING PRIMARY⟩ ⟶ ⟨STRING VARIABLE⟩ LDF Metadata Exchange Utilities §648

648. ⟨string primary⟩ ⟶ ⟨string variable⟩. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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 ( ));

} } ;

§649  LDF Metadata Exchange Utilities  ⟨STRING PRIMARY⟩:  341

649. ⟨string primary⟩: . [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}); } ; 342 ⟨STRING PRIMARY⟩ ⟶ ⟨STRING EXPRESSION⟩ LDF Metadata Exchange Utilities §650

650. ⟨string primary⟩ ⟶ ⟨string expression⟩ . [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}); } ;

651. string secondary. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this type declaration.

§652  LDF Metadata Exchange Utilities  ⟨STRING SECONDARY⟩ ⟶ ⟨STRING PRIMARY⟩ 343

652. ⟨string secondary⟩ ⟶ ⟨string primary⟩. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}); } ;

653. string tertiary. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this type declaration.

344 ⟨STRING TERTIARY⟩ ⟶ ⟨STRING SECONDARY⟩ LDF Metadata Exchange Utilities §654

654. ⟨string tertiary⟩ ⟶ ⟨string secondary⟩. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}); } ;

655. string expression. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this type declaration.

§656  LDF Metadata Exchange Utilities  ⟨STRING EXPRESSION⟩ ⟶ ⟨STRING TERTIARY⟩ 345

656. ⟨string expression⟩ ⟶ ⟨string tertiary⟩. [LDF 2006.11.16.]

Log

[LDF 2006.11.16.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}); } ;

657. Datetime expressions (dttmexp.w). [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this file.

658.

⟨ dttmexp.w 658 ⟩ ≡

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

This code is cited in sections 7 and 8. This code is used in section 675.

659. datetime primary. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this type declaration.

346 ⟨DATETIME PRIMARY⟩ ⟶ ⟨DATETIME VARIABLE⟩ LDF Metadata Exchange Utilities §660

660. ⟨datetime primary⟩ ⟶ ⟨datetime variable⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

\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 } ;

§661  LDF Metadata Exchange Utilities⟨DATETIME PRIMARY⟩ ⟶ ⟨DATETIME EXPRESSION⟩  347

661. ⟨datetime primary⟩ ⟶ ⟨datetime expression⟩ . [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}; } ; 348 ⟨DATETIME PRIMARY⟩ ⟶ ⟨DATETIME ELEMENT LIST⟩LDF Metadata Exchange Utilities §662

662. ⟨datetime primary⟩ ⟶ ⟨datetime element list⟩. [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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);

} ;

663. datetime secondary. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this type declaration.

§664 LDF Metadata Exchange Utilities ⟨DATETIME SECONDARY⟩ ⟶ ⟨DATETIME PRIMARY⟩ 349

664. ⟨datetime secondary⟩ ⟶ ⟨datetime primary⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}; } ;

665. datetime tertiary. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this type declaration.

350 ⟨DATETIME TERTIARY⟩ ⟶ ⟨DATETIME SECONDARY⟩ LDF Metadata Exchange Utilities §666

666. ⟨datetime tertiary⟩ ⟶ ⟨datetime secondary⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}; } ;

667. datetime expression. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this type declaration.

§668 LDF Metadata Exchange Utilities ⟨DATETIME EXPRESSION⟩ ⟶ ⟨DATETIME TERTIARY⟩ 351

668. ⟨datetime expression⟩ ⟶ ⟨datetime tertiary⟩. [LDF 2006.12.15.]

Log

[LDF 2006.12.15.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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{}}; } ;

669. Datetime element list. [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this type declaration.

352 ⟨DATETIME ELEMENT LIST⟩ ⟶ LDF Metadata Exchange Utilities §670

670. ⟨datetime element list⟩ ⟶ . [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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);

} ;

§671  LDF Metadata Exchange Utilities  ⟨DATETIME ELEMENT LIST⟩ ⟶  353

671. ⟨datetime element list⟩ ⟶ . [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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);

} ; 354 ⟨DATETIME ELEMENT LIST⟩ ⟶ ⟨DATETIME ELEMENT LIST⟩ LDF Metadata Exchange Utilities §672

672. ⟨datetime element list⟩ ⟶ ⟨datetime element list⟩ . [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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);

} ;

§673  LDF Metadata Exchange Utilities⟨DATETIME ELEMENT LIST⟩ ⟶ ⟨DATETIME ELEMENT LIST⟩  355

673. ⟨datetime element list⟩ ⟶ ⟨datetime element list⟩ . [LDF 2006.12.18.]

Log

[LDF 2006.12.18.] Added this rule.

⟨ Parser rules 421 ⟩ +≡

   \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);

}

;

674. Putting the parser together.

675. 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 675 ⟩ ≡

  ⟨ parser.w 392 ⟩
  ⟨ declrtns.w 434 ⟩
  ⟨ grpstmnt.w 431 ⟩
  ⟨ variabls.w 455 ⟩
  ⟨ assign.w 479 ⟩
  ⟨ queryexp.w 612 ⟩
  ⟨ dtsrcexp.w 636 ⟩
  ⟨ commands.w 598 ⟩
  ⟨ strings.w 646 ⟩
  ⟨ dttmexp.w 658 ⟩

This code is used in sections 676 and 677.

356  PUTTING THE PARSER TOGETHER  LDF Metadata Exchange Utilities §676

676. This is what’s written to parser.yyy. [LDF 2006.10.20.] ⟨ 676 ⟩ ≡

\underline{\overline{}} ⟨ Include files 10 ⟩ ⟨ Filename sections 675 ⟩ ⟨ Declare yylex 305 ⟩ ⟨ Declare yyerror 395 ⟩

#define parameter #define parameter

stringstream temp strm; \underline{\overline{}} ⟨ union declaration for 368 ⟩ ⟨ Bison declarations 397 ⟩ ⟨ Token and type declarations 370 ⟩ ⟨ Type declarations for non-terminal symbols 432 ⟩ \underline{\overline{}} ⟨ Parser rules 421 ⟩

§677  LDF Metadata Exchange Utilities  PUTTING THE PARSER TOGETHER 357

677. This is what isn’t compiled. The file parser.c isn’t compiled, but including ⟨ parser.w 392 ⟩ here prevents CWEAVE from issuing a warning. [LDF 2006.10.24.]

⟨ Filename sections 675 ⟩ #if 0 /∗ 1 ∗/

⟨ Garbage 426 ⟩ #endif

678. Parser functions (prsrfncs.web). [LDF 2006.10.31.]

Log

[LDF 2006.10.31.] Created this file.

⟨ prsrfncs.web 678 ⟩ ≡

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

This code is used in section 728.

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

680. Preprocessor macro calls. ⟨ Preprocessor macro calls 23 ⟩ +≡ #ifdef #pragma once #endif

681. Parser function definitions. [LDF 2006.10.31.]

358 VARIABLE FUNC  LDF Metadata Exchange Utilities  §683

682. Functions for variables. [LDF 2006.11.02.] 683. variable func. [LDF 2006.11.02.]

Log

[2006.11.02.] Added this function.

⟨ Define parser functions 683 ⟩ ≡

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 684, 685, 686, 687, 688, 689, 691, 692, 693, 695, 696, 697, 698, 699, 701, 702, 703, 704, 705, 706, 707, 708, 709,

710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, and 726. This code is used in section 728.

684. Error handling: scanner node ≡ 0. This shouldn’t ever happen. If it does, we can’t continue.

[LDF 2006.11.01.]

⟨ Define parser functions 683 ⟩ +≡

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) ∗/

§685  LDF Metadata Exchange Utilities  VARIABLE FUNC  359

map⟨string, Id Node⟩::iterator iter = scanner node id map.find (name); 685. Error handling: name not found in scanner node id map. [LDF 2006.11.03.] ⟨ Define parser functions 683 ⟩ +≡

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 ( )) ∗/

686. name found in scanner node id map. [LDF 2006.11.03.] ⟨ Define parser functions 683 ⟩ +≡

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

687. name doesn’t refer to an array. [LDF 2006.11.03.] ⟨ Define parser functions 683 ⟩ +≡

if (strchr (name, ¥ ) ≡ 0) {

curr id node = iter second ; } /∗ if (strchr (name, ¥ ) ≡ 0) ∗/ 688. name refers to an array. [LDF 2006.11.03.] ⟨ Define parser functions 683 ⟩ +≡

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) ∗/ 689. Push a Token Type object onto scanner node token stack . [LDF 2006.11.03.] ⟨ Define parser functions 683 ⟩ +≡

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. ∗/

690. Functions for declarations. [LDF 2006.11.01.]

362  DECLARE VARIABLE FUNCTION  LDF Metadata Exchange Utilities §691

691. 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 683 ⟩ +≡

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

692. Error handling: scanner node ≡ 0. This shouldn’t ever happen. If it does, we can’t continue.

[LDF 2006.11.01.]

⟨ Define parser functions 683 ⟩ +≡

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) ∗/

§693  LDF Metadata Exchange Utilities  DECLARE VARIABLE FUNCTION 363

693.

Log

[LDF 2006.11.02.] Now setting curr id node scanner node = scanner node.

⟨ Define parser functions 683 ⟩ +≡ 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. ∗/

364 QUERY ASSIGNMENT FUNC 0  LDF Metadata Exchange Utilities  §695

694. Functions for assignments. [LDF 2006.11.02.] 695. 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 683 ⟩ +≡

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

696. Error handling: scanner node ≡ 0. This shouldn’t ever happen. If it does, we can’t continue.

[LDF 2006.11.01.]

⟨ Define parser functions 683 ⟩ +≡

if (scanner node ≡ 0) {

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

        ␣        ␣              ␣    ␣       ␣     ␣  ≪ endl ;

cerr mutex .lock ( );

cerr ≪ temp strm.str ( ); cerr mutex .unlock ( ); temp strm.str ( ); return 0;

§697  LDF Metadata Exchange Utilities  QUERY ASSIGNMENT FUNC 0  365

} /∗ if (scanner node ≡ 0) ∗/ 697. ⟨ Define parser functions 683 ⟩ +≡

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) ∗/

698. ⟨ Define parser functions 683 ⟩ +≡

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 699. Targets. [LDF 2006.11.13.]

Log

[2006.11.13.] Added this section.

⟨ Define parser functions 683 ⟩ +≡

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 ≡  ) ∗/

700. Fields. [LDF 2006.11.13.] 701. 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 683 ⟩ +≡

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;

} 702.

Log

[2006.11.14.] Added this section.

⟨ Define parser functions 683 ⟩ +≡

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. ∗/ 703. query assignment func 1. [LDF 2006.12.19.]

Log

[LDF 2006.12.19.] Added this function.

⟨ Define parser functions 683 ⟩ +≡

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 ≡  ) ∗/

704. ⟨ Define parser functions 683 ⟩ +≡

else { curr query = 0; return 1;

}

705. Set match value. [LDF 2006.12.12.]

Log

[2006.12.12.] Added this section.

⟨ Define parser functions 683 ⟩ +≡

if (curr query ) {

curr query match value = match term optional ; } /∗ if (curr query ) ∗/ 706. ⟨ Define parser functions 683 ⟩ +≡ #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. ∗/

707. 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 683 ⟩ +≡

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 ( );

376 DATETIME ASSIGNMENT FUNC 0  LDF Metadata Exchange Utilities  §708

#endif 708. Error handling: val ≡ 0. [LDF 2006.12.18.] ⟨ Define parser functions 683 ⟩ +≡

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) ∗/

709. ⟨ Define parser functions 683 ⟩ +≡

if (curr date time node ≡ 0) {

§710  LDF Metadata Exchange Utilities  DATETIME ASSIGNMENT FUNC 0  377

curr date time node = new Date Time Type; } /∗ if (curr date time node ≡ 0) ∗/ 710. ⟨ Define parser functions 683 ⟩ +≡

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 ≡  ) ∗/

711. ⟨ Define parser functions 683 ⟩ +≡

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 ≡  ) ∗/

712. ⟨ Define parser functions 683 ⟩ +≡

else

if (op ≡  ) { }  /∗ else if (op ≡  ) ∗/

713. ⟨ Define parser functions 683 ⟩ +≡

else

if (op ≡  ) { }  /∗ else if (op ≡  ) ∗/

714. ⟨ Define parser functions 683 ⟩ +≡

else

if (op ≡  ) { }  /∗ else if (op ≡  ) ∗/

715. Error handling: op has invalid value. [LDF 2006.12.18.] ⟨ Define parser functions 683 ⟩ +≡

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. ∗/ 716. 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 683 ⟩ +≡

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

717. ⟨ Define parser functions 683 ⟩ +≡

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) ∗/ 718. ⟨ Define parser functions 683 ⟩ +≡

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) ∗/

719. ⟨ Define parser functions 683 ⟩ +≡

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 ∗/ 720. Year. [LDF 2006.12.18.] ⟨ Define parser functions 683 ⟩ +≡

if (d ≡ 0) d = new Date Time Type;

d year = static cast⟨short ∗⟩(vec at (0).second ); vec at (0).second = 0;

721. Month. [LDF 2006.12.18.] ⟨ Define parser functions 683 ⟩ +≡

if (vec size( ) > 1) { d month = static cast⟨unsigned short ∗⟩(vec at (1).second ); vec at (1).second = 0;

}

722. Day. [LDF 2006.12.18.] ⟨ Define parser functions 683 ⟩ +≡

if (vec size( ) > 2) { d day = static cast⟨unsigned short ∗⟩(vec at (2).second ); vec at (2).second = 0;

}

723. Hour. [LDF 2006.12.18.] ⟨ Define parser functions 683 ⟩ +≡

if (vec size( ) > 3) { d hour = static cast⟨unsigned short ∗⟩(vec at (3).second ); vec at (3).second = 0;

}

724. Minute. [LDF 2006.12.18.] ⟨ Define parser functions 683 ⟩ +≡

if (vec size( ) > 4) { d minute = static cast⟨unsigned short ∗⟩(vec at (4).second ); vec at (4).second = 0;

}

725. Second. [LDF 2006.12.18.] ⟨ Define parser functions 683 ⟩ +≡

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; } 726. ⟨ Define parser functions 683 ⟩ +≡ #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. ∗/

727. Putting Parser Functions together. [LDF 2006.10.31.]

384  PUTTING PARSER FUNCTIONS TOGETHER  LDF Metadata Exchange Utilities §728

728. This is what’s compiled.

⟨ Include files 10 ⟩

  ⟨ prsrfncs.web 678 ⟩

using namespace std;

using namespace Scan Parse;

⟨ Define parser functions 683 ⟩

729. 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 729 ⟩ ≡

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

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

730. Include files. [LDF 2006.10.17.] ⟨ Include files 10 ⟩ +≡ #include #ifdef #define new #endif

731. Global variable declarations. [LDF 2006.10.19.]

Log

[LDF 2006.10.19.] Added this section.

⟨ Global variables 731 ⟩ ≡ ofstream log strm; CMutex log strm mutex ; CMutex cerr mutex ; CMutex cout mutex ; ifstream in strm;

See also section 736. This code is used in sections 733 and 750.

732. Define tmain. [LDF 2006.10.17.]

Log

[LDF 2006.10.17.] Added this function.

⟨ Define tmain 732 ⟩ ≡ CWinApp theApp;

§732  LDF Metadata Exchange Utilities  DEFINE TMAIN 385

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 }

386  DEFINE TMAIN  LDF Metadata Exchange Utilities §732

return nRetCode; } /∗ End of tmain definition. ∗/

This code is used in section 733.

733. Putting Scan Test together. [LDF 2006.10.17.] ⟨ Include files 10 ⟩

  ⟨ scantest.web 729 ⟩

using namespace std;

⟨ Global variables 731 ⟩

⟨ Define tmain 732 ⟩

734. Main when using GCC (main.web). [LDF 2006.10.20.]

Log

[LDF 2006.10.20.] Created this file.

⟨ main.web 734 ⟩ ≡

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

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

735. Include files. ⟨ Include files 10 ⟩ +≡ #include #include #include #include #include #include #include #include #include #include #include

736. 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 731 ⟩ +≡ Mutex Type cerr mutex ; Mutex Type cout mutex ; Mutex Type time mutex ;

§736  LDF Metadata Exchange Utilities  GLOBAL VARIABLES 387

ofstream tex file strm;

Mutex Type tex mutex ; unsigned short tex file ctr ; string tex filename str ; string copyright tex str ;

737. Scanning and parsing input. [LDF Undated.]

738. yyparse declaration. [LDF Undated.] ⟨ Declare scanning and parsing functions 738 ⟩ ≡

int yyparse(void ∗);

See also sections 739, 740, 742, and 743. This code is used in section 750.

739. yywrap. ⟨ Declare scanning and parsing functions 738 ⟩ +≡ #if 0

int yywrap(void); #endif

740. yyerror . [LDF 2006.10.20.] ⟨ Declare scanning and parsing functions 738 ⟩ +≡

void yyerror (const char ∗s);

741. ⟨ Define scanning and parsing functions 741 ⟩ ≡

void yyerror (const char ∗s)

{

return; }

See also section 744. This code is used in section 750.

742. xxparse declaration. [LDF 2007.02.13.] ⟨ Declare scanning and parsing functions 738 ⟩ +≡

int xxparse(void ∗);

743. xxerror . [LDF 2007.02.13.] ⟨ Declare scanning and parsing functions 738 ⟩ +≡

void xxerror (const char ∗s);

388  SCANNING AND PARSING INPUT  LDF Metadata Exchange Utilities §744

744. ⟨ Define scanning and parsing functions 741 ⟩ +≡

void xxerror (const char ∗s) {

return; }

745. 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 745 ⟩ ≡

int main(int argc, char ∗argv [ ]){ FILE ∗fp = fopen( , ); yyscan t scanner ; xxlex init (&scanner ); xxset in(fp, scanner );

∗ i = new ; xxparse(static cast⟨void ∗⟩(scanner )); xxlex destroy (scanner ); return 0;

#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

§745  LDF Metadata Exchange Utilities  MAIN ITSELF 389

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 746, 747, and 748. This code is used in section 750.

390  MAIN ITSELF  LDF Metadata Exchange Utilities §746

746. Process command line options. [LDF 2006.11.03.] Options:

— Enable GNU Bison’s tracing facilities.

Log

[2006.11.03.] Added this section.

⟨ Define main 745 ⟩ +≡

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 ∗/ 747. Process filename argument. [LDF 2006.11.03.]

Log

[2006.11.03.] Added this section.

⟨ Define main 745 ⟩ +≡ #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 ;

748. ⟨ Define main 745 ⟩ +≡

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. ∗/

749. Putting Main together.

392  PUTTING MAIN TOGETHER  LDF Metadata Exchange Utilities §750

750. This is what’s compiled.

⟨ Include files 10 ⟩

  ⟨ main.web 734 ⟩

using namespace std;

⟨ Global variables 731 ⟩

⟨ Declare scanning and parsing functions 738 ⟩

⟨ Define main 745 ⟩

⟨ Define scanning and parsing functions 741 ⟩

751. 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

§751  LDF Metadata Exchange Utilities  GNU GENERAL PUBLIC LICENSE 393

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.

394  GNU GENERAL PUBLIC LICENSE  LDF Metadata Exchange Utilities §751

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 751 ⟩ ≡ /∗ This section contains no C^{++} code. ∗/

This code is cited in section 2. This code is used in section 753.

752. GNU Free Documentation License. [LDF 2006.10.23.]

GNU Free Documentation License Version 1.2, November 2002

§752  LDF Metadata Exchange Utilities  GNU FREE DOCUMENTATION LICENSE 397

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.

398  GNU FREE DOCUMENTATION LICENSE  LDF Metadata Exchange Utilities §752

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 752 ⟩ ≡ /∗ This section contains no C^{++} code. ∗/

This code is cited in section 2. This code is used in section 753.

402  INDEX  LDF Metadata Exchange Utilities §754

753. 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 751 ⟩ ⟨ GNU Free Documentation License 752 ⟩

754. Index.

: 24. : \underline{24}. : 730. : 732. tmain: 6, 8, \underline{732}. tprintf : 732. aand node: \underline{88}, \underline{89}. : 106, 281, 519, 701. : \underline{62}, \underline{68}, 92, 100, 106,

117, 701. : 79, 80, 103. AfxWinInit : 732. : 280, 334, 408, 629. : 271, 334, 400, 703. and node: \underline{53}, 87, 92, 97, 108, 112, 119, 130,

152, 621, 702, 703. : 280, 334, 408, 621, 630. and or and not : 628. : \underline{59}, \underline{60}, 100, 130, 621, 702, 703. arg 0 : \underline{55}, \underline{226}, \underline{298}, \underline{695}, 698, 699, 701. arg 1 : \underline{55}, \underline{226}, \underline{298}, \underline{695}, 698, 699. argc: \underline{732}, \underline{745}, 746, 747. argv : 732, \underline{745}, 746, 747. asctime: 610. : 271, 331, 400, 490, 493, 507, 662,

702, 703, 710.

assign.w: 5, 8.

assign id string : \underline{479}. assignment operator : \underline{55}, \underline{226}, \underline{299}, \underline{703}. assignment type: \underline{55}, \underline{226}, \underline{298}, \underline{695}, 702. at : 719, 720, 721, 722, 723, 724, 725. : 268, 270, 345, 399. atof : 316, 320, 327, 332, 344, 353, 356. atoi : 315, 320, 327, 332, 353, 356. : 106, 281, 409, 520, 701. : 61, \underline{62}, \underline{68}, 92, 100, 106, 117, 701. : 79, 80, 103, 132, 133, 134. : 412. : 61, \underline{64}, \underline{70}, 92,

100, 106, 133. : 79, 80, 103, 133. : 412. : 61, \underline{64}, \underline{70}, 92, 100,

106, 134. : 79, 80, 103, 134.

: 412.

: 61, \underline{64}, \underline{70}, 92, 100,

106, 132. : 79, 80, 103, 132. begin: 97, 112, 117, 152, 233, 292, 688, 699, 719. : 106, 281, 521, 701. : \underline{62}, \underline{68}, 92, 100,

106, 117, 701. : 79, 80, 103. bitset : \underline{78}, \underline{79}, 80, 114, 127, 582, 584, 745. BUG FIX: 33, 90, 579. c: \underline{732}. c str : 312, 315, 316, 320, 327, 332, 344, 353, 356,

358, 580, 582, 584, 610, 648. : 106, 281, 522, 701. : \underline{62}, \underline{68}, 92, 100, 106, 117,

§754  LDF Metadata Exchange Utilities  INDEX 403

701. : 79, 80, 103. cerr : 41, 43, 45, 91, 93, 96, 97, 104, 111, 113, 118, 119, 127, 128, 130, 131, 156, 172, 176, 177, 180, 184, 203, 206, 209, 233, 235, 237, 238, 240, 241, 242, 243, 244, 245, 292, 307, 308, 309, 310, 312, 313, 315, 316, 317, 319, 320, 322, 323, 326, 327, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 351, 353, 354, 355, 356, 357, 358, 359, 373, 375, 376, 378, 386, 387, 388, 389, 421, 426, 427, 428, 429, 436, 437, 438, 439, 442, 443, 444, 445, 457, 459, 460, 461, 463, 464, 465, 466, 468, 469, 471, 472, 474, 475, 478, 482, 483, 485, 486, 487, 488, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 502, 503, 505, 506, 507, 508, 510, 511, 512, 513, 514, 515, 517, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 548, 549, 552, 554, 555, 556, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 572, 573, 574, 575, 576, 578, 579, 581, 583, 586, 587, 588, 590, 591, 592, 593, 594, 595, 596, 597, 602, 603, 604, 605, 606, 607, 608, 609, 610, 614, 615, 616, 617, 618, 620, 621, 623, 624, 626, 627, 629, 630, 631, 632, 633, 634, 638, 639, 641, 643, 645, 648, 649, 650, 652, 654, 656, 660, 661, 662, 664, 666, 668, 670, 671, 672, 673, 683, 684, 685, 686, 688, 689, 691, 692, 693, 695, 696, 697, 698, 702, 703, 706, 707, 708, 715, 716, 717, 718, 719, 726, 732, 745, 746, 747.

cerr mutex : \underline{18}, \underline{25}, 41, 43, 91, 93, 96, 97, 111, 113, 118, 119, 127, 128, 130, 156, 176, 177, 180, 184, 203, 206, 209, 233, 235, 237, 238, 240, 241, 242, 243, 244, 245, 292, 307, 308, 309, 310, 312, 313, 315, 316, 317, 319, 320, 322, 323, 326, 327, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 351, 353, 354, 355, 356, 357, 358, 359, 389, 436, 437, 438, 439, 442, 443, 444, 445, 457, 459, 460, 461, 463, 464, 465, 466, 468, 469, 471, 472, 474, 475, 478, 482, 483, 485, 486, 487, 488, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 502, 503, 505, 506, 507, 508, 510, 511, 512, 513, 514, 515, 517, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 548, 549, 552, 554, 555, 556, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 572, 573, 574, 575, 576, 578, 579, 581, 583, 586, 587, 588, 590, 591, 592, 593, 594, 595, 596, 597, 602, 603, 604, 605, 606, 607, 608, 609, 610, 614, 615, 616, 617, 618, 620, 621, 623, 624, 626, 627, 629, 630, 631, 632, 633, 634, 638, 639, 641, 643, 645, 648, 649, 650, 652, 654, 656, 660, 661, 662, 664, 666, 668, 670, 671, 672, 673, 683, 684, 685, 686, 688, 689, 691, 692, 693, 695, 696, 697, 698, 702, 703, 706, 707, 708, 715, 716, 717, 718, 719, 726, \underline{731}, 732, \underline{736}, 746, 747.

cin: 732. : 106, 281, 523, 701. : \underline{62}, \underline{68}, 92, 100, 106,

117, 701. : 79, 80, 103. : 288, 418. clear : 97, 233, 459, 685, 689, 719. close: 233, 610, 732. : 270, 349. : 270, 347. close parenthesis str : \underline{130}, 153. CMutex: 25, 731. : \underline{255}. : \underline{255}, \underline{258}, 310, 316, 320, 324,

327, 332, 344, 353, 356. : \underline{255}, \underline{258}, 310, 313, 314, 319,

320, 323, 324, 326, 327, 331, 332, 343, 344, 351, 352, 355, 356.

: \underline{255}, \underline{258}, 310, 315, 320,

322, 324, 327, 332, 344, 353, 356. : \underline{255}. : \underline{255}, \underline{258}, 312, 313, 317, 321,

324, 328, 331, 343, 353, 355. : 270, 338. column: \underline{106}, 107. : 270, 340.

commands.w: 5, 8.

commands id string : \underline{598}. : 333, 334, 335, 336, 337,

338, 339, 340, 341, 342, 345, 346, 347, 348, 349, \underline{354}.

: 106, 281, 524, 701. : \underline{62}, \underline{68}, 92, 100, 106, 117, 701. : 79, 80, 103. compare: 245. const iterator: 97, 292, 688. : 276, 400. : \underline{82}, \underline{83}, 100, 128, 486. : 106, 281, 525, 701. : \underline{62}, \underline{68}, 92, 100, 106,

117, 701. : 79, 80, 103. : 106, 281, 409, 526, 701. : 61, \underline{62}, \underline{68}, 92, 100, 106,

117, 138, 701. : 79, 80, 103, 135, 136, 137,

138. : 108, 412. : 61, \underline{65}, \underline{71}, 92,

100, 106, 108, 136. : 79, 80, 103, 136. : 108, 412. : 61, \underline{65}, \underline{71}, 92,

100, 106, 108, 137. : 79, 80, 103, 137. : 108, 412. : 61, \underline{65}, \underline{71}, 92,

100, 106, 108, 135. : 79, 80, 103, 135. copyright tex str : \underline{18}, 610, 732, \underline{736}, 745, 747. cout mutex : \underline{18}, \underline{25}, \underline{731}, \underline{736}. create: \underline{236}, \underline{237}, 240, 243, 244, 245. : 106, 281, 409, 527, 701. : \underline{61}, \underline{62}, \underline{68}, 92, 100, 106, 117,

139, 701. : 79, 80, 103, 139. curr char : \underline{309}, 310, 311, 317, 318, 319, 320, 321,

322, 324, 325, 328, 329, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 353, 355.

curr datasource node: \underline{607}, \underline{638}. curr date time node: \underline{32}, \underline{33}, \underline{55}, \underline{226}, \underline{300}, \underline{608},

\underline{707}, 709, 710, 711. curr datetime node: \underline{660}. curr field type: \underline{701}, 702. curr float str : \underline{309}, 316, 320, 324, 327, 332,

344, 353, 356. curr id : \underline{309}, 313, 314, 319, 320, 323, 324, 326,

327, 331, 332, 343, 344, 351, 352, 355, 356, 357, 358, 359.

curr id node: \underline{55}, \underline{226}, \underline{237}, 238, 240, 242, 244, 245, \underline{299}, \underline{510}, 511, \underline{513}, 514, \underline{578}, \underline{579}, 580, \underline{581}, 582, \underline{583}, 584, \underline{606}, \underline{607}, \underline{608}, \underline{614}, \underline{638}, \underline{648}, \underline{660},

\underline{686}, 687, 688, 689, 691, \underline{693}, \underline{698}, 702, \underline{703}.

curr integer str : \underline{309}, 315, 320, 322, 324, 327,

332, 344, 353, 356. curr keyword : \underline{269}, 270, 271, 272, 273, 274, 275,

276, 277, 278, 279, 280, 281, 283, 284, 285, 286, 287, 288, 289, \underline{309}.

curr name: \underline{241}, 244, 245. curr name strm: \underline{241}. curr opt : \underline{746}. curr query : \underline{223}, 234, \underline{703}, 704, 705. curr query node: \underline{606}, \underline{614}, \underline{616}, \underline{617}, \underline{618}, \underline{698},

699, 701, 702. curr string : \underline{309}, 312, 313, 317, 321, 324, 328,

331, 343, 353, 355, \underline{579}, 580, \underline{581}, 582, \underline{583},

584, \underline{701}, \underline{702}.

curr token: \underline{307}, \underline{359}, \underline{457}. curr value: \underline{309}, 689. CWinApp: 732. d: \underline{32}, \underline{33}, \underline{40}, \underline{41}, \underline{42}, \underline{43}, \underline{55}, \underline{149}, \underline{179}, \underline{180}, \underline{226},

\underline{301}, \underline{587}, \underline{588}, \underline{662}, \underline{716}. : 275, 405, 406, 505, 507, 699. : 106, 281, 528, 701. : \underline{62}, \underline{68}, 92, 100,

106, 117, 701. : 79, 80, 103. database type: \underline{114}, \underline{127}, 130, 132, 133, 134, 135,

136, 137, 138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152.

: 277, 404. : 277, 406. : \underline{165}, \underline{166}, 181, 182, 576. Datasource Node: \underline{162}, \underline{163}, 179, 180, 572, 573,

574, 575, 576, 607, 638, 639. datasource type: 168, \underline{173}, \underline{174}. Datasource Type: 6, 8, \underline{162}, \underline{163}, 166, 167, 171,

\underline{172}, 174, 175, \underline{176}, 178, 179, 180, 182, 184, 573, 574, 575, 576, 638, 745.

: 287, 417, 449, 471. datasource type map: \underline{163}, \underline{167}, 182, 184. : \underline{165}, \underline{166}, 182. : 107, 285, 564. : 107, 285, 563. : 107, 285, 565.

date strm: \underline{127}, 149.
Date Time Node: \underline{32}, 33, 40, 41, 55, 92, 97,

112, 117, 149, 226, \underline{252}, 300, 301, 586, 587, 588, 608, 660, 661, 662, 703, 707, 716.

Date Time Type: 6, 8, \underline{32}, \underline{33}, 36, \underline{37}, 38, \underline{39}, 40, 41, 42, 43, 45, 97, \underline{252}, 660, 709, 720. : \underline{73}, \underline{74}, 97, 100, 112, 703. datestamp: \underline{610}. datetime assignment func 0 : \underline{32}, \underline{33}, \underline{55}, \underline{226}, \underline{300},

587, 588, \underline{707}, 715. datetime assignment func 1 : \underline{32}, \underline{33}, \underline{55}, \underline{226},

\underline{301}, 662, \underline{716}, 726. : 278, 404. : 287, 417, 453, 477, 513, 703. day : \underline{33}, 37, 39, 41, 43, 45, 149, 710, 711, 719, 722. : 279, 407, 594, 710, 711.

                                               dbcrprsr.w: 5, 8, \underline{363}.

dbcrprsr id string : \underline{363}.

                                               dbcrscan.web: 5, 8, \underline{381}.

: 277, 406.

: \underline{165}, \underline{166}, 181, 182, 573. : \underline{386}, \underline{387}, \underline{388}, \underline{389}. : 730. : \underline{732}. : \underline{41}, \underline{43}, \underline{91}, 93, \underline{96}, 97, \underline{106}, 108,

\underline{111}, 113, \underline{127}, 156, \underline{176}, 177, \underline{180}, \underline{203}, \underline{206}, \underline{209}, \underline{233}, \underline{235}, \underline{237}, 240, 241, 242, 243, 244, 245, \underline{306}, 307, 308, 309, 310, 312, 313, 315, 316, 317, 319, 320, 322, 323, 326, 327, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 351, 353, 354, 355, 356, 357, 358, 359, \underline{439}, \underline{457}, \underline{459}, \underline{460}, \underline{461}, \underline{463}, \underline{464}, \underline{465}, \underline{466}, \underline{468}, \underline{469}, \underline{471}, \underline{472}, \underline{474}, \underline{475}, \underline{477}, \underline{478}, \underline{482}, \underline{483}, \underline{485}, \underline{486}, \underline{487}, \underline{488}, \underline{490}, \underline{491}, \underline{493}, \underline{494}, \underline{495}, \underline{496}, \underline{497}, \underline{502}, \underline{503}, \underline{505}, \underline{506}, \underline{507}, \underline{508}, \underline{510}, 511, 512, \underline{513}, 514, 515, \underline{517}, \underline{519}, \underline{520}, \underline{521}, \underline{522}, \underline{523}, \underline{524}, \underline{525}, \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{538}, \underline{539}, \underline{540}, \underline{541}, \underline{542}, \underline{543}, \underline{544}, \underline{545}, \underline{546}, \underline{548}, \underline{549}, \underline{552}, \underline{554}, \underline{555}, \underline{556}, \underline{559}, \underline{560}, \underline{561}, \underline{562}, \underline{563}, \underline{564}, \underline{565}, \underline{566}, \underline{567}, \underline{568}, \underline{569}, \underline{570}, \underline{572}, \underline{573}, \underline{574}, \underline{575}, \underline{576}, \underline{578}, \underline{579}, \underline{581}, \underline{583}, \underline{586}, \underline{587}, \underline{588}, \underline{590}, \underline{591}, \underline{592}, \underline{593}, \underline{594}, \underline{595}, \underline{596}, \underline{597}, \underline{602}, \underline{603}, \underline{604}, \underline{605}, \underline{606}, \underline{607}, \underline{608}, \underline{609}, \underline{610}, \underline{614}, \underline{615}, \underline{616}, \underline{617}, \underline{618}, \underline{620}, \underline{621}, \underline{623}, \underline{624}, \underline{626}, \underline{627}, \underline{629}, \underline{630}, \underline{631}, \underline{632}, \underline{633}, \underline{634}, \underline{638}, \underline{639}, \underline{641}, \underline{643}, \underline{645}, \underline{648}, \underline{649}, \underline{650}, \underline{652}, \underline{654}, \underline{656}, \underline{660}, \underline{661}, \underline{662}, \underline{664}, \underline{666}, \underline{668}, \underline{670}, \underline{671}, \underline{672}, \underline{673}, \underline{683}, 686, 688, 689, \underline{691}, 693, \underline{695}, 698, 702, \underline{703}, 706, \underline{707}, 715, \underline{716}, 726, 732, \underline{745}, 746, 747, 748. declare variable func: \underline{55}, \underline{226}, \underline{296}, 447, 449,

451, 453, \underline{691}, 693.

                                               declrtns.w: 5, 8.

declrtns id string : \underline{434}. deque: 106, 517, 548, 549. : 106, 281, 529, 701. : \underline{62}, \underline{68}, 92, 100, 106, 117,

701. : 79, 80, 103. : 272, 401. : 271, 400, 714. : 280, 408.

dtsrcexp.w: 5.
dtsrcexp.web: 8.

dtsrcexp id string : \underline{636}.

dtsrctyp.web: 5, 8, \underline{159}.

: \underline{187}.

dttmexp.w: 5, 8.

dttmexp id string : \underline{658}.

dttmtype.web.web: 5, 8.
dttmtype.web: \underline{29}.

: 280, 408. : 107, 285, 560. : 107, 285, 559. : 107, 285, 561. : 280, 408. end : 97, 112, 117, 152, 233, 237, 239, 292, 357,

358, 359, 685, 686, 688, 689, 699, 719. : 274. end local query func: 55, 226, 304. : 388. end query func: \underline{55}, \underline{226}, \underline{304}. endl : 41, 43, 45, 91, 93, 96, 97, 104, 111, 112, 113,

117, 119, 127, 128, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152, 154, 155, 156, 172, 176, 177, 180, 184, 203, 206, 209, 233, 235, 237, 238, 240, 241, 242, 243, 244, 245, 292, 307, 308, 310, 312, 313, 315, 316, 317, 319, 320, 322, 323, 326, 327, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 351, 353, 354, 355, 356, 357, 358, 359, 373, 375, 376, 378, 386, 387, 388, 389, 421, 426, 427, 428, 429, 436, 437, 438, 439, 442, 443, 444, 445, 457, 459, 460, 461, 463, 464, 465, 466, 468, 469, 471, 472, 474, 475, 477, 478, 482, 483, 485, 486, 487, 488, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 502, 503, 505, 506, 507, 508, 510, 511, 512, 513, 514, 515, 517, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 548, 549, 552, 554, 555, 556, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 572, 573, 574, 575, 576, 578, 579, 581, 583, 586, 587, 588, 590, 591, 592, 593, 594, 595, 596, 597, 602, 603, 604, 605, 606, 607, 608, 609, 610, 614, 615, 616, 617, 618, 620, 621, 623, 624, 626, 627, 629, 630, 631, 632, 633, 634, 638, 639, 641, 643, 645, 648, 649, 650, 652, 654, 656, 660, 661, 662, 664, 666, 668, 670, 671, 672, 673, 683, 684, 685, 686, 688, 689, 691, 692, 693, 695, 696, 697, 698, 702, 703, 706, 707, 708, 715, 716, 717, 718, 719, 726, 732, 745, 746, 747.

envp: 732. : 309, 310. : 288, 418, 603, 604. : 106, 281, 530,

701. : \underline{62}, \underline{68},

92, 100, 106, 117, 701. : 79, 80, 103. expression: \underline{627}. f: \underline{671}, \underline{673}. false: 87, 88, 105, 132, 133, 134, 135, 136, 137,

138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152, 236, 240, 243, 245, 621, 624, 627.

ffield : \underline{88}.

ffield type: \underline{88}, \underline{89}. : 280, 408. field flags : 114, 127, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152, 582, 584.

field specifier : \underline{55}, 106, 107, \underline{226}, \underline{299}, \underline{703}.

field type: \underline{53}, 57, 61, 87, 90, 92, 97, 106, 107, 108, 112, 117, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 144, 145, 146, 147, 148, 149, 150, 152, 701, 702.

field type map: \underline{53}, \underline{81}, 99, 100, 112, 117, 131. find : 237, 357, 684, 699. : 310, \underline{353}. first : 719, 725. first from: \underline{114}, \underline{127}, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152, \underline{582}, \underline{584}.

first select : \underline{114}, \underline{127}, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152, \underline{582}, \underline{584}.

first where: \underline{114}, \underline{127}, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152, \underline{582}, \underline{584}.

fixed : 149. flip: 745. : 273, 307, 316, 320, 327, 332, 344, 353, 356,

588, 671, 673, 710, 711, 719, 725. : \underline{73}, \underline{74}, 97, 100, 112, 618. float value: 307, 316, 320, 327, 332, 344, 353,

356, \underline{368}, \underline{396}. float vector : \underline{223}, 241, 459, 461, 685, 688, 689. fopen: 745. : 280, 408. fp: \underline{745}. : 276, 400. : \underline{82}, \underline{83}, 100, 128, 487. from strm: \underline{114}, \underline{127}, 132, 133, 134, 135, 136, 137,

138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152, 154, \underline{581}, 582, \underline{583}, 584.

: 277, 406. : \underline{165}, \underline{166}, 181, 182, 574. GCC. See “GNU Compiler Collection”: 6. generate sql string : 6, 8, \underline{114}, \underline{127}, 152, 156,

582, 584. generate tex string : \underline{110}, \underline{111}, 112, 113, 580. get : 309, 310, 328, 333, 334, 335, 336, 337. getchar : 104, 127, 578, 604, 605, 715, 745, 747. GetCommandLine: 732. GetModuleHandle: 732. getopt : 9, 746. : 106, 284, 412, 555. GNU Compiler Collection: 6. group statement : 430.

grpstmnt.w: 5, 8.

grpstmnt id string : \underline{431}. hour : \underline{33}, 37, 39, 41, 43, 45, 149, 710, 711, 719, 723. : 279, 407, 595, 710, 711. : 268, 270, 342, 399. i: \underline{112}, \underline{117}, \underline{152}, \underline{241}, \underline{670}, \underline{672}, \underline{688}, \underline{745}. : 107, 283, 415, 552. id iter : \underline{357}, 358, 359. id map: \underline{223}, 233, 237, 239, 240, 314, 324, 327,

332, 344, 352, 356, 357, 358, 359, 444, 684, 685, 686, 689, 693.

id node: \underline{53}, 87, \underline{502}, 510, \underline{572}, \underline{573}, \underline{574}, \underline{575}, \underline{576},

\underline{586}, \underline{587}, \underline{588}, 698, 702, 703. Id Node: \underline{52}, 53, 55, \underline{162}, \underline{191}, 192, \underline{216}, 226,

236, 237, \underline{252}, 296, 299, 447, 451, 468, 469, 471, 472, 474, 475, 478, 502, 510, 513, 572, 573, 574, 575, 576, 578, 579, 581, 583, 586, 587, 588, 606, 607, 608, 614, 638, 648, 660, 684, 686, 691, 693, 698, 703.

id string : \underline{9}, \underline{22}, \underline{29}, \underline{49}, \underline{124}, \underline{159}, \underline{188}, \underline{213}, \underline{249},

\underline{381}, \underline{678}, \underline{729}, \underline{734}. Id Type: 6, 8, \underline{52}, \underline{162}, \underline{191}, \underline{192}, 193, 194, 195,

199, \underline{200}, 202, \underline{203}, 206, 209, \underline{216}, 223, 233, 240, 244, 245, \underline{252}, 357, 444, 468, 471, 474, 477, 579, 581, 583, 693, 745.

: 107, 285, 562. : 106, 281, 531, 701. : \underline{62}, \underline{68}, 92, 100, 106, 117, 701. : 79, 80, 103.

idtype.web.web: 5, 8.
idtype.web: \underline{188}.

: 280, 408. ifstream: 25, 223, 731. in filename: \underline{223}, 308, 732, 747. in strm: \underline{25}, \underline{223}, 233, 309, 310, 315, 316, 320,

327, 328, 332, 333, 334, 335, 336, 337, 344, 353, 356, 358, 359, \underline{731}, 732, 745, 747.

initialize flags : \underline{101}, \underline{102}, 104, 745. initialize id map: \underline{234}, \underline{235}, 745, 748. initialize keyword map: 732. initialize maps : \underline{268}, \underline{269}, 289, 745. initialize subtype map: 195, \underline{205}, \underline{206}, 745. initialize type maps : \underline{99}, \underline{100}, \underline{181}, \underline{182}, 745. inner mutex : 12, 14, 16. : 106, 281, 532, 701. : \underline{62}, \underline{68}, 92, 100, 106, 117,

701. : 79, 80, 103. : \underline{73}, \underline{74}, 97, 100, 112, 617. int value: 220, 307, 315, 320, 327, 332, 353, 356,

359, \underline{368}, 386, 387, 388, \underline{396}. : 273, 307, 315, 320, 327, 332, 353, 356,

587, 670, 672, 710, 711, 719. is open: 118, 119, 184, 233, 235. isalpha: 318, 321. isdigit : 322, 324. isspace: 350, 353. iter : \underline{97}, \underline{112}, \underline{117}, \underline{152}, \underline{233}, \underline{237}, 239, \underline{292}, \underline{684},

685, 686, 687, 688, 689, \underline{719}. iterator: 112, 117, 152, 233, 237, 357, 684, 719. j: \underline{241}. keyword iter : \underline{357}, 359. keyword map: \underline{263}, \underline{264}, 270, 271, 272, 273, 274,

275, 276, 277, 278, 279, 280, 281, 283, 284, 285, 286, 287, 288, 289, 292, 312, 314, 324, 327, 332, 344, 352, 356, 357, 359.

Keyword Type: \underline{259}, \underline{261}, 263, 264, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 283, 284, 285, 286, 287, 288, 289, 292, 357.

: 106, 281, 533, 701. : \underline{62}, \underline{68}, 92, 100, 106, 117, 701. : 79, 80, 103. left : \underline{192}, 200, 203, 242, 244, 245. level ctr : \underline{115}. : 276, 400. : \underline{82}, \underline{83}, 100, 128, 488. : 275, 406, 505, 506, 699. : \underline{75}, \underline{76}, 100, 699. : \underline{75}, \underline{76}, 100, 699. local time: \underline{610}. localtime: 610. location: 732. lock : \underline{13}, \underline{14}, 41, 43, 91, 93, 96, 97, 111, 113, 118,

119, 127, 128, 130, 156, 176, 177, 180, 184, 203, 206, 209, 233, 235, 237, 238, 240, 241, 242, 243, 244, 245, 292, 307, 308, 309, 310, 312, 313, 315, 316, 317, 319, 320, 322, 323, 326, 327, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 351, 353, 354, 355, 356, 357, 358, 359, 389, 436, 437, 438, 439, 442, 443, 444, 445, 457, 459, 460, 461, 463, 464, 465, 466, 468, 469, 471, 472, 474, 475, 478, 482, 483, 485, 486, 487, 488, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 502, 503, 505, 506, 507, 508, 510, 511, 512, 513, 514, 515, 517, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 548, 549, 552, 554, 555, 556, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 572, 573, 574, 575, 576, 578, 579, 581, 583, 586, 587, 588, 590, 591, 592, 593, 594, 595, 596, 597, 602, 603, 604, 605, 606, 607, 608, 609, 610, 614, 615, 616, 617, 618, 620, 621, 623, 624, 626, 627, 629, 630, 631, 632, 633, 634, 638, 639, 641, 643, 645, 648, 649, 650, 652, 654, 656, 660, 661, 662, 664, 666, 668, 670, 671, 672, 673, 683, 684, 685, 686, 688, 689, 691, 692, 693, 695, 696, 697, 698, 702, 703, 706, 707, 708, 715, 716, 717, 718, 719, 726, 732, 746, 747.

log filename: \underline{223}, 747. log strm: \underline{25}, 90, 96, 97, 111, 113, 118, 119, 127,

128, 130, 156, 180, 184, 203, 206, 209, \underline{223}, 233, 235, 237, 238, 240, 241, 242, 243, 244, 245, 292, 307, 308, 309, 310, 312, 313, 315, 316, 317, 319, 320, 322, 323, 326, 327, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 351, 353, 354, 355, 356, 357, 358, 359, 421, 426, 427, 428, 429, 436, 437, 438, 439, 442, 443, 444, 445, 457, 459, 460, 461, 463, 464, 465, 466, 468, 469, 471, 472, 474, 475, 478, 482, 483, 485, 486, 487, 488, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 502, 503, 505, 506, 507, 508, 510, 511, 512, 513, 514, 515, 517, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 548, 549, 552, 554, 555, 556, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 572, 573, 574, 575, 576, 578, 579, 581, 583, 586, 587, 588, 590, 591, 592, 593, 594, 595, 596, 597, 602, 603, 604, 605, 606, 607, 608, 609, 610, 614, 615, 616, 617, 618, 620, 621, 623, 624, 626, 627, 629, 630, 631, 632, 633, 634, 638, 639, 641, 643, 645, 648, 649, 650, 652, 654, 656, 660, 661, 662, 664, 666, 668, 670, 671, 672, 673, 683, 685, 686, 688, 689, 691, 693, 695, 697, 698, 702, 703, 706, 707, 708, 715, 716, 717, 718, 719, 726, \underline{731}, 732, 745, 746, 747.

log strm mutex : \underline{25}, \underline{731}, 732. lookup: \underline{236}, \underline{237}, 245, 688. lvalp: 394. main: 6, 8, 195, \underline{224}, \underline{745}, 748. main.web: 5, 8, \underline{734}. : 106, 281, 409, 534, 701. : 61, \underline{62}, \underline{68}, 92, 99, 100, 105, 106, 117, 141, 142, 701. : 79, 80, 103, 114,

126, 142. : \underline{353}, 355. make pair : 670, 671, 672, 673. map: 53, 81, 163, 167, 192, 195, 223, 233, 237,

263, 264, 266, 267, 292, 357, 684. match str : \underline{128}, 132, 133, 134, 135, 136, 137,

138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152.

match term optional : \underline{55}, \underline{226}, \underline{299}, \underline{703}, 705. match value: \underline{53}, 82, 87, 89, 98, 117, 128, 705. match value map: \underline{53}, \underline{81}, 99, 100, 117. match values : 53. : 288, 418, 602. Microsoft Visual Studio: 6. : 272, 401. : 271, 400, 712. : 279, 407, 596, 710, 711. minute: \underline{33}, 37, 39, 41, 43, 45, 149, 710, 711,

719, 724. month: \underline{33}, 37, 39, 41, 43, 45, 149, 710, 711,

719, 721. : 279, 407, 593, 710, 711. mutex. See CMutex: 3. Mutex Type: \underline{12}, 14, 16, 18, 389, 736. name: \underline{53}, \underline{55}, 97, 112, 117, \underline{163}, \underline{192}, 200, 203,

209, \underline{226}, \underline{236}, \underline{237}, 240, 241, 242, 244, 245, \underline{261}, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 283, 284, 285, 286, 287, 288, 289, 292, \underline{295}, \underline{296}, 510, \underline{683}, 684, 685, 686, 687, 688, \underline{691}, 693, 698, 702, 703.

negate: \underline{55}, \underline{226}, \underline{298}, \underline{695}, 701, 702.
negated : \underline{53}, 87, 97, 112, 130, 621, 624, 627,

701, 702, 703. negation optional : \underline{55}, \underline{226}, \underline{299}, \underline{703}. next : \underline{53}. next char : \underline{309}, 333, 334, 335, 336, 337. nnegated : \underline{88}, \underline{89}. : 30, 50, 125, 160, 189, 214, 250,

393, 679.

nonwin.web: 5, 8, \underline{9}.

: 280, 337, 408. : 271, 337, 400, 497. nRetCode: \underline{732}. : 78, 80, 132, 133, 134, 135, 136,

137, 138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152.

: \underline{255}, \underline{258}, 306, 310, 313, 319, 322, 331, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 345, 346, 347, 348, 349, 351.

: 236, 268, 287, 417. : 130, 138, 139, 140, 152, 288, 418, 582. object : \underline{55}, \underline{226}, \underline{298}, \underline{695}, 697, 698. ofstream: 18, 25, 223, 731, 736. once: 23, 31, 51, 161, 190, 215, 251, 680. oor node: \underline{88}, \underline{89}. op: \underline{32}, \underline{33}, \underline{55}, \underline{226}, \underline{300}, \underline{301}, \underline{707}, 710, 711, 712,

713, 714, 715, \underline{716}. open: 610, 732, 747. : 270, 348. : 270, 346. open parenthesis str : \underline{130}, 132, 133, 134, 135,

136, 137, 138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152.

optind : 747. : 280, 335, 408, 631. : 271, 335, 400, 495, 702, 703. or node: \underline{53}, 87, 92, 97, 108, 112, 119, 130, 152,

627, 702, 703. : 280, 335, 408, 627, 632. or or or not : 628. : \underline{59}, \underline{60}, 100, 130, 627, 702, 703. ostream: \underline{33}, 42, \underline{43}. : 288, 418. pair: 670, 671, 672, 673, 717, 719. parameter : \underline{305}, \underline{306}, 365, \underline{394}, 421, 426, 427, 428,

429, 436, 437, 438, 439, 442, 443, 444, 445, 447, 449, 451, 453, 457, 459, 460, 461, 463, 464, 465, 466, 468, 469, 471, 472, 474, 475, 477, 478, 482, 483, 485, 486, 487, 488, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 502, 503, 505, 506, 507, 508, 510, 513, 517, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 548, 549, 552, 554, 555, 556, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 572, 573, 574, 575, 576, 578, 579, 581, 583, 586, 587, 588, 590, 591, 592, 593, 594, 595, 596, 597, 602, 603, 604, 605, 606, 607, 608, 609, 610, 614, 615, 616, 617, 618, 620, 621, 623, 624, 626, 627, 629, 630, 631, 632, 633, 634, 638, 639, 641, 643, 645, 648, 649, 650, 652, 654, 656, 660, 661, 662,

664, 666, 668, 670, 671, 672, 673, 676. parser.w: 5, 8, \underline{392}. parser id string : \underline{392}. : 288, 418. peek : 333, 334, 335, 336, 337. : 268, 270, 341, 399. : 270, 343. : 106, 281, 535, 701. : \underline{62}, \underline{68}, 92, 100,

106, 117, 701. : 79, 80, 103. : 106, 281, 536, 701. : \underline{62}, \underline{68}, 92, 100, 106, 117, 701. : 79, 80, 103. : 106, 281, 537, 701. : \underline{62}, \underline{68}, 92, 100,

106, 117, 701. : 79, 80, 103. : 132, 133, 134, 135, 136, 137, 142, 144, 145,

146, 147, 148, 149, 151, 288, 418, 584. : 272, 333, 401. : 271, 333, 400, 491, 494, 702,

703, 711. pointer value: 307, 359, \underline{368}, \underline{396}, 689. pop: 307, 312. pow : 745. : \underline{193}, \underline{194}, 206. : 106, 284, 412, 556. primary : \underline{621}.

prsrfncs.web: \underline{678}.

pthread mutex init : 12. pthread mutex lock : 14. pthread mutex t : 12. pthread mutex unlock : 16. : 106, 281, 538, 701. : \underline{62}, \underline{68}, 92, 100, 106, 117, 701. : 79, 80, 103. push: 313, 317, 359, 457, 689. push back : 97, 461, 549, 670, 671, 672, 673, 699. push front : 517. q: \underline{95}, \underline{96}, \underline{98}, \underline{579}, \underline{581}, \underline{583}, \underline{615}, \underline{639}, \underline{661}. qquery type: \underline{88}, \underline{89}.

qtgensql.web: 5, 8, \underline{124}.

query assignment func 0 : \underline{55}, \underline{226}, \underline{298}, 505, 506,

507, 508, \underline{695}, 702. query assignment func 1 : \underline{55}, \underline{226}, \underline{299}, 510, 511,

513, 514, \underline{703}, 706. query ctr : \underline{53}, \underline{54}, 87, 96, 111, 112, 127, 131, 152,

153, 154, 155, 621, 624, 627, 702, 703. : 275. query node: \underline{229}.

Query Node: \underline{17}, \underline{52}, \underline{53}, 88, 89, 92, 95, 96, 203, \underline{216}, 223, 229, \underline{252}, 502, 579, 581, 583, 606, 614, 615, 616, 617, 618, 621, 624, 627, 698, 703.

Query Nodes: 115. : 203, 287, 417, 447, 468, 510, 703. query type: \underline{53}, 57, 59, 87, 97, 112, 117, 127, 130,

621, 624, 627, 698, 701, 702, 703. Query Type: 6, 8, \underline{17}, \underline{32}, \underline{33}, \underline{52}, \underline{53}, 58, 60, 68,

70, 71, 72, 74, 76, 80, 81, 83, 86, \underline{87}, 89, 90, \underline{91}, 94, 95, 96, 97, 98, 100, 102, 104, 106, 108, 111, 113, 115, 116, 120, 127, 156, \underline{216}, \underline{252}, 485, 486, 487, 488, 614, 616, 617, 618, 621, 624, 627, 698, 699, 701, 702, 703, 745.

: \underline{77}, 78, 79, 80, 104,

114, 127, 582, 584. query type map: \underline{53}, \underline{81}, 100, 112, 117, 127. : \underline{57}, \underline{58}, 87, 89, 97, 100,

108, 128, 485, 701. query type str : \underline{129}, 130, 132, 133, 134, 135, 136,

137, 138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152.

: \underline{73}, \underline{74}, 97, 100, 112,

117, 152, 616, 701, 702.

queryexp.w: 5, 8.

queryexp id string : \underline{612}.

querytyp.web: 5, 8, \underline{49}.

: \underline{123}. r: \underline{582}, \underline{584}. : 107, 281, 539, 701. : \underline{66},

\underline{72}, 92, 100, 107, 117. : 79,

80, 103. : \underline{66}, \underline{72},

92, 100, 107, 117. : 79, 80, 103. : \underline{66}, \underline{72}, 92,

100, 107, 117, 149. : 79, 80,

103, 149. : \underline{66},

\underline{72}, 92, 107, 117, 146. : 79,

80, 103, 146. : \underline{66}, \underline{72},

92, 107, 117, 145. : 79, 80,

103, 145. : \underline{66}, \underline{72}, 92,

100, 107, 117, 147. : 79, 80, 103, : 387. : \underline{62}, \underline{68}, 92, 100, 107, 117, 701. : 79, 80, 103, 144, 145, 146, 147,

148, 149. : \underline{66}, \underline{72}, 92, 107, 117, 144. : 79, 80, 103, 144. : \underline{66}, \underline{72},

92, 100, 107, 117, 148. : 79, 80,

103, 148. : \underline{66}, \underline{72}, 92, 107, 117. : 79, 80, 103. : 386. : \underline{66}, \underline{72},

92, 107, 117. : 79, 80,

103. : \underline{66}, \underline{72},

92, 107, 117. : 79, 80, 103. : \underline{66},

\underline{72}, 92, 107, 117. : 79,

80, 103. : \underline{66},

\underline{72}, 92, 107, 117. : 79,

80, 103. : 275, 507, 508, 699. : 108, 281, 540, 701. : \underline{62}, \underline{68}, 92, 100, 108,

117, 701. : 79, 80, 103. : \underline{75}, \underline{76}, 100, 699. : \underline{75}, \underline{76}, 100, 699. return str : \underline{114}, \underline{127}, 130, 152, 156. right : 149, \underline{192}, 200, 203, 245. : 108, 281, 541, 701. : \underline{62}, \underline{68}, 92, 100, 108, 117, 701. : 79, 80, 103. s: \underline{44}, \underline{45}, \underline{115}, \underline{116}, \underline{183}, \underline{184}, \underline{205}, \underline{206}, \underline{209}, \underline{366},

\underline{395}, \underline{740}, \underline{741}, \underline{743}, \underline{744}. Scan Parse: \underline{32}, 33, 55, \underline{122}, \underline{158}, \underline{186}, 203, 209,

226, 238, \underline{248}, \underline{255}, \underline{256}, 259, 269, 289, 292, 303, 304, \underline{306}, 447, 449, 451, 453, 457, 510, 511, 514, 683, 689, 691, 693, 695, 702, 703, 706, 707, 715, 716, 726, \underline{728}, \underline{732}, \underline{745}.

scanner : 745.

scanner.web: 5, 8, \underline{249}.

Scanner Node: \underline{17}, \underline{52}, 54, 55, 88, 89, 105, 106, 110, 111, 114, 115, 116, 127, \underline{162}, 163, 173, 174, 183, 184, \underline{191}, 192, 198, 205, 206, \underline{216}, 223, 226, \underline{252}, 299, 421, 426, 427, 428, 429, 436, 437, 438, 439, 442, 443, 444, 445, 457, 459, 460, 461, 463, 464, 465, 466, 468, 469, 471, 472, 474, 475, 477, 478, 482, 483, 485, 486, 487, 488, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 502, 503, 505, 506, 507, 508, 510, 513, 517, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 548, 549, 552, 554, 555, 556, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 572, 573, 574, 575, 576, 578, 579, 581, 583, 586, 587, 588, 590, 591, 592, 593, 594, 595, 596, 597, 602, 603, 604, 605, 606, 607, 608, 609, 610, 614, 615, 616, 617, 618, 620, 621, 623, 624, 626, 627, 629, 630, 631, 632, 633, 634, 638, 639, 641, 643, 645, 648, 649, 650, 652, 654, 656, 660, 661, 662, 664, 666, 668, 670, 671, 672, 673, 683, 691, 695, 703, 707, 716, 745.

scanner node: \underline{54}, \underline{55}, 87, 90, 94, 96, 97, 108, \underline{110}, \underline{111}, 112, 113, \underline{114}, \underline{115}, 116, 118, 119, \underline{127}, 128, 130, 152, 156, \underline{163}, 178, 180, 184, \underline{192}, \underline{198}, 200, 203, 209, \underline{226}, \underline{291}, \underline{292}, \underline{299}, \underline{306}, 307, 308, 309, 310, 312, 313, 315, 316, 317, 319, 320, 322, 323, 326, 327, 328, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 351, 353, 354, 355, 356, 357, 358, 359, \underline{421}, \underline{426}, \underline{427}, \underline{428}, \underline{429}, \underline{436}, \underline{437}, \underline{438}, \underline{439}, \underline{442}, \underline{443}, \underline{444}, \underline{445}, \underline{457}, \underline{459}, \underline{460}, \underline{461}, \underline{463}, \underline{464}, \underline{465}, \underline{466}, \underline{468}, \underline{469}, \underline{471}, \underline{472}, \underline{474}, \underline{475}, \underline{477}, \underline{478}, \underline{482}, \underline{483}, \underline{485}, \underline{486}, \underline{487}, \underline{488}, \underline{490}, \underline{491}, \underline{493}, \underline{494}, \underline{495}, \underline{496}, \underline{497}, \underline{498}, \underline{499}, \underline{500}, \underline{502}, \underline{503}, \underline{505}, \underline{506}, \underline{507}, \underline{508}, \underline{510}, 511, 512, \underline{513}, 514, 515, \underline{517}, \underline{519}, \underline{520}, \underline{521}, \underline{522}, \underline{523}, \underline{524}, \underline{525}, \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{538}, \underline{539}, \underline{540}, \underline{541}, \underline{542}, \underline{543}, \underline{544}, \underline{545}, \underline{546}, \underline{548}, \underline{549}, \underline{552}, \underline{554}, \underline{555}, \underline{556}, \underline{559}, \underline{560}, \underline{561}, \underline{562}, \underline{563}, \underline{564}, \underline{565}, \underline{566}, \underline{567}, \underline{568}, \underline{569}, \underline{570}, \underline{572}, \underline{573}, \underline{574}, \underline{575}, \underline{576}, \underline{578}, \underline{579}, 580, \underline{581}, 582, \underline{583}, 584, \underline{586}, \underline{587}, \underline{588}, \underline{590}, \underline{591}, \underline{592}, \underline{593}, \underline{594}, \underline{595}, \underline{596}, \underline{597}, \underline{602}, \underline{603}, \underline{604}, \underline{605}, \underline{606}, \underline{607}, \underline{608}, \underline{609}, \underline{610}, \underline{614}, \underline{615}, \underline{616}, \underline{617}, \underline{618}, \underline{620}, \underline{621}, \underline{623}, \underline{624}, \underline{626}, \underline{627}, \underline{629}, \underline{630}, \underline{631}, \underline{632}, \underline{633}, \underline{634}, \underline{638}, \underline{639}, \underline{641}, \underline{643}, \underline{645}, \underline{648}, \underline{649}, \underline{650}, \underline{652}, \underline{654}, \underline{656}, \underline{660}, \underline{661}, \underline{662}, \underline{664}, \underline{666}, \underline{668}, \underline{670}, \underline{671}, \underline{672}, \underline{673}, \underline{683}, 684, 685, 686, 688, 689, \underline{691}, 692, 693, \underline{695}, 696, 697, 698, 702, \underline{703}, 706, \underline{707}, 708, 715, \underline{716}, 717, 718, 719, 726, \underline{732}, \underline{745}, 746, 747, 748.

Scanner Type: 6, 8, \underline{17}, \underline{52}, \underline{162}, \underline{191}, \underline{192}, \underline{216}, \underline{223}, 230, \underline{231}, 232, \underline{233}, 235, 237, 245, \underline{252}, 291, 292, 306, 732, 745.

scantest.web: 5, 8, \underline{729}.
scnrtype.web: 5, 8, \underline{213}.

: \underline{248}.

: 279, 407, 597, 710, 711.

second : \underline{33}, 37, 39, 41, 43, 45, 149, 233, 237, 292, 359, 687, 688, 710, 711, 719, 720, 721, 722, 723, 724, 725.

secondary : \underline{621}, \underline{624}.

select strm: \underline{114}, \underline{127}, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152, 154, \underline{581}, 582, \underline{583}, 584.

: 270, 339.

: 275, 405, 406, 506, 508, 699.

set: \underline{88}, \underline{89}, \underline{173}, \underline{174}.

set field specifier : \underline{105}, \underline{106}, 108, 703.

set field type: 105.

setfill : 149.

setprecision: 149.

setw : 149.

shift value: \underline{102}, 103, 104.

shorts : \underline{61}, \underline{75}, \underline{82}, \underline{90}, \underline{99}, \underline{105}, \underline{114}, \underline{117}, \underline{126},

\underline{193}, \underline{194}. show : \underline{44}, \underline{45}, \underline{115}, \underline{116}, 119, 120, \underline{183}, \underline{184},

\underline{208}, \underline{209}, 468, 469, 471, 472, 474, 475, 478, 606, 607, 608.

: 288, 418.

show keyword map: \underline{291}, \underline{292}, 732, 748.

size: 106, 107, 112, 152, 307, 688, 718, 719, 721,

722, 723, 724, 725. : 108, 281, 542, 701. : \underline{62}, \underline{68}, 92, 100, 108, 117, 701. : 79, 80, 103. : 107, 285, 566. specifier : \underline{32}, \underline{33}, \underline{55}, \underline{226}, \underline{300}, \underline{707}, 710, 711. : 288, 418. : \underline{193}, \underline{194}, 206, 581, 583. sql strm: \underline{114}, \underline{127}, 152, 154, 155, 156. sscanner node: \underline{88}, \underline{89}, \underline{105}, \underline{106}, \underline{115}, \underline{116}, 119,

\underline{173}, \underline{174}, \underline{183}, \underline{184}.

stack : 223, 306. : 274. start local database query func: \underline{55}, \underline{226}, \underline{303}. start local query func: 55, 226, 303. state: \underline{306}, 310, 312, 313, 314, 315, 316, 317, 319, 320, 321, 322, 323, 324, 326, 327, 328, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 351, 352, 353, 355, 356. state stack : 306, 312, 313, 317. status : \underline{510}, 511, \underline{513}, 514, \underline{732}, \underline{745}, 748. std: \underline{20}, \underline{21}, \underline{47}, \underline{48}, \underline{122}, \underline{123}, \underline{158}, \underline{186}, \underline{187},

\underline{211}, \underline{212}, \underline{247}, \underline{248}, \underline{361}, \underline{362}, \underline{379}, \underline{390}, \underline{728},

\underline{732}, \underline{733}, \underline{750}.

                                           stdafx.web: 5, 8, \underline{22}.

str : 41, 43, 45, 91, 93, 96, 97, 111, 113, 118, 119, 127, 128, 130, 149, 154, 155, 156, 176, 177, 180, 184, 203, 206, 209, 233, 235, 237, 238, 240, 241, 242, 243, 244, 245, 292, 307, 308, 309, 310, 312, 313, 315, 316, 317, 319, 320, 322, 323, 326, 327, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 351, 353, 354, 355, 356, 357, 358, 359, 421, 426, 427, 428, 429, 436, 437, 438, 439, 442, 443, 444, 445, 457, 459, 460, 461, 463, 464, 465, 466, 468, 469, 471, 472, 474, 475, 478, 482, 483, 485, 486, 487, 488, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 502, 503, 505, 506, 507, 508, 510, 511, 512, 513, 514, 515, 517, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 548, 549, 552, 554, 555, 556, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 572, 573, 574, 575, 576, 578, 579, 580, 581, 582, 583, 584, 586, 587, 588, 590, 591, 592, 593, 594, 595, 596, 597, 602, 603, 604, 605, 606, 607, 608, 609, 610, 614, 615, 616, 617, 618, 620, 621, 623, 624, 626, 627, 629, 630, 631, 632, 633, 634, 638, 639, 641, 643, 645, 648, 649, 650, 652, 654, 656, 660, 661, 662, 664, 666, 668, 670, 671, 672, 673, 683, 684, 685, 686, 688, 689, 691, 692, 693, 695, 696, 697, 698, 702, 703, 706, 707, 708, 715, 716, 717, 718, 719, 726, 732, 746, 747.

strcat : 443, 444, 460, 461. strchar : 240, 241, 245. strchr : 240, 687, 688. strcpy : 307, 312, 358, 442, 459, 460, 578, 579,

580, 581, 582, 583, 584, 648, 649, 650, 652, 654, 656, 732, 747.

: 273, 307, 312. string: 18, 44, 45, 53, 81, 90, 92, 97, 110, 111,

112, 114, 115, 116, 117, 127, 128, 129, 130, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 148, 151, 152, 163, 167, 183, 184, 192, 193, 195, 208, 209, 223, 233, 237, 241, 261, 263, 264, 266, 267, 292, 309, 357, 578, 579, 581, 583, 616, 648, 684, 701, 702, 736.

: 275, 404. : 287, 417, 451, 474. string value: 307, 312, 358, \underline{368}, \underline{396}. strings : 192. strings id string : \underline{646}. stringstream: 41, 43, 45, 91, 96, 106, 110, 111,

114, 116, 127, 176, 180, 184, 203, 206, 209, 233, 235, 237, 241, 292, 306, 579, 580, 581, 583, 610, 676, 683, 691, 695, 703, 707, 716, 745.

strlen: 241.

: 108, 281, 409, 543, 701.

: 61, \underline{62}, \underline{68}, 92, 100, 108, 117,

150, 152, 701. : 79, 80, 103, 151, 152. subscript iter : \underline{688}. subtype: \underline{192}, 200, 209, 579, 581, 583. subtype map: \underline{192}, \underline{195}, 206, 209. : 108, 281, 544, 701. : \underline{62}, \underline{68}, 92,

100, 108, 117, 701. : 79, 80, 103. : 106, 284, 412, 554. table: \underline{106}, 107, 108. target type: 57, \underline{89}, 117. target type map: \underline{53}, \underline{81}, 99, 100, 112, 117, 152. target types : \underline{53}, 75, 97, 112, 117, 152, 699. : 732. temp filename: \underline{610}. temp query : \underline{703}. temp strm: \underline{41}, \underline{43}, \underline{45}, \underline{91}, 93, \underline{96}, 97, \underline{106}, \underline{111},

113, \underline{116}, 117, 118, 119, \underline{127}, 128, 130, 152, 155, 156, \underline{176}, 177, \underline{180}, \underline{184}, \underline{203}, \underline{206}, \underline{209}, \underline{233}, \underline{235}, \underline{237}, 238, 240, 241, 242, 243, 244, 245, \underline{292}, \underline{306}, 307, 308, 309, 310, 312, 313, 315, 316, 317, 319, 320, 322, 323, 326, 327, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 351, 353, 354, 355, 356, 357, 358, 359, 421, 426, 427, 428, 429, 436, 437, 438, 439, 442, 443, 444, 445, 457, 459, 460, 461, 463, 464, 465, 466, 468, 469, 471, 472, 474, 475, 477, 478, 482, 483, 485, 486, 487, 488, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 502, 503, 505, 506, 507, 508, 510, 511, 512, 513, 514, 515, 517, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 548, 549, 552, 554, 555, 556, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 572, 573, 574, 575, 576, 578, 579, 581, 583, 586, 587, 588, 590, 591, 592, 593, 594, 595, 596, 597, 602, 603, 604, 605, 606, 607, 608, 609, 610, 614, 615, 616, 617, 618, 620, 621, 623, 624, 626, 627, 629, 630, 631, 632, 633, 634, 638, 639, 641, 643, 645, 648, 649, 650, 652, 654, 656, 660, 661, 662, 664, 666, 668, 670, 671, 672, 673, \underline{676}, \underline{683}, 684, 685, 686, 688, 689, \underline{691}, 692, 693, \underline{695}, 696, 697, 698, 702, \underline{703}, 706, \underline{707}, 708, 715, \underline{716}, 717, 718, 719, 726, 732, \underline{745}, 746, 747.

temp val : \underline{745}.

: 289, 732. tertiary : \underline{624}, \underline{627}. : 288, 418. tex file ctr : \underline{18}, 610, \underline{736}, \underline{745}. tex file strm: \underline{18}, 610, \underline{736}. tex filename str : \underline{18}, 610, \underline{736}, 745. tex mutex : \underline{18}, 610, \underline{736}. : \underline{193}, \underline{194}, 206, 579. tex strm: \underline{110}, \underline{111}, 112, 113, \underline{579}, \underline{580}, \underline{581},

582, \underline{583}, 584. theApp: \underline{732}. this : 41, 96, 97, 98, 180, 234. time: 610. time mutex : \underline{18}, 610, \underline{736}. : 272, 401. : 271, 400, 713. : 277, 406. : \underline{165}, \underline{166}, 181, 182, 575. : 108, 281, 409, 545, 701. : 61, \underline{62}, \underline{68}, 92, 100, 108, 117,

139, 140, 701. : 79, 80, 103, 140. tm: 610. TO DO: 90, 92, 707, 716. token map: 127, 203, 209, 238, \underline{266}, \underline{267}, 270, 271,

272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 283, 284, 285, 286, 287, 288, 289, 292, 307, 691, 693, 698, 707, 715.

token stack : 223, 307, 359, 457, 689. Token Type: \underline{217}, 219, \underline{220}, 221, \underline{222}, 223,

307, 359, 457, 689. top: 307, 312. : \underline{59}, \underline{60}, 100, \underline{168}, 698, 701, 702, 703. tp: \underline{610}. traverse: \underline{105}, \underline{106}, 108. traverse query : \underline{703}. true: 108, 240, 244, 245, 582, 584, 621, 624,

627, 688, 703. ttarget : 88. ttarget type: \underline{88}. ttype: \underline{221}, \underline{222}. type: \underline{32}, \underline{33}, \underline{55}, \underline{163}, 180, 184, \underline{192}, 200, 203, 209,

\underline{217}, 220, \underline{222}, \underline{226}, \underline{236}, \underline{237}, 238, 240, 244, 245, \underline{296}, \underline{299}, \underline{300}, 307, 359, 457, 573, 574, 575, 576, 688, 689, \underline{691}, 693, \underline{703}, \underline{707}, 710, 711.

: 108, 281, 546, 701. : \underline{62}, \underline{68}, 92, 100, 108, 117, 701. : 79, 80, 103. : 745. : 399. unget : 315, 316, 320, 327, 332, 344, 353, 356,

358, 359. unlock : \underline{15}, \underline{16}, 41, 43, 91, 93, 96, 97, 111, 113,

118, 119, 127, 128, 130, 156, 176, 177, 180, 184, 203, 206, 209, 233, 235, 237, 238, 240, 241, 242, 243, 244, 245, 292, 307, 308, 309, 310, 312, 313, 315, 316, 317, 319, 320, 322, 323, 326, 327, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 351, 353, 354, 355, 356, 357, 358, 359, 389, 436, 437, 438, 439, 442, 443, 444, 445, 457, 459, 460, 461, 463, 464, 465, 466, 468, 469, 471, 472, 474, 475, 478, 482, 483, 485, 486, 487, 488, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 502, 503, 505, 506, 507, 508, 510, 511, 512, 513, 514, 515, 517, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 548, 549, 552, 554, 555, 556, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 572, 573, 574, 575, 576, 578, 579, 581, 583, 586, 587, 588, 590, 591, 592, 593, 594, 595, 596, 597, 602, 603, 604, 605, 606, 607, 608, 609, 610, 614, 615, 616, 617, 618, 620, 621, 623, 624, 626, 627, 629, 630, 631, 632, 633, 634, 638, 639, 641, 643, 645, 648, 649, 650, 652, 654, 656, 660, 661, 662, 664, 666, 668, 670, 671, 672, 673, 683, 684, 685, 686, 688, 689, 691, 692, 693, 695, 696, 697, 698, 702, 703, 706, 707, 708, 715, 716, 717, 718, 719, 726, 732, 746, 747.

up: \underline{53}, 87, 92, 97, 112, 117, 152, \underline{192}, 200, 244,

245, 621, 624, 627, 701, 702, 703. uup: \underline{88}, \underline{89}. v: \underline{32}, \underline{33}, \underline{55}, \underline{105}, \underline{106}, \underline{226}, \underline{295}, \underline{296}, \underline{298}, \underline{299},

\underline{300}, \underline{301}, \underline{670}, \underline{671}, \underline{672}, \underline{673}, \underline{683}, \underline{691}, \underline{695}, \underline{703}, \underline{707}, \underline{716}.

val : \underline{32}, \underline{33}, \underline{55}, \underline{226}, \underline{300}, \underline{587}, \underline{588}, \underline{707}, 708,

710, 711. value: \underline{53}, \underline{55}, 87, 92, 97, 112, 117, 132, 133, 134,

135, 136, 137, 138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152, \underline{163}, \underline{192}, 200, 203, 209, 217, 220, 222, \underline{226}, \underline{261}, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 283, 284, 285, 286, 287, 288, 289, 292, \underline{298}, 305, 306, 307, 312, 315, 316, 320, 327, 332, 344, 353, 356, 358, 359, 457, 502, 510, 572, 573, 574, 575, 576, 578, 579, 581, 583, 586, 587, 588, 606, 607, 608, 614, 616, 617, 618, 638, 648, 660, \underline{695}, 698, 701, 702, 703, 732.

value name: \underline{261}, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 283, 284, 285, 286, 287, 288, 289, 292, 312, 359.

value type: \underline{53}, 57, 73, 87, 97, 112, 117, 152, 616,

617, 618, 701, 702, 703. value type map: \underline{53}, \underline{81}, 100, 112, 117, 152. values : 90. : 286, 359, 468, 471, 474, 477. variable func: \underline{55}, \underline{226}, \underline{295}, 457, \underline{683}, 689.

: 286, 358.

variabls.w : 5, 8.

variabls id string : \underline{455}. : \underline{24}. vec: \underline{32}, \underline{33}, \underline{55}, \underline{226}, \underline{301}, \underline{717}, 718, 719, 720,

721, 722, 723, 724, 725. vector: 53, 97, 112, 117, 152, 223, 670, 671,

672, 673, 688, 717, 719. vvalue: \underline{88}, \underline{89}, 221, 222. vvalue type: \underline{88}, \underline{89}. w: \underline{716}. where strm 0 : \underline{114}, \underline{127}, 132, 133, 134, 135, 136,

137, 138, 139, 140, 142, 144, 145, 146, 147, 148, 149, 151, 152, 153, 154, \underline{581}, 582, \underline{583}, 584.

where strm 1 : \underline{114}, \underline{127}, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 151, 152, 154, \underline{581},

582, \underline{583}, 584.

: 280, 408. : 23, 31, 51, 161, 190, 215, 251, 680. : 280, 336, 408, 633. : 271, 336, 400, 496, 702, 703. xor node: \underline{53}, 87, 92, 97, 108, 112, 119, 130,

152, 624, 702, 703. : 280, 336, 408, 624, 634. xor or xor not : 628. : \underline{59}, \underline{60}, 100, 130, 624, 702, 703. xxerror : \underline{366}, \underline{743}, \underline{744}. xxlex destroy : 745. xxlex init : 745. xxor node: \underline{88}, \underline{89}. xxparse: \underline{742}, 745. xxset in: 745. year : \underline{33}, 37, 39, 41, 43, 45, 149, 710, 711, 719, 720. : 279, 407, 592, 710, 711. : 107, 285, 567. : 107, 285, 568. : 107, 285, 570. : 107, 285, 569. : 279, 407, 590, 710, 711. year range begin: \underline{33}, 37, 39, 41, 43, 45, 710, 711. year range end : \underline{33}, 37, 39, 41, 43, 45, 710, 711. : 279, 407, 591, 710, 711. yychar : 457. yyclearin: 457. yydebug : \underline{18}, 746. yyerror : \underline{395}, \underline{740}, \underline{741}. yylex : 6, 8, 223, 224, \underline{305}, \underline{306}, 354, 357, \underline{394},

729, 732. : \underline{365}, \underline{676}. : 732. yylval : 386, 387, 388, 457. yyparse: \underline{33}, \underline{55}, \underline{164}, 223, \underline{224}, \underline{738}, 748.

: \underline{365}, \underline{676}.

yyscan t : 745.

: 217, 221, 222, 224, 305, 306, 368, 394,

396, 689, 732, 745. yytext : 386, 387. yywrap: \underline{739}.

⟨ Bison declarations 397 ⟩ Used in section 676. ⟨ Bison options 367 ⟩ Used in section 379. ⟨ Common code for punctuation 355, 356 ⟩ Cited in section 343. Used in section 354.

⟨ Declare Dublin Core parser functions 366 ⟩ Used in section 379.

⟨ Declare namespace Scan Parse 255 ⟩ Used in section 361.

⟨ Declare non-member functions for Date Time Type 42 ⟩ Used in sections 47 and 48. ⟨ Declare scanning and parsing functions 738, 739, 740, 742, 743 ⟩ Used in section 750.

⟨ Declare Datasource Type functions 171, 173, 175, 179, 181, 183 ⟩ Used in section 163. ⟨ Declare Date Time Type functions 36, 38, 40, 44 ⟩ Used in section 33. ⟨ Declare Id Type functions 199, 202, 205, 208 ⟩ Used in section 192. ⟨ Declare Mutex Type functions 13, 15 ⟩ Used in section 12. ⟨ Declare Query Type functions 86, 88, 90, 95, 99, 101, 105, 110, 114, 115 ⟩ Used in section 54. ⟨ Declare Scan Parse functions 268, 291, 295, 296, 298, 299, 300, 301, 303, 304 ⟩ Used in sections 255 and 259. ⟨ Declare Scanner Type functions 230, 232, 234, 236 ⟩ Used in section 223. ⟨ Declare Token Type functions 219, 221 ⟩ Used in section 217. ⟨ Declare class Datasource Type 163 ⟩ Used in sections 186 and 187. ⟨ Declare class Date Time Type 33 ⟩ Used in sections 47 and 48. ⟨ Declare class Query Type 53, 54 ⟩ Used in sections 122 and 123. ⟨ Declare class Scanner Type 223 ⟩ Used in sections 247 and 248. ⟨ Declare keyword map 263 ⟩ Used in section 255. ⟨ Declare static Datasource Type constants 165, 168 ⟩ Used in section 163. ⟨ Declare static Id Type constants 193 ⟩ Used in section 192. ⟨ Declare static Id Type variables 195 ⟩ Used in section 211. ⟨ Declare static Query Type constants 57, 59, 62, 64, 65, 66, 73, 75, 82 ⟩ Used in section 54. ⟨ Declare static Query Type variables 78, 79 ⟩ Used in section 54. ⟨ Declare struct Id Type 192 ⟩ Used in sections 211 and 212. ⟨ Declare struct Keyword Type 261 ⟩ Used in section 255. ⟨ Declare struct Token Type 217 ⟩ Used in sections 247 and 248. ⟨ Declare token map 266 ⟩ Used in section 255. ⟨ Declare yyerror 395 ⟩ Used in section 676. ⟨ Declare yylex 305, 394 ⟩ Used in sections 362 and 676.

⟨ Define non-member functions for Date Time Type 43 ⟩ Used in section 47.

⟨ Define parser functions 683, 684, 685, 686, 687, 688, 689, 691, 692, 693, 695, 696, 697, 698, 699, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726 ⟩ Used in section 728.

⟨ Define scanning and parsing functions 741, 744 ⟩ Used in section 750.

⟨ Define Datasource Type functions 172, 174, 176, 177, 178, 180, 182, 184 ⟩ Used in section 186. ⟨ Define Date Time Type functions 37, 39, 41, 45 ⟩ Used in section 47. ⟨ Define Id Type functions 200, 203, 206, 209 ⟩ Used in section 211. ⟨ Define Mutex Type functions 14, 16 ⟩ Used in section 21. ⟨ Define Query Type functions 87, 89, 91, 92, 93, 94, 96, 97, 98, 100, 102, 103, 104, 106, 107, 108, 111, 112, 113, 116,

117, 118, 119, 120, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156 ⟩ Used in sections 122 and 158.

⟨ Define Scan Parse functions 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 283, 284, 285, 286, 287,

288, 289, 292 ⟩ Used in section 361. ⟨ Define Scanner Type functions 231, 233, 235, 237, 238, 239, 240, 241, 242, 243, 244, 245 ⟩ Used in section 247. ⟨ Define Token Type functions 220, 222 ⟩ Used in section 247. ⟨ Define tmain 732 ⟩ Used in section 733. ⟨ Define main 745, 746, 747, 748 ⟩ Used in section 750. ⟨ Define yylex 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,

329, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354 ⟩ Used in section 361.

LDF Metadata Exchange Utilities NAMES OF THE SECTIONS 415

⟨ Dublin Core parser rules 373, 375, 376, 378 ⟩ Used in section 379. ⟨ Dublin Core scanner rules 386, 387, 388, 389 ⟩ Used in section 390. ⟨ Filename sections 675 ⟩ Used in sections 676 and 677. ⟨ Flex options 383 ⟩ Used in section 390. ⟨ Forward declarations 17, 32, 52, 162, 191, 216, 252 ⟩ Used in sections 20, 47, 48, 122, 123, 186, 187, 211, 212, 247, 248,

361, and 362. ⟨ GNU Free Documentation License 752 ⟩ Cited in section 2. Used in section 753. ⟨ GNU General Public License 751 ⟩ Cited in section 2. Used in section 753. ⟨ Garbage 426 ⟩ Used in section 677. ⟨ Global variables 731, 736 ⟩ Used in sections 733 and 750. ⟨ Include files 10, 24, 30, 50, 125, 160, 189, 214, 250, 364, 382, 393, 679, 730, 735 ⟩ Used in sections 20, 21, 28, 47, 122,

158, 186, 211, 247, 361, 379, 390, 676, 728, 733, and 750.

⟨ Initialize static Datasource Type constants 166 ⟩ Used in section 186. ⟨ Initialize static Datasource Type variables 167 ⟩ Used in section 186. ⟨ Initialize static Id Type constants 194 ⟩ Used in section 211.

⟨ Initialize static Query Type constants 58, 60, 67, 68, 70, 71, 72, 74, 76, 83 ⟩ Used in section 122. ⟨ Initialize static Query Type variables 80, 81 ⟩ Used in section 122. ⟨ Look up curr id in keyword map and possibly id map 357, 358, 359 ⟩ Used in sections 314, 324, 327, 332, 344,

352, and 356. ⟨ Parser rules 421, 423, 424, 427, 428, 429, 436, 437, 438, 439, 442, 443, 444, 445, 447, 449, 451, 453, 457, 459, 460, 461, 463,

464, 465, 466, 468, 469, 471, 472, 474, 475, 477, 478, 482, 483, 485, 486, 487, 488, 490, 491, 493, 494, 495, 496, 497, 498, 499, 500, 502, 503, 505, 506, 507, 508, 510, 511, 512, 513, 514, 515, 517, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 548, 549, 552, 554, 555, 556, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 572, 573, 574, 575, 576, 578, 579, 580, 581, 582, 583, 584, 586, 587, 588, 590, 591, 592, 593, 594, 595, 596, 597, 602, 603, 604, 605, 606, 607, 608, 609, 610, 614, 615, 616, 617, 618, 620, 621, 623, 624, 626, 627, 629, 630, 631, 632, 633, 634, 638, 639, 641, 643, 645, 648, 649, 650, 652, 654, 656, 660, 661, 662, 664, 666, 668, 670, 671, 672, 673 ⟩ Used in section 676.

⟨ Preprocessor macro calls 23, 31, 51, 161, 190, 215, 251, 680 ⟩ Used in sections 28, 48, 123, 187, 212, 248, and 362. ⟨ Preprocessor macro definitions 77, 365 ⟩ Used in sections 122, 123, and 379.

⟨ Start conditions for the Dublin Core scanner 384 ⟩ Used in section 390.

⟨ Token and type declarations 370, 371, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 415, 416, 417,

418 ⟩ Used in sections 379 and 676. ⟨ Type declarations for non-terminal symbols 432, 435, 440, 441, 446, 448, 450, 452, 456, 458, 462, 467, 470, 473, 476,

480, 481, 484, 489, 492, 501, 516, 518, 547, 550, 571, 577, 585, 589, 599, 601, 613, 619, 622, 625, 628, 637, 640, 642, 644, 647, 651, 653, 655, 659, 663, 665, 667, 669 ⟩ Used in section 676.

⟨ assign.w 479 ⟩ Cited in sections 7 and 8. Used in section 675. ⟨ commands.w 598 ⟩ Cited in sections 7 and 8. Used in section 675. ⟨ dbcrprsr.w 363 ⟩ Cited in sections 6 and 8. Used in section 379. ⟨ dbcrscan.web 381 ⟩ Cited in sections 6 and 8. Used in section 390. ⟨ declrtns.w 434 ⟩ Cited in sections 7 and 8. Used in section 675. ⟨ dtsrcexp.w 636 ⟩ Cited in sections 7 and 8. Used in section 675. ⟨ dtsrctyp.web 159 ⟩ Cited in sections 6 and 8. Used in section 186. ⟨ dttmexp.w 658 ⟩ Cited in sections 7 and 8. Used in section 675. ⟨ dttmtype.web 29 ⟩ Cited in sections 6 and 8. Used in section 47. ⟨ grpstmnt.w 431 ⟩ Cited in sections 7 and 8. Used in section 675. ⟨ idtype.web 188 ⟩ Cited in sections 6 and 8. Used in section 211. ⟨ main.web 734 ⟩ Cited in sections 6 and 8. Used in section 750. ⟨ nonwin.web 9 ⟩ Cited in sections 6 and 8. Used in section 21. ⟨ parser.w 392 ⟩ Cited in sections 6, 7, 8, and 677. Used in section 675. ⟨ prsrfncs.web 678 ⟩ Used in section 728. ⟨ qtgensql.web 124 ⟩ Cited in sections 6 and 8. Used in section 158. ⟨ queryexp.w 612 ⟩ Cited in sections 7 and 8. Used in section 675.

⟨ querytyp.web 49 ⟩ Cited in sections 6 and 8. Used in section 122. ⟨ scanner.web 249 ⟩ Cited in sections 6 and 8. Used in section 361. ⟨ scantest.web 729 ⟩ Cited in sections 6 and 8. Used in section 733. ⟨ scnrtype.web 213 ⟩ Cited in sections 6 and 8. Used in section 247. ⟨ stdafx.web 22 ⟩ Cited in sections 6 and 8. Used in section 27. ⟨ strings.w 646 ⟩ Used in section 675. ⟨ variabls.w 455 ⟩ Cited in sections 7 and 8. Used in section 675. ⟨ 379 ⟩ ⟨ 390 ⟩ ⟨ 187 ⟩

⟨ 48 ⟩

⟨ 212 ⟩

⟨ 20 ⟩

⟨ 676 ⟩ ⟨ 123 ⟩ ⟨ 362 ⟩ ⟨ 248 ⟩

⟨ 28 ⟩

⟨ Mutex Type declaration 12 ⟩ Used in sections 20 and 21. ⟨ extern declaration of namespace Scan Parse 256, 258, 259 ⟩ Used in section 362.

⟨ extern declarations for global variables 18, 25 ⟩ Used in sections 20 and 28.

⟨ extern keyword map declaration 264 ⟩ Used in section 259. ⟨ extern token map declaration 267 ⟩ Used in section 259. ⟨ friend declarations for Scanner Type 224, 226 ⟩ Used in section 223. ⟨ friend declarations for class Datasource Type 164 ⟩ Used in section 163. ⟨ friend declarations for class Query Type 55 ⟩ Used in section 53. ⟨ union declaration for 368, 396 ⟩ Used in sections 379 and 676.

LDF Metadata Exchange Utilities by Laurence D. Finston

February 2007

Section Page

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 Copyright and licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1 Formatting commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 File Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2

Source Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 Logical and Hierarchical Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 Parser files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3 Alphabetical Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3

Non-Windows Code (nonwin.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 4 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4 Type declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4

Mutex Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4 Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5 Unlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5

Forward declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 6 extern declarations for global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 6 Putting Non-Win together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 6 stdafx (stdafx.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 8 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 8 Include files in stdafx.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 8 extern declarations for global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 9 Putting stdafx.web together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 9 Date Time Type (dttmtype.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 10 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 10 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 10 class Date Time Type declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 11 Date Time Type functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 11

Constructors and setting functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 11 Default constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 12 Destructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 12 Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 13 Output operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 16 Show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 18

Putting Date Time Type together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 19

ii  TABLE OF CONTENTS  LDF Metadata Exchange Utilities

Query Type (querytyp.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 21 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 21 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 21 Forward declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 21 class Query Type declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 22 friend declarations for class Query Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 23 Declare static Query Type constants and variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 23

Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 29 Initialize static Query Type variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 32 Query Type functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 32

Constructor and setting functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 32 Default constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 33 Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 33 Destructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 34 Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 36 Initialize type maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 40 Initialize flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 42 Set field specifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 45 Functions for generating strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 48 Generate TEX string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 48 Generate SQL string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 52 Show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 52

Putting Query Type together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 56 Query Type::generate sql string definition (qtgensql.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 58 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 58

Generate SQL string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 58 Putting Query Type::generate sql string together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 80 datasource type (dtsrctyp.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 81 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 81 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 81 Forward declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 81 class datasource type declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 82 friend declarations for class datasource type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 82 Declare static datasource type constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 82 Initialize static Datasource Type variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 83 datasource type functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 83

Constructor and setting functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 83 Default constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 83 Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 84 Destructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 84 Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 85 Initialize type maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 86 Show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 87

Putting datasource type together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 87 id type (idtype.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 88 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 88 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 88 struct id type declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 89

static Id Type constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 89 id type functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 90

Constructors and setting functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 90 Default constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 90

LDF Metadata Exchange Utilities TABLE OF CONTENTS iii

Destructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 91 Initialize subtype map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 92 Show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 93

Putting id type together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 94 Scanner Type (scnrtype.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 95 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 95 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 95 Forward declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 95 struct Token Type declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 96

Token Type functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 96 Default Constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 96 Non-Default Constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 97

class Scanner Type declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 98 friend declarations for Scanner Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 98

friend declarations for parser rule functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 98 friend declarations for functions for group statements . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 99

Scanner Type functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 99

Constructors and setting functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 99 Default constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 100 Destructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 100 Initialize id map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 101 Lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 102

Putting Scanner Type together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 109 Scanning (scanner.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 110 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 110 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 110 Forward declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 110 Type declarations for the scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 111 Declare namespace Scan Parse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 111 extern declaration of namespace Scan Parse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 111 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 112

Declare struct Keyword Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 112 Keyword map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 112 Declare keyword map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 112 Token map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 113 Declare token map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 113 Initialize keyword map and token map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 113 Show keyword map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 135

Parser rule functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 136

Functions for variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 136 variable func . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 137 Functions for declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 137 Functions for assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 137 query assignment func 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 137 query assignment func 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 137 datetime assignment func 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 138 datetime assignment func 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 138 Functions for Group Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 138 Start local database query function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 138 End query function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 139

The scanning function yylex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 139 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 142

iv  TABLE OF CONTENTS  LDF Metadata Exchange Utilities

Double-quote symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 143 Alphabetical characters and underline character . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 145 Digits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 148 Escaped characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 149 Punctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 150 Space characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350 164 Common code for punctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 166 Look up curr id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 167

Putting the scanner together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 169 Dublin Core Parser (dbcrprsr.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 170 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 170 Preprocessor macro definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 170 Declare xxerror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 170 Bison options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 171 union declaration for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 171 Token and type declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 171

Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 171 Dublin Core Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 172

Dublin Core parser rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 172 ⟨program⟩ (Start symbol) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 173 ⟨statement list⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 173 ⟨statement list⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 173 ⟨statement list⟩ ⟶ ⟨statement list⟩ ⟨statement⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376 174 ⟨statement⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377 174 ⟨statement list⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 174

Dublin Core (XML) Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 176 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 176 Flex Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 176 Start conditions for the Dublin Core scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 176 Dublin Core scanner rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 177 Putting the Dublin Core scanner together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 179 Parser (parser.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 180 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 180 Declare yylex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 180 Declare yyerror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 180 union declaration for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 180 Bison declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 181

Token and Type Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 181 Punctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 181 Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 182 Arithmetical Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 182 Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 183 Declarators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 183 Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 183 Predicates and Control Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 184 Columns of individual tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 186 Pica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 186 Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 187

Parser rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 188

Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 188 ⟨program⟩ ⟶ ⟨statement list⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 188 Statement list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422 188

LDF Metadata Exchange Utilities TABLE OF CONTENTS v

⟨statement list⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 189 ⟨statement list⟩ ⟶ ⟨statement list⟩ ⟨statement⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 189

Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 189 ⟨statement⟩ ⟶ ⟨group statement⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 189 ⟨statement⟩ ⟶ ⟨declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 189 ⟨statement⟩ ⟶ ⟨assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 190 ⟨statement⟩ ⟶ ⟨command⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 190

Group Statement (grpstmnt.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 190 Declarations (declrtns.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 191

⟨declaration⟩ ⟶ ⟨query declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436 191 ⟨declaration⟩ ⟶ ⟨string declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 192 ⟨declaration⟩ ⟶ ⟨datasource declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 192 ⟨declaration⟩ ⟶ ⟨datetime declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 193 ⟨variable declaration segment list⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 193 ⟨subscript placeholder⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 193

⟨variable declaration segment list⟩ ⟶ . . . . . . . . . . . . . . 442 194 ⟨variable declaration segment list⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 194 ⟨variable declaration segment list⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 195 ⟨subscript placeholder⟩ ⟶ . . . . . . . . . . . . . . . . . . . 445 195

⟨query declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 196

⟨query declaration⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 196 ⟨datasource declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 196

⟨datasource declaration⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 196 ⟨string declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 197

⟨string declaration⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 197 ⟨datetime declaration⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452 197

⟨datetime declaration⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 198

Variables (variabls.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 198

⟨variable name⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 198

⟨variable name⟩ ⟶ ⟨variable segment list⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 199 ⟨variable segment list⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 199

⟨variable segment list⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . 459 200 ⟨variable segment list⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 201 ⟨variable segment list⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 202 ⟨subscript⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 202 ⟨subscript⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 203 ⟨subscript⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 204 ⟨subscript⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . 465 205 ⟨subscript⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . 466 206 ⟨query variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 206

⟨query variable⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 207 ⟨query variable⟩ ⟶ ⟨variable name⟩ . . . . . . . . . . . . . . . . . . . . . . . 469 208

⟨datasource variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 208 ⟨datasource variable⟩ ⟶ . . . . . . . . . . . . . . . . . . . 471 209 ⟨datasource variable⟩ ⟶ ⟨variable name⟩ . . . . . . . . . . . . . . 472 210

⟨string variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 210 ⟨string variable⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . 474 211 ⟨string variable⟩ ⟶ ⟨variable name⟩ . . . . . . . . . . . . . . . . . . . . . . 475 212

⟨datetime variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 212 ⟨datetime variable⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . 477 213 ⟨datetime variable⟩ ⟶ ⟨variable name⟩ . . . . . . . . . . . . . . . . . 478 214

Assignment (assign.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 214

vi  TABLE OF CONTENTS  LDF Metadata Exchange Utilities

⟨negation optional⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 215 ⟨negation optional⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482 215 ⟨negation optional⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 216

⟨match term optional⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 216 ⟨match term optional⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485 217 ⟨match term optional⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 218 ⟨match term optional⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 219 ⟨match term optional⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488 220

⟨assign or plus-assign⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 220 ⟨assign or plus-assign⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 221 ⟨assign or plus-assign⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491 222

⟨assignment operator⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 222 ⟨assignment operator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493 223 ⟨assignment operator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 224 ⟨assignment operator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 225 ⟨assignment operator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 226 ⟨assignment operator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497 227

⟨assignment⟩ ⟶ ⟨query assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498 227 ⟨assignment⟩ ⟶ ⟨datasource assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499 228 ⟨assignment⟩ ⟶ ⟨string assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500 228 ⟨query assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501 228

⟨query assignment⟩ ⟶ ⟨query variable⟩ ⟨query expression⟩ . . . . . . . . . . . . 502 229 ⟨assignment⟩ ⟶ ⟨datetime assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503 230

Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 230 ⟨query assignment⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505 231 ⟨query assignment⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 232 ⟨query assignment⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 233 ⟨query assignment⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 234

Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 234 ⟨query assignment⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510 235 ⟨query assignment⟩ ⟶ (etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 237 ⟨field specifier⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516 238

⟨field specifier⟩ ⟶ ⟨field designator⟩ ⟨field qualifier list⟩ . . . . . . . . . . . . . 517 238 ⟨field designator⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 239

⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519 239 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520 240 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . 521 241 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 242 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523 243 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 244 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525 245 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526 246 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 247 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . 528 248 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 249 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . 530 250 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531 251 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 252 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533 253 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . 534 254 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . 535 255 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536 256

LDF Metadata Exchange Utilities TABLE OF CONTENTS vii

⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . 537 257 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538 258 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 259 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 260 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 261 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542 262 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 263 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . 544 264 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545 265 ⟨field designator⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546 266

⟨field qualifier⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547 266 ⟨field qualifier list⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 267 ⟨field qualifier list⟩ ⟶ ⟨field qualifier list⟩ ⟨field qualifier⟩ . . . . . 549 267

⟨field qualifier⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 268 Generic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551 268 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 268 Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553 268

⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554 269 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 270 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 271

Field qualifiers for database table columns . . . . . . . . . . . . . . . . . . . . . . . . . . 557 271 Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558 271 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . 559 272 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . 560 273 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . 561 274 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . 562 275 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . 563 276 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . 564 277 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . 565 278 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566 279 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . 567 280 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . 568 281 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . . . 569 282 ⟨field qualifier⟩ ⟶ . . . . . . . . . . . . . . . . 570 283

⟨datasource assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571 283 ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ ⟨datasource expression⟩ 572 284 ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ . . . . . . . . . . . . . . . . 573 285 ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ . . . . . . . . . . . 574 286 ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ . . . . . . . . . . . . . . 575 287 ⟨datasource assignment⟩ ⟶ ⟨datasource variable⟩ … 576 288

⟨string assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 288 ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨string expression⟩ . . . . . . . . . . . 578 289 ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨query expression⟩ . . . . . . . . 579 290 ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨query expression⟩ …. 581 291 ⟨string assignment⟩ ⟶ ⟨string variable⟩ ⟨query expression⟩ … 583 293

⟨datetime assignment⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585 294 ⟨datetime assignment⟩ ⟶ ⟨datetime variable⟩ ⟨datetime expression⟩ … 586 295 ⟨datetime assignment⟩ ⟶ ⟨datetime variable⟩ ⟨datetime specifier⟩ (etc.) . 587 296 ⟨datetime assignment⟩ ⟶ ⟨datetime variable⟩ ⟨datetime specifier⟩ (etc.) . 588 297

Datetime specifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 298 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 298 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591 299

viii  TABLE OF CONTENTS  LDF Metadata Exchange Utilities

⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592 300 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 301 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 302 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595 303 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596 304 ⟨datetime specifier⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 305

Commands (commands.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 305

Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600 305

⟨message or errmessage⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601 306 ⟨message or errmessage⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602 306 ⟨message or errmessage⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603 307

⟨command⟩ ⟶ ⟨message or errmessage⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604 308 ⟨command⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605 309 ⟨command⟩ ⟶ ⟨query variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606 310 ⟨command⟩ ⟶ ⟨datasource variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607 312 ⟨command⟩ ⟶ ⟨datetime variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 314 ⟨command⟩ ⟶ ⟨string expression⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 315 ⟨command⟩ ⟶ ⟨string expression⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610 316

Query expressions (queryexp.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 316

query primary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 317 ⟨query primary⟩ ⟶ ⟨query variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 318 ⟨query primary⟩ ⟶ ⟨query expression⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615 319 ⟨query primary⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 320 ⟨query primary⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 321 ⟨query primary⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 322

query secondary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 322 ⟨query secondary⟩ ⟶ ⟨query primary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 323 ⟨query secondary⟩ ⟶ ⟨query secondary⟩ ⟨and or and not⟩ ⟨query primary⟩ . . . . . 621 324

query tertiary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622 324 ⟨query tertiary⟩ ⟶ ⟨query secondary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623 325 ⟨query tertiary⟩ ⟶ ⟨query tertiary⟩ ⟨xor or xor not⟩ ⟨query secondary⟩ . . . . . . . . 624 326

query expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625 326 ⟨query expression⟩ ⟶ ⟨query tertiary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626 327 ⟨query expression⟩ ⟶ ⟨query expression⟩ ⟨or or or not⟩ ⟨query tertiary⟩ . . . . . . . 627 328

Boolean operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628 328 ⟨and or and not⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629 329 ⟨and or and not⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630 330 ⟨or or or not⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631 331 ⟨or or or not⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632 332 ⟨xor or xor not⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 333 ⟨xor or xor not⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634 334

Datasource expressions (dtsrcexp.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635 334

datasource primary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637 334 ⟨datasource primary⟩ ⟶ ⟨datasource variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638 335 ⟨datasource primary⟩ ⟶ ⟨datasource expression⟩ . . . . . . . . . . . . . . . . . . . . . . . . 639 336

datasource secondary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640 336

⟨datasource secondary⟩ ⟶ ⟨datasource primary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641 337 datasource tertiary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642 337

⟨datasource tertiary⟩ ⟶ ⟨datasource secondary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 338 datasource expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 338

⟨datasource expression⟩ ⟶ ⟨datasource tertiary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 339

String expressions (strings.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646 339

LDF Metadata Exchange Utilities TABLE OF CONTENTS ix

⟨string primary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647 339 ⟨string primary⟩ ⟶ ⟨string variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 340 ⟨string primary⟩: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649 341 ⟨string primary⟩ ⟶ ⟨string expression⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650 342 string secondary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651 342 ⟨string secondary⟩ ⟶ ⟨string primary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652 343 string tertiary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 343 ⟨string tertiary⟩ ⟶ ⟨string secondary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 344 string expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 344 ⟨string expression⟩ ⟶ ⟨string tertiary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 345

Datetime expressions (dttmexp.w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 345 datetime primary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 345 ⟨datetime primary⟩ ⟶ ⟨datetime variable⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660 346 ⟨datetime primary⟩ ⟶ ⟨datetime expression⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . 661 347 ⟨datetime primary⟩ ⟶ ⟨datetime element list⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662 348 datetime secondary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663 348 ⟨datetime secondary⟩ ⟶ ⟨datetime primary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664 349 datetime tertiary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665 349 ⟨datetime tertiary⟩ ⟶ ⟨datetime secondary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666 350 datetime expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667 350 ⟨datetime expression⟩ ⟶ ⟨datetime tertiary⟩ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668 351 Datetime element list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669 351 ⟨datetime element list⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . 670 352 ⟨datetime element list⟩ ⟶ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671 353 ⟨datetime element list⟩ ⟶ ⟨datetime element list⟩ . . . . . . . . . . . . 672 354 ⟨datetime element list⟩ ⟶ ⟨datetime element list⟩ . . . . . . . . . . . . . . 673 355

Putting the parser together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674 355 Parser functions (prsrfncs.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678 357 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679 357 Preprocessor macro calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680 357 Parser function definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681 357

Functions for variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682 357 variable func . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683 358 Functions for declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 361 Declare variable function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691 362 Functions for assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694 363 query assignment func 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695 364 query assignment func 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 371 datetime assignment func 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707 375 datetime assignment func 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716 380

Putting Parser Functions together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727 383 Scan Test (scantest.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729 384 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730 384 Global variable declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731 384 Define tmain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732 384 Putting Scan Test together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 386 Main when using GCC (main.web) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734 386 Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735 386 Global variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736 386 Scanning and parsing input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737 387 Main itself . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745 388 Putting Main together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749 391

x  TABLE OF CONTENTS  LDF Metadata Exchange Utilities

GNU General Public License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751 392 GNU Free Documentation License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 752 396 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754 402