pmacs3/mode/conf.py

19 lines
485 B
Python
Raw Normal View History

2008-04-07 16:09:18 -04:00
import color, mode
from lex import Grammar, PatternRule, RegionRule
from mode.sh import StringGrammar
class ConfGrammar(Grammar):
rules = [
PatternRule(r'comment', r'#.*$'),
RegionRule(r'string', r"'", Grammar, r"'"),
RegionRule(r'string', r'"', StringGrammar, r'"'),
]
class Conf(mode.Fundamental):
modename = 'conf'
extensions = ['.conf', '.cfg', '.cnf', '.config']
grammar = ConfGrammar
colors = {}
install = Conf.install