Learn Before
Arrange the structural components of the regular expression used by the Magma lexer to match binary integer literals (Number.Bin) from left to right.
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
Lexing Strings, Numbers, and Comments - Custom Pygments Lexer Engineering for Magma @ University of Michigan - Ann Arbor
Related
Explain the structure and matching logic of the regular expression
r'[0-9]+\.([0-9]+|(?!\.))'used forNumber.Floatin the Magma lexer.Match each Magma token type with the category of numeric literal it represents.
In the Magma lexer, all numeric token definitions are grouped under the ___ state dictionary.
State the regular expression pattern used by the Magma lexer to match hexadecimal integer tokens, and explain what each component of the pattern matches.