Commits

Thomas Aglassinger committed e415be8

Fixed Rexx lexer.

* Fixed comma (,) as operator.
* Fixed slash (/) and asterisk (*) in comments.

Comments (0)

Files changed (2)

pygments/lexers/other.py

             (r'(address|arg|by|call|do|drop|else|end|exit|for|forever|if|'
              r'interpret|iterate|leave|nop|numeric|off|on|options|parse|'
              r'pull|push|queue|return|say|select|signal|to|then|trace|until|'
-             r'while)', Keyword.Reserved),
+             r'while)\b', Keyword.Reserved),
         ],
         'operator': [
             (ur'(-|//|/|\(|\)|\*\*|\*|\\|\\<<|\\<|\\==|\\=|\\>>|\\>|\|\||\||'
              ur'&&|&|%|\+|<<=|<<|<=|<>|<|==|=|><|>=|>>=|>>|>|¬<<|¬<|¬==|¬=|'
-             ur'¬>>|¬>|¬|\.)', Operator),
+             ur'¬>>|¬>|¬|\.|,)', Operator),
         ],
         'string_double': [
             (r'""', String),
             (r'[^\']', String),
         ],
         'comment': [
-            (r'[^*/]', Comment.Multiline),
             (r'\*/', Comment.Multiline, 'root'),
+            (r'(.|\n)', Comment.Multiline),
         ]
     }
 

tests/examplefiles/example.rexx

 if almost_pi < 3 then
    say 'huh?'
 else do
-   say 'ok, almost_pi=' almost_pi || " - done"
+   say 'almost_pi=' almost_pi || " - ok"
 end
 x = '"' || "'" || '''' || """" /* quotes */
 
 /* A comment
-   spawning multiple
-   lines. */
+ * spawning multiple
+   lines. /* / */
 
-half: procedure
-    parse arg some
-    return some / 2
+/* Labels and procedures. */
+some_label :
 
-some_label: /* ... ready to go to. */
+divide: procedure
+    parse arg some other
+    return some / other
+
+call divide(5, 2)
 
 /* Print a text file on MVS. */
 ADDRESS TSO