mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 10:43:02 +00:00
* doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
Sander Brandenburg in <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>. Also, fix minor white space and comment issues.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
* doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
|
||||||
|
Sander Brandenburg in
|
||||||
|
<http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
|
||||||
|
Also, fix minor white space and comment issues.
|
||||||
|
|
||||||
2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
|
2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
Finish implementation of per-type %destructor/%printer. Discussed
|
Finish implementation of per-type %destructor/%printer. Discussed
|
||||||
|
|||||||
@@ -7423,8 +7423,8 @@ factor both as follows.
|
|||||||
|
|
||||||
@comment file: calc++-driver.hh
|
@comment file: calc++-driver.hh
|
||||||
@example
|
@example
|
||||||
// Announce to Flex the prototype we want for lexing function, ...
|
// Tell Flex the lexer's prototype ...
|
||||||
# define YY_DECL \
|
# define YY_DECL \
|
||||||
yy::calcxx_parser::token_type \
|
yy::calcxx_parser::token_type \
|
||||||
yylex (yy::calcxx_parser::semantic_type* yylval, \
|
yylex (yy::calcxx_parser::semantic_type* yylval, \
|
||||||
yy::calcxx_parser::location_type* yylloc, \
|
yy::calcxx_parser::location_type* yylloc, \
|
||||||
@@ -7675,7 +7675,9 @@ unit: assignments exp @{ driver.result = $2; @};
|
|||||||
assignments: assignments assignment @{@}
|
assignments: assignments assignment @{@}
|
||||||
| /* Nothing. */ @{@};
|
| /* Nothing. */ @{@};
|
||||||
|
|
||||||
assignment: "identifier" ":=" exp @{ driver.variables[*$1] = $3; @};
|
assignment:
|
||||||
|
"identifier" ":=" exp
|
||||||
|
@{ driver.variables[*$1] = $3; delete $1; @};
|
||||||
|
|
||||||
%left '+' '-';
|
%left '+' '-';
|
||||||
%left '*' '/';
|
%left '*' '/';
|
||||||
@@ -7683,7 +7685,7 @@ exp: exp '+' exp @{ $$ = $1 + $3; @}
|
|||||||
| exp '-' exp @{ $$ = $1 - $3; @}
|
| exp '-' exp @{ $$ = $1 - $3; @}
|
||||||
| exp '*' exp @{ $$ = $1 * $3; @}
|
| exp '*' exp @{ $$ = $1 * $3; @}
|
||||||
| exp '/' exp @{ $$ = $1 / $3; @}
|
| exp '/' exp @{ $$ = $1 / $3; @}
|
||||||
| "identifier" @{ $$ = driver.variables[*$1]; @}
|
| "identifier" @{ $$ = driver.variables[*$1]; delete $1; @}
|
||||||
| "number" @{ $$ = $1; @};
|
| "number" @{ $$ = $1; @};
|
||||||
%%
|
%%
|
||||||
@end example
|
@end example
|
||||||
@@ -7844,8 +7846,8 @@ main (int argc, char *argv[])
|
|||||||
driver.trace_scanning = true;
|
driver.trace_scanning = true;
|
||||||
else
|
else
|
||||||
@{
|
@{
|
||||||
driver.parse (*argv);
|
driver.parse (*argv);
|
||||||
std::cout << driver.result << std::endl;
|
std::cout << driver.result << std::endl;
|
||||||
@}
|
@}
|
||||||
@}
|
@}
|
||||||
@end example
|
@end example
|
||||||
|
|||||||
Reference in New Issue
Block a user