import commands, os.path, sets, string, sys, traceback import color, completer, default, mode2, method, regex, tab2 from point2 import Point from lex3 import Grammar, PatternRule, RegionRule, OverridePatternRule class StringGrammar(Grammar): rules = [ PatternRule(r'octal', r'\\[0-7]{3}'), PatternRule(r'escaped', r'\\.'), ] class LispGrammar(Grammar): rules = [ PatternRule(r'comment', r';.*$'), # PatternRule(r'functionname', r'(?<=def )[a-zA-Z_][a-zA-Z0-9_]*'), # PatternRule(r'classname', r'(?<=class )[a-zA-Z_][a-zA-Z0-9_]*'), PatternRule(r'reserved', r'(?:nil)(?![a-zA-Z0-9_])'), PatternRule(r'keyword', r'(?:while|unless|setq|require|mapcar|list|let|lambda|if|defvar|defalias|cons|cdr|car)(?![a-zA-Z0-9_])'), PatternRule(r'symbol', r"'[a-zA-Z_][a-zA-Z0-9-_]*"), # PatternRule(r"builtin", r'(?>=|<<=|\*\*='), # PatternRule(r"operator", r"\+|<>|<<|<=|<|-|>>|>=|>|\*\*|&|\*|\||/|\^|==|//|~|!=|%"), PatternRule(r"integer", r"(?