Skip to content

Commit

Permalink
[patch] Tweak read grammar to allow read(probe(x)) as in examples. (#93)
Browse files Browse the repository at this point in the history
This isn't really generally useful but might as well allow it
as it's useful for examples (such as those in spec already!).

Note you still can't `read(probe(x).y)` but not worth allowing
when you might as well `read(probe(x.y))`.
  • Loading branch information
dtzSiFive authored Apr 11, 2023
1 parent 08680ce commit 22f67db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions revision-history.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ revisionHistory:
- Fix typos in force/release examples, force takes expr not int literal.
- Delineate string and single-quoted/double-quoted string in grammar.
# Information about the old versions. This should be static.
- Tweak grammar of 'read' to support 'read(probe(x))' as in examples.
oldVersions:
- version: 2.0.1
changes:
Expand Down
2 changes: 1 addition & 1 deletion spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -3557,7 +3557,7 @@ expr =
( "UInt" | "SInt" ) , [ width ] , "(" , int_any , ")"
| reference
| "mux" , "(" , expr , "," , expr , "," , expr , ")"
| "read" , "(" , static_reference , ")"
| "read" , "(" , ref_expr , ")"
| primop ;
static_reference = id
| static_reference , "." , id
Expand Down

0 comments on commit 22f67db

Please sign in to comment.