STYLE: fix line length
This commit is contained in:
parent
20c27063dd
commit
d77fbb9640
@ -1,7 +1,8 @@
|
|||||||
/* A Bison parser, made by GNU Bison 2.1. */
|
/* A Bison parser, made by GNU Bison 2.1. */
|
||||||
|
|
||||||
/* Skeleton parser for Yacc-like parsing with Bison,
|
/* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984,
|
||||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation,
|
||||||
|
Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -118,7 +119,9 @@ This file must be translated to C and modified to build everywhere.
|
|||||||
|
|
||||||
Run bison like this:
|
Run bison like this:
|
||||||
|
|
||||||
bison --yacc --name-prefix=cmCommandArgument_yy --defines=cmCommandArgumentParserTokens.h -ocmCommandArgumentParser.cxx cmCommandArgumentParser.y
|
bison --yacc --name-prefix=cmCommandArgument_yy
|
||||||
|
--defines=cmCommandArgumentParserTokens.h -ocmCommandArgumentParser.cxx
|
||||||
|
cmCommandArgumentParser.y
|
||||||
|
|
||||||
Modify cmCommandArgumentParser.cxx:
|
Modify cmCommandArgumentParser.cxx:
|
||||||
- remove TABs
|
- remove TABs
|
||||||
@ -162,7 +165,8 @@ static void cmCommandArgumentError(yyscan_t yyscanner, const char* message);
|
|||||||
#endif
|
#endif
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# pragma warning (disable: 4102) /* Unused goto label. */
|
# pragma warning (disable: 4102) /* Unused goto label. */
|
||||||
# pragma warning (disable: 4065) /* Switch statement contains default but no case. */
|
# pragma warning (disable: 4065) /* Switch statement contains default but no
|
||||||
|
case. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -1287,8 +1291,10 @@ yyreduce:
|
|||||||
case 15:
|
case 15:
|
||||||
#line 166 "cmCommandArgumentParser.y"
|
#line 166 "cmCommandArgumentParser.y"
|
||||||
{
|
{
|
||||||
(yyval.str) = yyGetParser->ExpandSpecialVariable((yyvsp[-2].str),(yyvsp[-1].str));
|
(yyval.str) =
|
||||||
//std::cerr << __LINE__ << " here: [" << $<str>1 << "] [" << $<str>2 << "] [" << $<str>3 << "]" << std::endl;
|
yyGetParser->ExpandSpecialVariable((yyvsp[-2].str),(yyvsp[-1].str));
|
||||||
|
//std::cerr << __LINE__ << " here: [" << $<str>1 << "] [" << $<str>2 << "]
|
||||||
|
//[" << $<str>3 << "]" << std::endl;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1296,7 +1302,8 @@ yyreduce:
|
|||||||
#line 172 "cmCommandArgumentParser.y"
|
#line 172 "cmCommandArgumentParser.y"
|
||||||
{
|
{
|
||||||
(yyval.str) = yyGetParser->ExpandVariable((yyvsp[-1].str));
|
(yyval.str) = yyGetParser->ExpandVariable((yyvsp[-1].str));
|
||||||
//std::cerr << __LINE__ << " here: [" << $<str>1 << "] [" << $<str>2 << "] [" << $<str>3 << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << $<str>1 << "] [" << $<str>2 << "]
|
||||||
|
//[" << $<str>3 << "]" << std::endl;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -63,7 +63,8 @@ char* cmCommandArgumentParserHelper::AddString(const char* str)
|
|||||||
return stVal;
|
return stVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, const char* var)
|
char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key,
|
||||||
|
const char* var)
|
||||||
{
|
{
|
||||||
if ( !key )
|
if ( !key )
|
||||||
{
|
{
|
||||||
@ -85,7 +86,8 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, cons
|
|||||||
}
|
}
|
||||||
return this->EmptyVariable;
|
return this->EmptyVariable;
|
||||||
}
|
}
|
||||||
cmSystemTools::Error("Key ", key, " is not used yet. For now only $ENV{..} is allowed");
|
cmSystemTools::Error("Key ", key,
|
||||||
|
" is not used yet. For now only $ENV{..} is allowed");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,8 +133,8 @@ char* cmCommandArgumentParserHelper::CombineUnions(char* in1, char* in2)
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmCommandArgumentParserHelper::AllocateParserType(cmCommandArgumentParserHelper::ParserType* pt,
|
void cmCommandArgumentParserHelper::AllocateParserType
|
||||||
const char* str, int len)
|
(cmCommandArgumentParserHelper::ParserType* pt,const char* str, int len)
|
||||||
{
|
{
|
||||||
pt->str = 0;
|
pt->str = 0;
|
||||||
if ( len == 0 )
|
if ( len == 0 )
|
||||||
@ -147,10 +149,10 @@ void cmCommandArgumentParserHelper::AllocateParserType(cmCommandArgumentParserHe
|
|||||||
strncpy(pt->str, str, len);
|
strncpy(pt->str, str, len);
|
||||||
pt->str[len] = 0;
|
pt->str[len] = 0;
|
||||||
this->Variables.push_back(pt->str);
|
this->Variables.push_back(pt->str);
|
||||||
// std::cout << (void*) pt->str << " " << pt->str << " JPAllocateParserType" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmCommandArgumentParserHelper::HandleEscapeSymbol(cmCommandArgumentParserHelper::ParserType* pt, char symbol)
|
bool cmCommandArgumentParserHelper::HandleEscapeSymbol
|
||||||
|
(cmCommandArgumentParserHelper::ParserType* pt, char symbol)
|
||||||
{
|
{
|
||||||
if ( this->NoEscapeMode )
|
if ( this->NoEscapeMode )
|
||||||
{
|
{
|
||||||
@ -204,8 +206,6 @@ int cmCommandArgumentParserHelper::ParseString(const char* str, int verb)
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//printf("Do some parsing: %s\n", str);
|
|
||||||
|
|
||||||
this->Verbose = verb;
|
this->Verbose = verb;
|
||||||
this->InputBuffer = str;
|
this->InputBuffer = str;
|
||||||
this->InputBufferPos = 0;
|
this->InputBufferPos = 0;
|
||||||
@ -220,8 +220,6 @@ int cmCommandArgumentParserHelper::ParseString(const char* str, int verb)
|
|||||||
cmCommandArgument_yylex_destroy(yyscanner);
|
cmCommandArgument_yylex_destroy(yyscanner);
|
||||||
if ( res != 0 )
|
if ( res != 0 )
|
||||||
{
|
{
|
||||||
//str << "CAL_Parser returned: " << res << std::endl;
|
|
||||||
//std::cerr << "When parsing: [" << str << "]" << std::endl;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,7 +227,8 @@ int cmCommandArgumentParserHelper::ParseString(const char* str, int verb)
|
|||||||
|
|
||||||
if ( Verbose )
|
if ( Verbose )
|
||||||
{
|
{
|
||||||
std::cerr << "Expanding [" << str << "] produced: [" << this->Result.c_str() << "]" << std::endl;
|
std::cerr << "Expanding [" << str << "] produced: ["
|
||||||
|
<< this->Result.c_str() << "]" << std::endl;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -248,9 +247,6 @@ void cmCommandArgumentParserHelper::CleanupParser()
|
|||||||
|
|
||||||
int cmCommandArgumentParserHelper::LexInput(char* buf, int maxlen)
|
int cmCommandArgumentParserHelper::LexInput(char* buf, int maxlen)
|
||||||
{
|
{
|
||||||
//std::cout << "JPLexInput ";
|
|
||||||
//std::cout.write(buf, maxlen);
|
|
||||||
//std::cout << std::endl;
|
|
||||||
if ( maxlen < 1 )
|
if ( maxlen < 1 )
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@ -274,19 +270,8 @@ int cmCommandArgumentParserHelper::LexInput(char* buf, int maxlen)
|
|||||||
void cmCommandArgumentParserHelper::Error(const char* str)
|
void cmCommandArgumentParserHelper::Error(const char* str)
|
||||||
{
|
{
|
||||||
unsigned long pos = static_cast<unsigned long>(this->InputBufferPos);
|
unsigned long pos = static_cast<unsigned long>(this->InputBufferPos);
|
||||||
//fprintf(stderr, "Argument Parser Error: %s (%lu / Line: %d)\n", str, pos, this->CurrentLine);
|
|
||||||
cmOStringStream ostr;
|
cmOStringStream ostr;
|
||||||
ostr << str << " (" << pos << ")";
|
ostr << str << " (" << pos << ")";
|
||||||
/*
|
|
||||||
int cc;
|
|
||||||
std::cerr << "String: [";
|
|
||||||
for ( cc = 0; cc < 30 && *(this->InputBuffer.c_str() + this->InputBufferPos + cc);
|
|
||||||
cc ++ )
|
|
||||||
{
|
|
||||||
std::cerr << *(this->InputBuffer.c_str() + this->InputBufferPos + cc);
|
|
||||||
}
|
|
||||||
std::cerr << "]" << std::endl;
|
|
||||||
*/
|
|
||||||
this->ErrorString = ostr.str();
|
this->ErrorString = ostr.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
/* A Bison parser, made by GNU Bison 2.1. */
|
/* A Bison parser, made by GNU Bison 2.1. */
|
||||||
|
|
||||||
/* Skeleton parser for Yacc-like parsing with Bison,
|
/* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984,
|
||||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation,
|
||||||
|
Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -30,7 +30,8 @@ bool cmConfigureFileCommand::InitialPass(std::vector<std::string> const& args)
|
|||||||
this->OuputFile = args[1];
|
this->OuputFile = args[1];
|
||||||
if ( !this->Makefile->CanIWriteThisFile(this->OuputFile.c_str()) )
|
if ( !this->Makefile->CanIWriteThisFile(this->OuputFile.c_str()) )
|
||||||
{
|
{
|
||||||
std::string e = "attempted to configure a file: " + this->OuputFile + " into a source directory.";
|
std::string e = "attempted to configure a file: " + this->OuputFile
|
||||||
|
+ " into a source directory.";
|
||||||
this->SetError(e.c_str());
|
this->SetError(e.c_str());
|
||||||
cmSystemTools::SetFatalErrorOccured();
|
cmSystemTools::SetFatalErrorOccured();
|
||||||
return false;
|
return false;
|
||||||
|
@ -72,13 +72,13 @@ public:
|
|||||||
"DriverName is the name of the test driver program. The rest of "
|
"DriverName is the name of the test driver program. The rest of "
|
||||||
"the arguments consist of a list of test source files, can be "
|
"the arguments consist of a list of test source files, can be "
|
||||||
"semicolon separated. Each test source file should have a function in "
|
"semicolon separated. Each test source file should have a function in "
|
||||||
"it that is the same name as the file with no extension (foo.cxx should "
|
"it that is the same name as the file with no extension (foo.cxx "
|
||||||
"have int foo();) DriverName will be able to call each of the tests by "
|
"should have int foo();) DriverName will be able to call each of the "
|
||||||
"name on the command line. If EXTRA_INCLUDE is specified, then the "
|
"tests by name on the command line. If EXTRA_INCLUDE is specified, "
|
||||||
"next argument is included into the generated file. If FUNCTION is "
|
"then the next argument is included into the generated file. If "
|
||||||
"specified, then the next argument is taken as a function name that "
|
"FUNCTION is specified, then the next argument is taken as a function "
|
||||||
"is passed a pointer to ac and av. This can be used to add extra "
|
"name that is passed a pointer to ac and av. This can be used to add "
|
||||||
"command line processing to each test. The cmake variable "
|
"extra command line processing to each test. The cmake variable "
|
||||||
"CMAKE_TESTDRIVER_BEFORE_TESTMAIN can be set to have code that will be "
|
"CMAKE_TESTDRIVER_BEFORE_TESTMAIN can be set to have code that will be "
|
||||||
"placed directly before calling the test main function. "
|
"placed directly before calling the test main function. "
|
||||||
"CMAKE_TESTDRIVER_AFTER_TESTMAIN can be set to have code that will be "
|
"CMAKE_TESTDRIVER_AFTER_TESTMAIN can be set to have code that will be "
|
||||||
|
@ -105,7 +105,8 @@ bool cmDepends::CheckDependencies(std::istream& internalDepends)
|
|||||||
bool okay = true;
|
bool okay = true;
|
||||||
while(internalDepends.getline(this->Dependee, this->MaxPath))
|
while(internalDepends.getline(this->Dependee, this->MaxPath))
|
||||||
{
|
{
|
||||||
if ( this->Dependee[0] == 0 || this->Dependee[0] == '#' || this->Dependee[0] == '\r' )
|
if ( this->Dependee[0] == 0 || this->Dependee[0] == '#' ||
|
||||||
|
this->Dependee[0] == '\r' )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user