     'match': '\\blp__\\b'
     'name': 'invalid.deprecated.lp.stan'
   }
+
+  {
+    'match': '\\b([a-zA-Z0-9_]*__|[0-9_][A-Za-z0-9_]+|_)\\b'
+    'name': 'invalid.illegal.variable'
+  }
+  {
+    'match': '\\b[A-Za-z][0-9A-Za-z_]*\\b'
+    'comment': 'generic variable names'
+  }
+  {
+    'include': '#numbers'
+  }
   {
     'include': '#operators'
-  }
-  {
-    'include': '#numbers'
   }
   {
     'match': ','
     'name': 'meta.delimiter.comma.stan'
   }
   {
+    'match': '[{}]'
+    'name': 'meta.brace.curly.stan'
+  }
+  {
+    'match': '\\[|\\]'
+    'name': 'meta.brace.square.stan'
+  }
+  {
+    'match': '\\(|\\)'
+    'name': 'meta.brace.round.stan'
+  }
+  {
     'match': '\\;'
     'name': 'punctuation.terminator.statement.stan'
   }
-  {
-    'begin': '{|}'
-    'name': 'meta.brace.curly.stan'
-  }
-  {
-    'begin': '\\('
-    'beginCaptures':
-      '0':
-        'name': 'meta.brace.round.stan'
-    'end': '\\)'
-    'endCaptures'
-      '0':
-        'name': 'meta.brace.round.stan'
-    'patterns': [
-      'include': '$self'
-    ]
-  }
-  {
-    'match': '\\[|\\]'
-    'name': 'meta.brace.square.stan'
-  }
 ]
 'repository':
-  'docblock':
-    'patterns': [
-      {
-        'match': '(?<!\\w)@(param|return)\\b'
-        'name': 'storage.type.class.stan'
-      }
-    ]
   'comments':
     'patterns': [
-        {
-          'begin': '/\\*\\*(?!/)'
-          'captures':
-            '0':
-              'name': 'punctuation.definition.comment.stan'
-          'patterns': [
-            {
-              'include': '#docblock'
-            }
-          ]
-          'end': '\\*/'
-          'name': 'comment.block.documentation.stan'
-        }
-      }
       {
         'comment': '/* comment block */'
         'begin': '/\\*'

        'name': 'keyword.operator.assignment.stan'
      }
      {
        'matches': '\\|\\||&&|!'
        'name': 'keyword.operator.logical.stan'
        'comment': 'logical operators'
      }
      {
        'matches': '==|!=|<=?|>=?'
        'name': 'keyword.operator.comparison.stan'
        'comment': 'logical operators'
      }
      {
        'matches': "+|-|*|/|%|\\\\|\\.[*/]|\\^|'"
        'name': 'keyword.operator.other.stan'
        'comment': 'arithmetic and matrix operators'
      }
    ]
  'numbers':
    'patterns': [
      {
        'match': '(?x)
        (
        ([0-9]+)?\\.[0-9]+([eE][-]?[0-9]+)?
        |
        [0-9]+\\.([eE][-]?[0-9]+)?
        |
        [0-9]+[eE][-]?[0-9]+
        )\\b
        '
        'name': 'constant.numeric.real.stan'
      }
      {
        'match': '\\b-?\\d+'
        'name': 'constant.numeric.integer.stan'
      }
    ]

    'name': 'keyword.other.other.stan'
  }
  {
    'comment': 'truncation operator T[]'
    'match': '\\bT(?=\\s*\\[)'
    'name': 'keyword.other.truncation.stan'
  }
  {
