Skip to content

Commit

Permalink
various cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed Aug 14, 2024
1 parent a3b81cb commit 428cdc8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[workspace]

members = ["klang"]
resolver = "2"
10 changes: 1 addition & 9 deletions examples/clean_up_cans.k
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# /usr/bin/env klang
# Defines a simple klang program.
# This program is designed to get a robot to clean up soda cans.

action <Teleop> {
outcomes {
success [Success]
failure [Failure]
}
}

action <Find {item}> {
notes {
prefer [Move quickly]
Expand All @@ -20,6 +11,7 @@ action <Find {item}> {
outcomes {
success [Found {item}]
failure [Haven't moved in a while]
retry [Actively looking for {item}]
}
}

Expand Down
5 changes: 3 additions & 2 deletions klang/src/klang.pest
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ ACTIONS = { "actions" }
UNTIL = { "until" }

// Names
CHAR = { ASCII_ALPHANUMERIC | "." | "_" | "/" | "!" | "?" | " " | "," | "\"" | "\'" | "/" | "\\" }
VARIABLE = { LBRACE ~ CHAR+ ~ RBRACE }
ACTION_NAME = { "<" ~ NAME ~ ">" }
OUTCOME_NAME = { "[" ~ NAME ~ "]" }
CHAR = { ASCII_ALPHANUMERIC | "." | "_" | "/" | "!" | "?" | " " | "," | "\"" | "\'" | "/" | "\\" | "{" | "}" }
NAME = { CHAR+ }
NAME = { (CHAR | VARIABLE)+ }

// Braces.
LBRACE = { "{" }
Expand Down

0 comments on commit 428cdc8

Please sign in to comment.