Magma Lexer Keyword Categorization
The Magma lexer compiles its reserved keywords by concatenating multiple whitespace-delimited keyword strings derived from Emacs Magma-mode categories: keywords, operators, extra_keywords, constructors, block_open, and block_close. These strings are combined (keywords += operators + extra_keywords + constructors + block_open + block_close) and converted into a list using keywords.split().
0
1
Tags
Prep Sessions
Custom Pygments Lexer Engineering for Magma @ University of Michigan - Ann Arbor
Ch.1 Magma Lexer Fundamentals - Custom Pygments Lexer Engineering for Magma @ University of Michigan - Ann Arbor
Magma RegexLexer Structure and Tokens - Custom Pygments Lexer Engineering for Magma @ University of Michigan - Ann Arbor
Related
Magma RegexLexer Class Definition
Magma Lexer Keyword Categorization
Which Pygments class is subclassed to define the custom Magma lexer?
In Pygments, the custom lexer class for the Magma language is named MagmaLexer.
What exact string value is assigned to the name metadata attribute in the Pygments Magma lexer class definition?
Magma Lexer Keyword Categorization
Learn After
In the Magma lexer, reserved keywords are initially stored as a static Python list rather than assembled from separate category strings.
Which string method is called on the combined keyword string to convert it into a list of individual Magma reserved keywords?
Explain how the Magma lexer compiles its reserved keywords, identifying the origin of the categories, the specific categories included in the combination, and the final transformation applied.
Before concatenation, the Magma lexer category strings are formatted as ___-delimited keyword strings.