summaryrefslogtreecommitdiffstats
path: root/Source/cmCommandArgumentParser.y
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-06-13 14:27:05 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-06-13 14:27:05 (GMT)
commit385cced66c27658e93c5b63ddc3424da0feb8a61 (patch)
tree287d8d7726ce13aa3cc3d7eb0e6d88288b1ccdb2 /Source/cmCommandArgumentParser.y
parent043ddabc91c78b59b5e8d4e276cc527a1ddc39d7 (diff)
downloadCMake-385cced66c27658e93c5b63ddc3424da0feb8a61.zip
CMake-385cced66c27658e93c5b63ddc3424da0feb8a61.tar.gz
CMake-385cced66c27658e93c5b63ddc3424da0feb8a61.tar.bz2
ENH: More cleanups
Diffstat (limited to 'Source/cmCommandArgumentParser.y')
-rw-r--r--Source/cmCommandArgumentParser.y43
1 files changed, 1 insertions, 42 deletions
diff --git a/Source/cmCommandArgumentParser.y b/Source/cmCommandArgumentParser.y
index edcb190..6daaeec 100644
--- a/Source/cmCommandArgumentParser.y
+++ b/Source/cmCommandArgumentParser.y
@@ -53,8 +53,6 @@ static void cmCommandArgumentError(yyscan_t yyscanner, const char* message);
//#define YYINITDEPTH 10000
-#define calCheckEmpty(cnt) yyGetParser->CheckEmpty(__LINE__, cnt, yyvsp);
-#define calElementStart(cnt) yyGetParser->PrepareElement(&yyval)
/* Disable some warnings in the generated code. */
#ifdef __BORLANDC__
# pragma warn -8004 /* Variable assigned a value that is not used. */
@@ -96,8 +94,6 @@ static void cmCommandArgumentError(yyscan_t yyscanner, const char* message);
Start:
GoalWithOptionalBackSlash
{
- calElementStart(1);
- calCheckEmpty(1);
$<str>$ = 0;
yyGetParser->SetResult($<str>1);
}
@@ -105,139 +101,102 @@ GoalWithOptionalBackSlash
GoalWithOptionalBackSlash:
Goal
{
- calElementStart(1);
- calCheckEmpty(1);
$<str>$ = $<str>1;
}
|
Goal cal_BSLASH
{
- calElementStart(2);
- calCheckEmpty(2);
$<str>$ = yyGetParser->CombineUnions($<str>1, $<str>2);
}
Goal:
{
- calElementStart(0);
- calCheckEmpty(0);
$<str>$ = 0;
}
|
String Goal
{
- calElementStart(2);
- calCheckEmpty(2);
$<str>$ = yyGetParser->CombineUnions($<str>1, $<str>2);
}
String:
OuterText
{
- calElementStart(1);
- calCheckEmpty(1);
$<str>$ = $<str>1;
}
|
Variable
{
- calElementStart(1);
- calCheckEmpty(1);
$<str>$ = $<str>1;
}
OuterText:
cal_NAME
{
- calElementStart(1);
- calCheckEmpty(1);
$<str>$ = $<str>1;
}
|
cal_AT
{
- calElementStart(1);
- calCheckEmpty(1);
$<str>$ = $<str>1;
}
|
cal_DOLLAR
{
- calElementStart(1);
- calCheckEmpty(1);
$<str>$ = $<str>1;
}
|
cal_LCURLY
{
- calElementStart(1);
- calCheckEmpty(1);
$<str>$ = $<str>1;
}
|
cal_RCURLY
{
- calElementStart(1);
- calCheckEmpty(1);
$<str>$ = $<str>1;
}
|
cal_SYMBOL
{
- calElementStart(1);
- calCheckEmpty(1);
$<str>$ = $<str>1;
}
Variable:
cal_NCURLY MultipleIds cal_RCURLY
{
- calElementStart(3);
- calCheckEmpty(3);
$<str>$ = yyGetParser->ExpandSpecialVariable($<str>1,$<str>2);
//std::cerr << __LINE__ << " here: [" << $<str>1 << "] [" << $<str>2 << "] [" << $<str>3 << "]" << std::endl;
}
|
cal_DCURLY MultipleIds cal_RCURLY
{
- calElementStart(3);
- calCheckEmpty(3);
$<str>$ = yyGetParser->ExpandVariable($<str>2);
//std::cerr << __LINE__ << " here: [" << $<str>1 << "] [" << $<str>2 << "] [" << $<str>3 << "]" << std::endl;
}
|
cal_ATNAME
{
- calElementStart(1);
- calCheckEmpty(1);
$<str>$ = yyGetParser->ExpandVariable($<str>1);
}
MultipleIds:
{
- calElementStart(0);
- calCheckEmpty(0);
+ $<str>$ = 0;
}
|
ID MultipleIds
{
- calElementStart(2);
- calCheckEmpty(2);
$<str>$ = yyGetParser->CombineUnions($<str>1, $<str>2);
}
ID:
cal_NAME
{
- calElementStart(1);
- calCheckEmpty(1);
$<str>$ = $<str>1;
}
|
Variable
{
- calElementStart(1);
- calCheckEmpty(1);
$<str>$ = $<str>1;
}