kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #40890
Build failure - probably a race generating template_fieldnames_lexer.h
-
To:
KiCad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
"Steven A. Falco" <stevenfalco@xxxxxxxxx>
-
Date:
Tue, 4 Jun 2019 11:07:05 -0400
-
Autocrypt:
addr=stevenfalco@xxxxxxxxx; keydata= xsFNBFxDhRcBEAC6Imgmt25S/CEOFsv+gHf52PQavJDRWK3pytsiD91DUmZnIwpWkYwJiKo8 E8nYMxw8R4g0YhCXCc7DwYXUnHQgIaO3SnLryLGZntJUuCuZxMjE4YEGOhq0mePnlhz1gcMQ 2TOAvBVXVg2841rEzGWZlXIg53eBavAobB9oJG2/5MyDzyB7d7nhvpuDuEDSKbIR69tbtTQC EQ86hZM+mUvekkU6FiMJQEU4hqJBF4BKmp+0mZ+dN1ZjRPCmCcShj9c6W6n9YITZuOPEBhIB v88m+3YQBkzsPu6tGjAXlk2H4jrkry9BQK27Ddn1N3Gz+oRDkX/UVd/jY2m0A0gxMi++N0wO K2DTShAAO4Imdrb5G1K+UJ0kNbLnkO4CmVVBD/yvnZo1WLRh4MGgUW8J+l1EPjQZvJHSOdIU 7HoLkWDoH6CZg2UqSNrhYIfJJD/K1H0gcXfCVEVhbDlQxclhiWID+8wQ9c0fVa/EabU0zBXJ sLBkO6tEtSaiLKHaIqkYGXCQxvpwHQwPR5ZNt9DXrRkmVm77ymh2jLJbHVv8XgtOJE7XkXn8 3Iv9iUFESd/1xZFUB51eVu+8aDjxDkwaqzlf/rUiOV+S8KZ4//gc1CC0EhqFCRFSZEJsblR1 c0wdF86NVFqeH+g+Z6n/yLKJWAvRLuw8w9JlWnoTMnIzS77J/wARAQABzSdTdGV2ZW4gQS4g RmFsY28gPHN0ZXZlbmZhbGNvQGdtYWlsLmNvbT7CwZQEEwEKAD4CGwEFCwkIBwMFFQoJCAsF FgIDAQACHgECF4AWIQSDrcEoXtTdcq9JzuJtoCQy7y8u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XzKGjqdw9qdIsqsXoYvGzgeiCUm44hZj+TTmIKTY 4NNs
-
Openpgp:
preference=signencrypt
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0
I think I just hit the builder race condition that was discussed a few days ago. I've attached a copy of template_fieldnames_lexer.h. At line 184 there is an #endif, and then part of the file appears to repeat. Thus, I wind up with an unmatched #endif and the compile fails.
I tried re-running the build, but it failed again, this time with dialog_bom_cfg_lexer.h messed up in a similar way.
Is there any workaround?
Steve
/* Do not modify this file it was automatically generated by the
* TokenList2DsnLexer CMake script.
*/
#ifndef TEMPLATE_FIELDNAMES_LEXER_H_
#define TEMPLATE_FIELDNAMES_LEXER_H_
#include <dsnlexer.h>
/**
* C++ does not put enum _values_ in separate namespaces unless the enum itself
* is in a separate namespace. All the token enums must be in separate namespaces
* otherwise the C++ compiler will eventually complain if it sees more than one
* DSNLEXER in the same compilation unit, say by mutliple header file inclusion.
* Plus this also enables re-use of the same enum name T. A typedef can always be used
* to clarify which enum T is in play should that ever be a problem. This is
* unlikely since Parse() functions will usually only be exposed to one header
* file like this one. But if there is a problem, then use:
* typedef TFIELD_T::T T;
* within that problem area.
*/
namespace TFIELD_T
{
/// enum T contains all this lexer's tokens.
enum T
{
// these first few are negative special ones for syntax, and are
// inherited from DSNLEXER.
T_NONE = DSN_NONE,
T_COMMENT = DSN_COMMENT,
T_STRING_QUOTE = DSN_STRING_QUOTE,
T_QUOTE_DEF = DSN_QUOTE_DEF,
T_DASH = DSN_DASH,
T_SYMBOL = DSN_SYMBOL,
T_NUMBER = DSN_NUMBER,
T_RIGHT = DSN_RIGHT, // right bracket: ')'
T_LEFT = DSN_LEFT, // left bracket: '('
T_STRING = DSN_STRING, // a quoted string, stripped of the quotes
T_EOF = DSN_EOF, // special case for end of file
T_field = 0,
T_name,
T_templatefields,
T_url,
T_value,
T_visible
};
} // namespace TFIELD_T
/**
* Class TEMPLATE_FIELDNAMES_LEXER
* is an automatically generated class using the TokenList2DnsLexer.cmake
* technology, based on keywords provided by file:
* /builddir/build/BUILD/kicad-r15989-e3c12355/eeschema/template_fieldnames.keywords
*/
class TEMPLATE_FIELDNAMES_LEXER : public DSNLEXER
{
/// Auto generated lexer keywords table and length:
static const KEYWORD keywords[];
static const unsigned keyword_count;
public:
/**
* Constructor ( const std::string&, const wxString& )
* @param aSExpression is (utf8) text possibly from the clipboard that you want to parse.
* @param aSource is a description of the origin of @a aSExpression, such as a filename.
* If left empty, then _("clipboard") is used.
*/
TEMPLATE_FIELDNAMES_LEXER( const std::string& aSExpression, const wxString& aSource = wxEmptyString ) :
DSNLEXER( keywords, keyword_count, aSExpression, aSource )
{
}
/**
* Constructor ( FILE* )
* takes @a aFile already opened for reading and @a aFilename as parameters.
* The opened file is assumed to be positioned at the beginning of the file
* for purposes of accurate line number reporting in error messages. The
* FILE is closed by this instance when its destructor is called.
* @param aFile is a FILE already opened for reading.
* @param aFilename is the name of the opened file, needed for error reporting.
*/
TEMPLATE_FIELDNAMES_LEXER( FILE* aFile, const wxString& aFilename ) :
DSNLEXER( keywords, keyword_count, aFile, aFilename )
{
}
/**
* Constructor ( LINE_READER* )
* intializes a lexer and prepares to read from @a aLineReader which
* is assumed ready, and may be in use by other DSNLEXERs also. No ownership
* is taken of @a aLineReader. This enables it to be used by other lexers also.
* The transition between grammars in such a case, must happen on a text
* line boundary, not within the same line of text.
*
* @param aLineReader is any subclassed instance of LINE_READER, such as
* STRING_LINE_READER or FILE_LINE_READER. No ownership is taken of aLineReader.
*/
TEMPLATE_FIELDNAMES_LEXER( LINE_READER* aLineReader ) :
DSNLEXER( keywords, keyword_count, aLineReader )
{
}
/**
* Function TokenName
* returns the name of the token in ASCII form.
*/
static const char* TokenName( TFIELD_T::T aTok );
/**
* Function NextTok
* returns the next token found in the input file or T_EOF when reaching
* the end of file. Users should wrap this function to return an enum
* to aid in grammar debugging while running under a debugger, but leave
* this lower level function returning an int (so the enum does not collide
* with another usage).
* @return TFIELD_T::T - the type of token found next.
* @throw IO_ERROR - only if the LINE_READER throws it.
*/
TFIELD_T::T NextTok()
{
return (TFIELD_T::T) DSNLEXER::NextTok();
}
/**
* Function NeedSYMBOL
* calls NextTok() and then verifies that the token read in
* satisfies bool IsSymbol().
* If not, an IO_ERROR is thrown.
* @return int - the actual token read in.
* @throw IO_ERROR, if the next token does not satisfy IsSymbol()
*/
TFIELD_T::T NeedSYMBOL()
{
return (TFIELD_T::T) DSNLEXER::NeedSYMBOL();
}
/**
* Function NeedSYMBOLorNUMBER
* calls NextTok() and then verifies that the token read in
* satisfies bool IsSymbol() or tok==T_NUMBER.
* If not, an IO_ERROR is thrown.
* @return int - the actual token read in.
* @throw IO_ERROR, if the next token does not satisfy the above test
*/
TFIELD_T::T NeedSYMBOLorNUMBER()
{
return (TFIELD_T::T) DSNLEXER::NeedSYMBOLorNUMBER();
}
/**
* Function CurTok
* returns whatever NextTok() returned the last time it was called.
*/
TFIELD_T::T CurTok()
{
return (TFIELD_T::T) DSNLEXER::CurTok();
}
/**
* Function PrevTok
* returns whatever NextTok() returned the 2nd to last time it was called.
*/
TFIELD_T::T PrevTok()
{
return (TFIELD_T::T) DSNLEXER::PrevTok();
}
};
// example usage
/**
* Class _PARSER
* holds data and functions pertinent to parsing a S-expression file .
*
class TEMPLATE_FIELDNAMES_PARSER : public TEMPLATE_FIELDNAMES_LEXER
{
};
*/
#endif // TEMPLATE_FIELDNAMES_LEXER_H_
T_field = 0,
T_name,
T_templatefields,
T_url,
T_value,
T_visible
};
} // namespace TFIELD_T
/**
* Class TEMPLATE_FIELDNAMES_LEXER
* is an automatically generated class using the TokenList2DnsLexer.cmake
* technology, based on keywords provided by file:
* /builddir/build/BUILD/kicad-r15989-e3c12355/eeschema/template_fieldnames.keywords
*/
class TEMPLATE_FIELDNAMES_LEXER : public DSNLEXER
{
/// Auto generated lexer keywords table and length:
static const KEYWORD keywords[];
static const unsigned keyword_count;
public:
/**
* Constructor ( const std::string&, const wxString& )
* @param aSExpression is (utf8) text possibly from the clipboard that you want to parse.
* @param aSource is a description of the origin of @a aSExpression, such as a filename.
* If left empty, then _("clipboard") is used.
*/
TEMPLATE_FIELDNAMES_LEXER( const std::string& aSExpression, const wxString& aSource = wxEmptyString ) :
DSNLEXER( keywords, keyword_count, aSExpression, aSource )
{
}
/**
* Constructor ( FILE* )
* takes @a aFile already opened for reading and @a aFilename as parameters.
* The opened file is assumed to be positioned at the beginning of the file
* for purposes of accurate line number reporting in error messages. The
* FILE is closed by this instance when its destructor is called.
* @param aFile is a FILE already opened for reading.
* @param aFilename is the name of the opened file, needed for error reporting.
*/
TEMPLATE_FIELDNAMES_LEXER( FILE* aFile, const wxString& aFilename ) :
DSNLEXER( keywords, keyword_count, aFile, aFilename )
{
}
/**
* Constructor ( LINE_READER* )
* intializes a lexer and prepares to read from @a aLineReader which
* is assumed ready, and may be in use by other DSNLEXERs also. No ownership
* is taken of @a aLineReader. This enables it to be used by other lexers also.
* The transition between grammars in such a case, must happen on a text
* line boundary, not within the same line of text.
*
* @param aLineReader is any subclassed instance of LINE_READER, such as
* STRING_LINE_READER or FILE_LINE_READER. No ownership is taken of aLineReader.
*/
TEMPLATE_FIELDNAMES_LEXER( LINE_READER* aLineReader ) :
DSNLEXER( keywords, keyword_count, aLineReader )
{
}
/**
* Function TokenName
* returns the name of the token in ASCII form.
*/
static const char* TokenName( TFIELD_T::T aTok );
/**
* Function NextTok
* returns the next token found in the input file or T_EOF when reaching
* the end of file. Users should wrap this function to return an enum
* to aid in grammar debugging while running under a debugger, but leave
* this lower level function returning an int (so the enum does not collide
* with another usage).
* @return TFIELD_T::T - the type of token found next.
* @throw IO_ERROR - only if the LINE_READER throws it.
*/
TFIELD_T::T NextTok()
{
return (TFIELD_T::T) DSNLEXER::NextTok();
}
/**
* Function NeedSYMBOL
* calls NextTok() and then verifies that the token read in
* satisfies bool IsSymbol().
* If not, an IO_ERROR is thrown.
* @return int - the actual token read in.
* @throw IO_ERROR, if the next token does not satisfy IsSymbol()
*/
TFIELD_T::T NeedSYMBOL()
{
return (TFIELD_T::T) DSNLEXER::NeedSYMBOL();
}
/**
* Function NeedSYMBOLorNUMBER
* calls NextTok() and then verifies that the token read in
* satisfies bool IsSymbol() or tok==T_NUMBER.
* If not, an IO_ERROR is thrown.
* @return int - the actual token read in.
* @throw IO_ERROR, if the next token does not satisfy the above test
*/
TFIELD_T::T NeedSYMBOLorNUMBER()
{
return (TFIELD_T::T) DSNLEXER::NeedSYMBOLorNUMBER();
}
/**
* Function CurTok
* returns whatever NextTok() returned the last time it was called.
*/
TFIELD_T::T CurTok()
{
return (TFIELD_T::T) DSNLEXER::CurTok();
}
/**
* Function PrevTok
* returns whatever NextTok() returned the 2nd to last time it was called.
*/
TFIELD_T::T PrevTok()
{
return (TFIELD_T::T) DSNLEXER::PrevTok();
}
};
// example usage
/**
* Class _PARSER
* holds data and functions pertinent to parsing a S-expression file .
*
class TEMPLATE_FIELDNAMES_PARSER : public TEMPLATE_FIELDNAMES_LEXER
{
};
*/
#endif // TEMPLATE_FIELDNAMES_LEXER_H_
Follow ups