[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #5539] Lexer encapsulation
From: |
Ben Pfaff |
Subject: |
[patch #5539] Lexer encapsulation |
Date: |
Sat, 11 Nov 2006 19:20:55 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060830 Firefox/1.5.0.7 (Debian-1.5.dfsg+1.5.0.7-1) |
Update of patch #5539 (project pspp):
Status: Ready For Test/Review => Works For Me
Assigned to: blp => jmd
_______________________________________________________
Follow-up Comment #1:
This patch is more ambitious than I expected, but it looks good.
Thanks for going to all the trouble.
A few comments:
In cmd_variable_labels, ds_init_string is called to create a new
string, but it is never destroyed.
Ditto for "label" and "function_name" in parse_aggregate_functions.
The former could be rewritten to avoid needing a separate string:
dest_label[n_dest - 1] = ss_xstrdup (ds_substr (lex_tokstr (lexer), 0,
255)). Actually the same goes for the cmd_variable_labels case too.
This change in format-parser.c must be a victim of search-and-replace:
-/* Parses a format specifier from the token stream and returns
+/* Parses a format specifier from the lex_token (lexer) stream and returns
Ditto in descriptives.c (2 places).
The code in lexer.c is getting harder to read due to all the
additional "lexer->". It's OK for now but in the long term perhaps
I'll put it on my list of things to improve.
The new NOT_REACHED in lex_force_num seems unneeded.
We should introduce a name for the enumeration used for token types,
instead of using int. It doesn't have to be done as part of this
patch though.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?5539>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/