After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 623322 - token names need to be coordinated between gnumeric-expr-entry.c and parser.c
token names need to be coordinated between gnumeric-expr-entry.c and parser.c
Status: RESOLVED OBSOLETE
Product: Gnumeric
Classification: Applications
Component: GUI
git master
Other Linux
: Normal minor
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2010-07-01 20:00 UTC by Andreas J. Guelzow
Modified: 2018-05-22 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Lexer patch (5.71 KB, patch)
2010-07-01 22:46 UTC, Morten Welinder
committed Details | Review

Description Andreas J. Guelzow 2010-07-01 20:00:49 UTC
commas inside {...} confuse the function tooltips, those commas are counted when the argument number is determined.
Comment 1 Morten Welinder 2010-07-01 22:02:20 UTC
Argument 1142 for lexing right...
Comment 2 Morten Welinder 2010-07-01 22:46:49 UTC
Created attachment 165056 [details] [review]
Lexer patch

Utterly untested patch for lexing the whole string.
Comment 3 Andreas J. Guelzow 2010-07-02 03:28:21 UTC
This patch looks pretty straightforward, but I don't quite understand how it would be used. .token is a token but currently they seem to be private to parser.y (at least git grep  shows something like  RANGE_SEP  only in that file.
Comment 4 Morten Welinder 2010-07-02 12:15:28 UTC
Right.  Many tokens are just characters, but for those that aren't and
also are needed outside we need some kind of export mechanism.  We
might get away with a bare minimum.
Comment 5 Andreas J. Guelzow 2010-07-13 20:39:59 UTC
Most of the characters are combined into single tokens (possibly due to GNM_EXPR_PARSE_UNKNOWN_NAMES_ARE_STRINGS). Currently I am defining  

#define  TOKEN_UNMATCHED_APOSTROPHY 273
#define  TOKEN_PARENTHESIS_OPEN 40
#define  TOKEN_PARENTHESIS_CLOSED 41
#define  TOKEN_BRACE_OPEN 123
#define  TOKEN_BRACE_CLOSED 125
#define  TOKEN_SEPARATOR 269
#define  TOKEN_NAME 258

in gnumeric-expr-entry.c

We clearly need to ensure that this listing matches what is created in parser.c:

#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     STRING = 258,
     QUOTED_STRING = 259,
     CONSTANT = 260,
     RANGEREF = 261,
     tok_GTE = 262,
     tok_LTE = 263,
     tok_NE = 264,
     tok_AND = 265,
     tok_OR = 266,
     tok_NOT = 267,
     INTERSECT = 268,
     ARG_SEP = 269,
     ARRAY_COL_SEP = 270,
     ARRAY_ROW_SEP = 271,
     SHEET_SEP = 272,
     INVALID_TOKEN = 273,
     tok_RIGHT_EXP = 274,
     tok_LEFT_EXP = 275,
     tok_PLUS = 276,
     tok_NEG = 277,
     RANGE_INTERSECT = 278,
     RANGE_SEP = 279
   };
#endif
Comment 6 GNOME Infrastructure Team 2018-05-22 13:38:13 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnumeric/issues/139.