19 lines
444 B
Python
19 lines
444 B
Python
from mode import Fundamental
|
|
from lex import Grammar, PatternRule
|
|
|
|
class ColortestGrammar(Grammar):
|
|
rules = []
|
|
for i in range(0, 256):
|
|
c = '%02x' % i
|
|
rules.append(PatternRule('z' + c, c))
|
|
|
|
class Colortest(Fundamental):
|
|
name = 'Colortest'
|
|
grammar = ColortestGrammar
|
|
colors = {}
|
|
for i in range(0, 256):
|
|
c = '%02x' % i
|
|
colors['z' + c] = ('default', 'f' + c)
|
|
|
|
install = Colortest.install
|