⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.144
Server IP:
157.245.143.252
Server:
Linux www 6.11.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 14 13:19:59 UTC 2024 x86_64
Server Software:
nginx/1.26.0
PHP Version:
8.3.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
pygments
/
lexers
/
View File Name :
gcodelexer.py
""" pygments.lexers.gcodelexer ~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for the G Code Language. :copyright: Copyright 2006-2024 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), ] }