Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SystemVerilog literal constants #1460

Merged
merged 1 commit into from
May 26, 2020
Merged

Update SystemVerilog literal constants #1460

merged 1 commit into from
May 26, 2020

Conversation

cjdrake
Copy link
Contributor

@cjdrake cjdrake commented May 23, 2020

The original implementation was missing some of the more arcane features
such as underbars, the character 's' for signed/unsigned, support for
spaces before/after the base specifier, capital letter base specifiers
(ie 'B 'D 'H), and the 4-state 'xXzZ?' characters.

For regular integers, the 'l' and 'L' suffixes are not valid.
That is, unlike C, in Verilog '42L' is not a valid int literal.

Create a new test that exercises most of the interesting kinds of
SystemVerilog numbers.

This fixes a couple minor issues with what type of number the lexer
returns. For example, Numbers like '42' used to return Integer.Hex,
but now return Integer.Decimal.

The original implementation was missing some of the more arcane features
such as underbars, the character 's' for signed/unsigned, support for
spaces before/after the base specifier, capital letter base specifiers
(ie 'B 'D 'H), and the 4-state 'xXzZ?' characters.

For regular integers, the 'l' and 'L' suffixes are not valid.
That is, unlike C, in Verilog '42L' is not a valid int literal.

Create a new test that exercises most of the interesting kinds of
SystemVerilog numbers.

This fixes a couple minor issues with what type of number the lexer
returns. For example, Numbers like '42' used to return Integer.Hex,
but now return Integer.Decimal.
@Anteru Anteru added this to the 2.7 milestone May 24, 2020
@Anteru Anteru self-assigned this May 24, 2020
@Anteru Anteru added the changelog-update Items which need to get mentioned in the changelog label May 24, 2020
@Anteru
Copy link
Collaborator

Anteru commented May 24, 2020

Thanks a lot, looks like SystemVerilog is getting a lot of love here :)

@Anteru Anteru merged commit 30f060d into pygments:master May 26, 2020
@Anteru
Copy link
Collaborator

Anteru commented May 26, 2020

Merged, thanks again for your contributions! It's great to get them complete with a nice description, comments and unit tests!

@Anteru Anteru removed the changelog-update Items which need to get mentioned in the changelog label May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants