import commands, os.path, sets, string, sys, traceback import color, completer, default, mode, method, regex, tab from point import Point from lex import Grammar, PatternRule, RegionRule, OverridePatternRule class StringGrammar(Grammar): rules = [ PatternRule(r'octal', r'\\[0-7]{3}'), PatternRule(r'escaped', r'\\.'), ] class ELispGrammar(Grammar): rules = [ PatternRule(r'comment', r';.*$'), PatternRule(r'reserved', r'(?:nil)(?![a-zA-Z0-9_])'), PatternRule(r'elisp_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'bareword', r"[a-zA-Z_][a-zA-Z0-9-_]*"), PatternRule(r"integer", r"(?