- 8 DB models (services, incidents, monitors, subscribers, etc.) - Full CRUD API for services, incidents, monitors - Public status page with live data - Incident detail page with timeline - API key authentication - Uptime monitoring scheduler - 13 tests passing - TECHNICAL_DESIGN.md with full spec
35 lines
877 B
Python
35 lines
877 B
Python
"""
|
|
pygments.lexers.gcodelexer
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
Lexers for the G Code Language.
|
|
|
|
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
|
|
:license: BSD, see LICENSE for details.
|
|
"""
|
|
|
|
from pygments.lexer import RegexLexer, bygroups
|
|
from pygments.token import Comment, Name, Text, Keyword, Number
|
|
|
|
__all__ = ['GcodeLexer']
|
|
|
|
|
|
class GcodeLexer(RegexLexer):
|
|
"""
|
|
For gcode source code.
|
|
"""
|
|
name = 'g-code'
|
|
aliases = ['gcode']
|
|
filenames = ['*.gcode']
|
|
url = 'https://en.wikipedia.org/wiki/G-code'
|
|
version_added = '2.9'
|
|
|
|
tokens = {
|
|
'root': [
|
|
(r';.*\n', Comment),
|
|
(r'^[gmGM]\d{1,4}\s', Name.Builtin), # M or G commands
|
|
(r'([^gGmM])([+-]?\d*[.]?\d+)', bygroups(Keyword, Number)),
|
|
(r'\s', Text.Whitespace),
|
|
(r'.*\n', Text),
|
|
]
|
|
}
|