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

[major] Add reference types. #75

Merged
merged 13 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions include/firrtl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<item>of</item>
<item>wire</item>
<item>node</item>
<item>ref</item>
<item>define</item>
</list>
<list name="types">
<item>UInt</item>
Expand All @@ -28,6 +30,10 @@
<item>Reset</item>
<item>AsyncReset</item>
</list>
<list name="outertype">
<item>Probe</item>
<item>RWProbe</item>
</list>
<list name="typemodifiers">
<item>const</item>
</list>
Expand Down Expand Up @@ -81,11 +87,19 @@
<item>assert</item>
<item>assume</item>
<item>cover</item>
<item>read</item>
<item>probe</item>
<item>rwprobe</item>
<item>force</item>
<item>release</item>
<item>force_initial</item>
<item>release_initial</item>
</list>
<contexts>
<context name="Normal Text" attribute="ID" lineEndContext="#pop">
<keyword attribute="Keyword" context="#stay" String="keywords" />
<keyword attribute="Keyword" context="type" String="types" />
<keyword attribute="Keyword" context="outertype" String="outertype" />
<keyword attribute="Keyword" context="#stay" String="typemodifiers" />
<keyword attribute="Structure" context="#stay" String="structure" />
<keyword attribute="PrimOp" context="#stay" String="primops" />
Expand All @@ -108,6 +122,7 @@
<context name="memory" attribute="Keyword" lineEndContext="#stay">
<Detect2Chars char="=" char1="&gt;" attribute="Operator" context="memoryRHS"/>
<StringDetect String="read-under-write" attribute="Keyword" context="#pop!memoryLast"/>
<DetectChar char= ";" context="comment" attribute="Comment"/>
</context>
<context name="memoryRHS" attribute="ID" lineEndContext="#pop">
<keyword String="types" attribute="Keyword" context="type"/>
Expand All @@ -133,11 +148,21 @@
<context name="info" attribute="Info" lineEndContext="#stay">
<DetectChar char="]" context="#pop"/>
</context>
<context name="outertype" attribute="Keyword" lineEndContext="#pop">
<DetectChar char="&lt;" attribute="Operator" context="#stay"/>
<keyword String="types" attribute="Keyword" context="type"/>
<DetectChar char="{" context="field" attribute="Separator"/>
<DetectChar char="}" attribute="Separator" context="#pop#pop"/>
<DetectChar char= ";" context="comment" attribute="Comment"/>
<AnyChar String="&gt;," attribute="Operator" context="#pop"/>
<DetectChar char="[" attribute="Operator" context="widthOrDepthOrLit"/>
</context>
<context name="type" attribute="String" lineEndContext="#pop">
<AnyChar String="&lt;[(" attribute="Operator" context="widthOrDepthOrLit"/>
<AnyChar String="," attribute="Separator" context="#pop"/>
<AnyChar String="}" attribute="Separator" context="#pop#pop"/>
<DetectChar char= ";" context="comment" attribute="Comment"/>
<AnyChar String="&gt;" attribute="Operator" context="#pop"/>
</context>
<context name="widthOrDepthOrLit" attribute="String" lineEndContext="#stay">
<DetectChar char="&lt;" attribute="Operator" context="widthOrDepthOrLit"/>
Expand All @@ -146,6 +171,7 @@
<context name="field" attribute="ID" lineEndContext="#stay">
<StringDetect String="flip" attribute="Keyword" context="#stay"/>
<keyword String="types" attribute="Keyword" context="type"/>
<keyword String="outertype" attribute="Keyword" context="outertype"/>
<keyword String="typemodifiers" attribute="Keyword" context="#stay"/>
<DetectChar char="{" attribute="Separator" context="field"/>
<DetectChar char="}" attribute="Separator" context="#pop"/>
Expand Down
1 change: 1 addition & 0 deletions revision-history.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ revisionHistory:
- Render inline annotations as JSON, fix typo in example.
- Fix rendering of type modifiers (const) in document.
- Fix grammar for registers.
- Add reference types and related statements.
# Information about the old versions. This should be static.
oldVersions:
- version: 1.2.0
Expand Down
Loading