[pypy-svn] r9595 - pypy/dist/pypy/translator
arigo at codespeak.net
arigo at codespeak.net
Thu Mar 3 10:50:47 CET 2005
Author: arigo
Date: Thu Mar 3 10:50:47 2005
New Revision: 9595
Modified:
pypy/dist/pypy/translator/genc.py
Log:
The complete list of all C99 keywords.
Modified: pypy/dist/pypy/translator/genc.py
==============================================================================
--- pypy/dist/pypy/translator/genc.py (original)
+++ pypy/dist/pypy/translator/genc.py Thu Mar 3 10:50:47 2005
@@ -50,10 +50,19 @@
# for later in initxxx() -- for recursive
# objects
self.namespace= NameManager()
- # just a few predefined names which cannot be reused.
- # I think this should come from some external file,
- # if we want to be complete
- self.namespace.make_reserved_names('typedef static void const')
+ # keywords cannot be reused. This is the C99 draft's list.
+ self.namespace.make_reserved_names('''
+ auto enum restrict unsigned
+ break extern return void
+ case float short volatile
+ char for signed while
+ const goto sizeof _Bool
+ continue if static _Complex
+ default inline struct _Imaginary
+ do int switch
+ double long typedef
+ else register union
+ ''')
# these names are used in function headers,
# therefore pseudo-preserved in scope 1:
self.namespace.make_reserved_names('self args kwds')
More information about the Pypy-commit
mailing list