summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Beazley <dave@dabeaz.com>2007-11-29 18:52:12 +0000
committerDavid Beazley <dave@dabeaz.com>2007-11-29 18:52:12 +0000
commit616ca1b0ecff62b8725ee5c21a091376d210b139 (patch)
treedd12277f70c92c9c22c6351b07b94b2059046e1c
parentd84f56a3ba16d7685d91577e96d0ba06448f8b68 (diff)
downloadply-616ca1b0ecff62b8725ee5c21a091376d210b139.tar.gz
*** empty log message ***
-rw-r--r--CHANGES17
1 files changed, 17 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 4aad2e8..71c2a60 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,22 @@
Version 2.4
-----------------------------
+11/29/07: beazley
+ Modification of ply.lex to allow token functions to aliased.
+ This is subtle, but it makes it easier to create libraries and
+ to reuse token specifications. For example, suppose you defined
+ a function like this:
+
+ def number(t):
+ r'\d+'
+ t.value = int(t.value)
+ return t
+
+ This change would allow you to define a token rule as follows:
+
+ t_NUMBER = number
+
+ In this case, the token type will be set to 'NUMBER'.
+
11/28/07: beazley
Slight modification to lex and yacc to grab symbols from both
the local and global dictionaries of the caller. This