Commit 24886ed3 authored by Arturo Espinosa's avatar Arturo Espinosa

More exciting work!

parent 119593eb
1998-08-06 Miguel de Icaza <miguel@nuclecu.unam.mx> 1998-08-06 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/parser.y (yylex): Bug fix: allocate the string.
* src/sheet.c (CRowSort): Sort in the other direction my list of * src/sheet.c (CRowSort): Sort in the other direction my list of
cells. cells.
(sheet_cell_foreach_range): Iterate over the lists with ->next, (sheet_cell_foreach_range): Iterate over the lists with ->next,
......
1998-08-06 Miguel de Icaza <miguel@nuclecu.unam.mx> 1998-08-06 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/parser.y (yylex): Bug fix: allocate the string.
* src/sheet.c (CRowSort): Sort in the other direction my list of * src/sheet.c (CRowSort): Sort in the other direction my list of
cells. cells.
(sheet_cell_foreach_range): Iterate over the lists with ->next, (sheet_cell_foreach_range): Iterate over the lists with ->next,
......
1998-08-06 Miguel de Icaza <miguel@nuclecu.unam.mx> 1998-08-06 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/parser.y (yylex): Bug fix: allocate the string.
* src/sheet.c (CRowSort): Sort in the other direction my list of * src/sheet.c (CRowSort): Sort in the other direction my list of
cells. cells.
(sheet_cell_foreach_range): Iterate over the lists with ->next, (sheet_cell_foreach_range): Iterate over the lists with ->next,
......
1998-08-06 Miguel de Icaza <miguel@nuclecu.unam.mx> 1998-08-06 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/parser.y (yylex): Bug fix: allocate the string.
* src/sheet.c (CRowSort): Sort in the other direction my list of * src/sheet.c (CRowSort): Sort in the other direction my list of
cells. cells.
(sheet_cell_foreach_range): Iterate over the lists with ->next, (sheet_cell_foreach_range): Iterate over the lists with ->next,
......
...@@ -86,6 +86,7 @@ line: exp { parser_result = $1; ...@@ -86,6 +86,7 @@ line: exp { parser_result = $1;
; ;
exp: NUMBER { $$ = $1 } exp: NUMBER { $$ = $1 }
| STRING { $$ = $1 }
| CELLREF { $$ = $1 } | CELLREF { $$ = $1 }
| CONSTANT { $$ = $1 } | CONSTANT { $$ = $1 }
| exp '+' exp { | exp '+' exp {
...@@ -394,7 +395,8 @@ int yylex (void) ...@@ -394,7 +395,8 @@ int yylex (void)
return NUMBER; return NUMBER;
} }
case '"': { case '"': {
char *string; char *string, *s;
int v;
p = parser_expr; p = parser_expr;
while(*parser_expr && *parser_expr != '"') { while(*parser_expr && *parser_expr != '"') {
...@@ -407,19 +409,20 @@ int yylex (void) ...@@ -407,19 +409,20 @@ int yylex (void)
return ERROR; return ERROR;
} }
string = (char *) alloca (1 + parser_expr - p); s = string = (char *) alloca (1 + parser_expr - p);
while (p != parser_expr){ while (p != parser_expr){
if (*p== '\\'){ if (*p== '\\'){
p++; p++;
*string++ = *p++; *s++ = *p++;
} else } else
*string++ = *p++; *s++ = *p++;
} }
*string = 0; *s = 0;
parser_expr++; parser_expr++;
return return_symbol (string); v = return_symbol (string);
return v;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment