<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pygments-git.git/tests/test_hdl.py, branch bug/angular-html</title>
<subtitle>github.com: pygments/pygments.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pygments-git.git/'/>
<entry>
<title>Update copyright year (fixes #1514.)</title>
<updated>2020-08-22T14:08:07+00:00</updated>
<author>
<name>Matthäus G. Chajdas</name>
<email>dev@anteru.net</email>
</author>
<published>2020-08-22T14:08:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pygments-git.git/commit/?id=5bd2a84bc1db0120828606c900a14276414fecdc'/>
<id>5bd2a84bc1db0120828606c900a14276414fecdc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve SystemVerilog class/endclass lexer rules (#1471)</title>
<updated>2020-06-06T06:36:41+00:00</updated>
<author>
<name>Chris Drake</name>
<email>cjdrake@users.noreply.github.com</email>
</author>
<published>2020-06-06T06:36:41+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pygments-git.git/commit/?id=16bd34655497f2c9ffce02a2bf3d5b66bb06f526'/>
<id>16bd34655497f2c9ffce02a2bf3d5b66bb06f526</id>
<content type='text'>
The class looks like:

class class_identifier [#(param_decls)] [extends class_identifier #(params)];
    ...
endclass [: class_identifier]

Using the same Java convention of Keyword.Declaration and Name.Class.

Add a test_systemverilog_classes unit test to test_hdl.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The class looks like:

class class_identifier [#(param_decls)] [extends class_identifier #(params)];
    ...
endclass [: class_identifier]

Using the same Java convention of Keyword.Declaration and Name.Class.

Add a test_systemverilog_classes unit test to test_hdl.</pre>
</div>
</content>
</entry>
<entry>
<title>SystemVerilog keyword/operator improvements (#1464)</title>
<updated>2020-06-01T14:23:15+00:00</updated>
<author>
<name>Chris Drake</name>
<email>cjdrake@users.noreply.github.com</email>
</author>
<published>2020-06-01T14:23:15+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pygments-git.git/commit/?id=e064c55b4096a1e4f749539d5682a6db1851ec64'/>
<id>e064c55b4096a1e4f749539d5682a6db1851ec64</id>
<content type='text'>
* Move SystemVerilog type keywords

Put them next to the generic keywords list.

* Change a couple SystemVerilog keywords to operators

The 'inside' and 'dist' keywords are described as operators in the
SystemVerilog standard, below unary increment/decrement, and above
concatenation in precedence.
See 1800-2017 tables 11-1 and 11-2 for a list of operators.

This matches the description of pygemnts Operator.Word token:
"For any operator that is a word (e.g. not)."

* Add a SystemVerilog operators unit test

Copy/paste the contents of 1800-2017 Table 11-2,
and see what the SV lexer chops it up into.

I made lots of comments for potential improvements.
Some operators, such as '[' and '.' are being labeled as punctuation.
Also, multi-character operators such as '&lt;&lt;&lt;=' are being split up
into multiple, single-character tokens, eg '&lt;' '&lt;' '&lt;' '='.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Move SystemVerilog type keywords

Put them next to the generic keywords list.

* Change a couple SystemVerilog keywords to operators

The 'inside' and 'dist' keywords are described as operators in the
SystemVerilog standard, below unary increment/decrement, and above
concatenation in precedence.
See 1800-2017 tables 11-1 and 11-2 for a list of operators.

This matches the description of pygemnts Operator.Word token:
"For any operator that is a word (e.g. not)."

* Add a SystemVerilog operators unit test

Copy/paste the contents of 1800-2017 Table 11-2,
and see what the SV lexer chops it up into.

I made lots of comments for potential improvements.
Some operators, such as '[' and '.' are being labeled as punctuation.
Also, multi-character operators such as '&lt;&lt;&lt;=' are being split up
into multiple, single-character tokens, eg '&lt;' '&lt;' '&lt;' '='.</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor SystemVerilog unit tests</title>
<updated>2020-05-27T01:25:15+00:00</updated>
<author>
<name>Chris Drake</name>
<email>cjdrake@gmail.com</email>
</author>
<published>2020-05-27T01:23:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pygments-git.git/commit/?id=852da9dcf183f064f3f88a40c24c725137f389f6'/>
<id>852da9dcf183f064f3f88a40c24c725137f389f6</id>
<content type='text'>
Most of the contents of these two unit tests are static.
Move things around so the entire test fits on a single page,
for better readability/maintainability.

Name the code part &lt;TEST_NAME&gt;_TEXT,
and the tokens part &lt;TEST_NAME&gt;_TOKENS.

Choosing "text" b/c it's the parameter name to the
lexer.get_tokens(text) method.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most of the contents of these two unit tests are static.
Move things around so the entire test fits on a single page,
for better readability/maintainability.

Name the code part &lt;TEST_NAME&gt;_TEXT,
and the tokens part &lt;TEST_NAME&gt;_TOKENS.

Choosing "text" b/c it's the parameter name to the
lexer.get_tokens(text) method.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update SystemVerilog literal constants (#1460)</title>
<updated>2020-05-26T19:58:05+00:00</updated>
<author>
<name>Chris Drake</name>
<email>cjdrake@users.noreply.github.com</email>
</author>
<published>2020-05-26T19:58:05+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pygments-git.git/commit/?id=30f060ddfd1aadf41d1b33eae3cde49a6ee57495'/>
<id>30f060ddfd1aadf41d1b33eae3cde49a6ee57495</id>
<content type='text'>
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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a few SystemVerilog type keywords (#1454)</title>
<updated>2020-05-22T19:49:34+00:00</updated>
<author>
<name>Chris Drake</name>
<email>cjdrake@users.noreply.github.com</email>
</author>
<published>2020-05-22T19:49:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pygments-git.git/commit/?id=d4c5d60113f7daf6310b440577102fa72cc19e0a'/>
<id>d4c5d60113f7daf6310b440577102fa72cc19e0a</id>
<content type='text'>
* Fix a few SystemVerilog type keywords

First, add a few missing type keywords:
chandle, const, event, string, time, type, var, void

These are most of the 'variable' types listed in 1800-2017 6.8
"Variable declarations".

Currently, this 'Keyword.Type' is not taking effect because the lexer is
finding these keywords in the 'Keyword' list above.
Remove the double declaration so we get the more specific token type.

* Change signed/unsigned to Keyword.Type

This is what the C/C++ lexer does, so it seems legit.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix a few SystemVerilog type keywords

First, add a few missing type keywords:
chandle, const, event, string, time, type, var, void

These are most of the 'variable' types listed in 1800-2017 6.8
"Variable declarations".

Currently, this 'Keyword.Type' is not taking effect because the lexer is
finding these keywords in the 'Keyword' list above.
Remove the double declaration so we get the more specific token type.

* Change signed/unsigned to Keyword.Type

This is what the C/C++ lexer does, so it seems legit.</pre>
</div>
</content>
</entry>
<entry>
<title>Add a basic SystemVerilog unit test (#1452)</title>
<updated>2020-05-18T12:10:09+00:00</updated>
<author>
<name>Chris Drake</name>
<email>cjdrake@users.noreply.github.com</email>
</author>
<published>2020-05-18T12:10:09+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/pygments-git.git/commit/?id=3b18441f01ac7024651fb89e4da988994f780958'/>
<id>3b18441f01ac7024651fb89e4da988994f780958</id>
<content type='text'>
* Add a basic SystemVerilog unit test

* Fix docstring

Calling it a "complete fragment" didn't make much sense.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add a basic SystemVerilog unit test

* Fix docstring

Calling it a "complete fragment" didn't make much sense.</pre>
</div>
</content>
</entry>
</feed>
