Skip to content

Commit

Permalink
Update examples to current version
Browse files Browse the repository at this point in the history
  • Loading branch information
phorward committed Jun 2, 2024
1 parent 8e99eef commit e5ff017
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/calc.tok
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _ : Char< \t>+ # redefine whitespace to just tab and spa
Factor : @{
Float _ # built-in 64-bit signed float token
Int _ # built-in 64-bit signed int token
'(' _ Expr expect ')' _
'(' _ Expr Expect<')'> _
}

Term : @{
Expand All @@ -22,7 +22,7 @@ Expr : @{
}


begin print("Tokay Calc" version) # print at startup
begin print("Tokay Calc " + version) # print at startup

Expr _ print("= " + $1) # execute each expression
'exit' exit # exit command
Expand Down
6 changes: 3 additions & 3 deletions examples/wc.tok
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Word ++words accept
{ Float ; Int } ++numbers accept
end words numbers
Word ++words repeat
( Float | Int ) ++numbers repeat
end words, numbers

0 comments on commit e5ff017

Please sign in to comment.