Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2703

'YYEOF' undeclared

    XMLWordPrintable

    Details

    • Platform:
      Debian

      Description

      When compiling from the source on GitHub, you get this error:

       

      cf3parse.y: In function 'yyparse': 
      cf3parse.y:495:79: error: 'YYEOF' undeclared (first use in this function) 
                                if (yychar == BUNDLE || yychar == BODY || 
      yychar == YYEOF) 

       

       

      I found a thread in Google groups that described how this problem could be resolved by using bison instead of Byacc.  Even though I can confirm this is true, it still seems like an error that ought to be fixed?  I'm not sure why Bison isn't report it.  Explanation below:

       

      In libpromises/cf3parse.y, both BUNDLE and BODY are declared on line 72 (https://github.com/cfengine/core/blob/master/libpromises/cf3parse.y#L72).  YYEOF really isn't declared in this file, and that is why the error is showing up.

       

      Here is the commit that added this code, in which YYEOF is not declared: https://github.com/cfengine/core/commit/3548a768220c95a6fd8f4ad8912b96d13c8495c6.  This commit was first introduced in the tag 3.5.x-branchpoint.

       

      I recommend removing the YYEOF condition in the if statement, or else declaring YYEOF with the others on line 72.  Here's my pull request with my recommendation:  https://github.com/cfengine/core/pull/2923

       

        Attachments

          Activity

            People

            • Assignee:
              a10038 jimis (Dimitrios Apostolou)
              Reporter:
              elimtaft Eli Taft
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel