From 55c55aeca98b7b5eb1b8f33d31fe0cdb47792d60 Mon Sep 17 00:00:00 2001 From: moculus Date: Mon, 6 Aug 2007 15:36:49 +0000 Subject: [PATCH] --HG-- branch : pmacs2 --- mode/lisp.py | 57 ++++++++++------------------------------------------ 1 file changed, 11 insertions(+), 46 deletions(-) diff --git a/mode/lisp.py b/mode/lisp.py index 32fa8cb..026da79 100644 --- a/mode/lisp.py +++ b/mode/lisp.py @@ -2,77 +2,42 @@ 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'\\.'), - ] +from mode.python import StringGrammar 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"(?