2009-06-10 12:05:24 -04:00
|
|
|
from mode import Fundamental
|
|
|
|
from lex import Grammar, PatternRule
|
|
|
|
|
|
|
|
class ColortestGrammar(Grammar):
|
|
|
|
rules = []
|
|
|
|
for i in range(0, 256):
|
|
|
|
c = '%02x' % i
|
2009-06-10 16:07:03 -04:00
|
|
|
rules.append(PatternRule('z' + c, c))
|
2009-06-10 12:05:24 -04:00
|
|
|
|
|
|
|
class Colortest(Fundamental):
|
|
|
|
name = 'Colortest'
|
|
|
|
grammar = ColortestGrammar
|
|
|
|
colors = {}
|
|
|
|
for i in range(0, 256):
|
|
|
|
c = '%02x' % i
|
2009-06-10 16:07:03 -04:00
|
|
|
colors['z' + c] = ('default', 'f' + c)
|
2009-06-10 12:05:24 -04:00
|
|
|
|
|
|
|
install = Colortest.install
|