/ Check-in [71992f4a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Modify the lemon parser template to avoid using zero-initialized constants when compiled with C++. Ticket #3288. (CVS 5571)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 71992f4a3723418df5f16093aec92f1f95f0b604
User & Date: drh 2008-08-20 17:48:21
Context
2008-08-20
21:47
Comment and function naming tweaks to pcache. No functionality changes. (CVS 5572) check-in: 4b0e67d3 user: drh tags: trunk
17:48
Modify the lemon parser template to avoid using zero-initialized constants when compiled with C++. Ticket #3288. (CVS 5571) check-in: 71992f4a user: drh tags: trunk
17:19
Fix a problem in Makefile.in causing the static function hash-table to be constructed incorrectly (segfault). (CVS 5570) check-in: aef5b909 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tool/lempar.c.

    58     58   %%
    59     59   #define YY_NO_ACTION      (YYNSTATE+YYNRULE+2)
    60     60   #define YY_ACCEPT_ACTION  (YYNSTATE+YYNRULE+1)
    61     61   #define YY_ERROR_ACTION   (YYNSTATE+YYNRULE)
    62     62   
    63     63   /* The yyzerominor constant is used to initialize instances of
    64     64   ** YYMINORTYPE objects to zero. */
           65  +#ifdef __cplusplus
           66  +static YYMINORTYPE yyzerominor;
           67  +#else
    65     68   static const YYMINORTYPE yyzerominor;
           69  +#endif
    66     70   
    67     71   /* Next are the tables used to determine what action to take based on the
    68     72   ** current state and lookahead token.  These tables are used to implement
    69     73   ** functions that take a state number and lookahead value and return an
    70     74   ** action integer.  
    71     75   **
    72     76   ** Suppose the action integer is N.  Then the action is determined as