grammar: relation types may start by an underscore (_) stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 29 Mar 2010 16:05:42 +0200
branchstable
changeset 520 53d60b57e69a
parent 515 4782681bd56b
child 522 ddccfecfdf20
grammar: relation types may start by an underscore (_)
parser.g
parser.py
--- a/parser.g	Wed Mar 24 10:26:09 2010 +0100
+++ b/parser.g	Mon Mar 29 16:05:42 2010 +0200
@@ -92,7 +92,7 @@
     token ADD_OP:      r'\+|-'
     token MUL_OP:      r'\*|/'
     token FUNCTION:    r'[A-Za-z_]+\s*(?=\()'
-    token R_TYPE:      r'[a-z][a-z0-9_]*'
+    token R_TYPE:      r'[a-z_][a-z0-9_]*'
     token E_TYPE:      r'[A-Z][A-Za-z0-9]*[a-z]+[0-9]*'
     token VARIABLE:    r'[A-Z][A-Z0-9_]*'
     token COLALIAS:    r'[A-Z][A-Z0-9_]*\.\d+'
--- a/parser.py	Wed Mar 24 10:26:09 2010 +0100
+++ b/parser.py	Mon Mar 29 16:05:42 2010 +0200
@@ -98,7 +98,7 @@
         ('ADD_OP', re.compile('\\+|-')),
         ('MUL_OP', re.compile('\\*|/')),
         ('FUNCTION', re.compile('[A-Za-z_]+\\s*(?=\\()')),
-        ('R_TYPE', re.compile('[a-z][a-z0-9_]*')),
+        ('R_TYPE', re.compile('[a-z_][a-z0-9_]*')),
         ('E_TYPE', re.compile('[A-Z][A-Za-z0-9]*[a-z]+[0-9]*')),
         ('VARIABLE', re.compile('[A-Z][A-Z0-9_]*')),
         ('COLALIAS', re.compile('[A-Z][A-Z0-9_]*\\.\\d+')),