Skip to content

Commit

Permalink
rdex isnt a word
Browse files Browse the repository at this point in the history
  • Loading branch information
tjjfvi committed Feb 29, 2024
1 parent 0d53460 commit 9264209
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ HVM-Core's textual syntax represents interaction combinators via an AST:

<NET> ::=
<ROOT> ::= <TERM>
<RDEX> ::= "&" <TERM> "~" <TERM> <NET>
<REDEX> ::= "&" <TERM> "~" <TERM> <NET>

<BOOK> ::=
<DEF> ::= "@" <name> "=" <NET> <BOOK>
Expand Down Expand Up @@ -419,7 +419,7 @@ struct Redex {
// A closed net
struct Net {
root: Ptr, // a free wire
rdex: Vec<Redex> // a vector of redexes
redexes: Vec<Redex> // a vector of redexes
heap: Vec<Node> // a vector of nodes
}
```
Expand Down
1 change: 0 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"plog",
"ptrs",
"rchunks",
"rdex",
"readback",
"redex",
"redexes",
Expand Down
6 changes: 3 additions & 3 deletions src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ impl<'i> Parser<'i> {

/// Net = Tree ("&" Tree "~" Tree)*
fn parse_net(&mut self) -> Result<Net, String> {
let mut rdex = Vec::new();
let mut redexes = Vec::new();
let root = self.parse_tree()?;
while self.consume("&").is_ok() {
let tree1 = self.parse_tree()?;
self.consume("~")?;
let tree2 = self.parse_tree()?;
rdex.push((tree1, tree2));
redexes.push((tree1, tree2));
}
Ok(Net { root, redexes: rdex })
Ok(Net { root, redexes })
}

fn parse_tree(&mut self) -> Result<Tree, String> {
Expand Down

0 comments on commit 9264209

Please sign in to comment.