Dollar signs in identifiers; non-standard, but supported by many compilers
diff --git a/pycparser/c_lexer.py b/pycparser/c_lexer.py
index 553e43f..f75769f 100644
--- a/pycparser/c_lexer.py
+++ b/pycparser/c_lexer.py
@@ -169,8 +169,8 @@
     ##
     ##
 
-    # valid C identifiers (K&R2: A.2.3)
-    identifier = r'[a-zA-Z_][0-9a-zA-Z_]*'
+    # valid C identifiers (K&R2: A.2.3), plus '$' (supported by some compilers)
+    identifier = r'[a-zA-Z_$][0-9a-zA-Z_$]*'
 
     hex_prefix = '0[xX]'
     hex_digits = '[0-9a-fA-F]+'
diff --git a/tests/test_c_lexer.py b/tests/test_c_lexer.py
index 2c651a3..14242b8 100644
--- a/tests/test_c_lexer.py
+++ b/tests/test_c_lexer.py
@@ -44,6 +44,7 @@
         self.assertTokensTypes('++', ['PLUSPLUS'])
         self.assertTokensTypes('case int', ['CASE', 'INT'])
         self.assertTokensTypes('caseint', ['ID'])
+        self.assertTokensTypes('$dollar cent$', ['ID', 'ID'])
         self.assertTokensTypes('i ^= 1;', ['ID', 'XOREQUAL', 'INT_CONST_DEC', 'SEMI'])
 
     def test_id_typeid(self):
@@ -353,7 +354,6 @@
 
     def test_trivial_tokens(self):
         self.assertLexerError('@', ERR_ILLEGAL_CHAR)
-        self.assertLexerError('$', ERR_ILLEGAL_CHAR)
         self.assertLexerError('`', ERR_ILLEGAL_CHAR)
         self.assertLexerError('\\', ERR_ILLEGAL_CHAR)