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|when|unless|setq|require|or|not|mapcar|list|let|lambda|if|exists|equal|defvar|defun|defalias|count|cons|cdr|car|apply|and)(?![a-zA-Z0-9_])'), PatternRule(r'symbol', r"'[a-zA-Z_][a-zA-Z0-9-_]*"), PatternRule(r'type', r":[a-zA-Z_][a-zA-Z0-9-_]*"), PatternRule(r'attribute', r"&[a-zA-Z_][a-zA-Z0-9-_]*"), # PatternRule(r"builtin", r'(?>=|<<=|\*\*='), # PatternRule(r"operator", r"\+|<>|<<|<=|<|-|>>|>=|>|\*\*|&|\*|\||/|\^|==|//|~|!=|%"), PatternRule(r"integer", r"(?