~ubuntu-branches/ubuntu/jaunty/moin/jaunty-security

« back to all changes in this revision

Viewing changes to MoinMoin/parser/text_cplusplus.py

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-11-13 16:45:52 UTC
  • mfrom: (0.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20081113164552-49t6zf2t2o5bqigh
Tags: 1.8.0-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop recommendation of python-xml, the packages isn't anymore in
    sys.path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
    def setupRules(self):
37
37
        ParserBase.setupRules(self)
38
38
 
39
 
        self.addRulePair("Comment", "/[*]", "[*]/")
40
 
        self.addRule("Comment", "//.*$")
41
 
        self.addRulePair("String", 'L?"', r'$|[^\\](\\\\)*"')
 
39
        self.addRulePair("Comment", r"/[*]", r"[*]/")
 
40
        self.addRule("Comment", r"//.*$")
 
41
        self.addRulePair("String", r'L?"', r'$|[^\\](\\\\)*"')
42
42
        self.addRule("Char", r"'\\.'|'[^\\]'")
43
43
        self.addRule("Number", r"[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?")
44
44
        self.addRule("Preprc", r"^\s*#(.*\\\n)*(.*(?!\\))$")
45
 
        self.addRule("ID", "[a-zA-Z_][0-9a-zA-Z_]*")
 
45
        self.addRule("ID", r"[a-zA-Z_][0-9a-zA-Z_]*")
46
46
        self.addRule("SPChar", r"[~!%^&*()+=|\[\]:;,.<>/?{}-]")
47
47
 
48
48
        reserved_words = ['struct', 'class', 'union', 'enum',