Skip to content

Commit

Permalink
chore: use unique STOP token
Browse files Browse the repository at this point in the history
fixes #2
  • Loading branch information
ctjlewis committed Apr 21, 2024
1 parent 2b31fec commit 376bba7
Show file tree
Hide file tree
Showing 3 changed files with 320 additions and 320 deletions.
2 changes: 1 addition & 1 deletion programs/automata/eval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default function testAutomata(
const ruleLabel =
`${format([left, center, right], " ")}: ${patternIndex}${format([pattern])}`

const indexLabel = i === width-1 ? `${i}/${width-1}` : ""
const indexLabel = i === width-1 ? "STOP" : ""
const matchLabel = `${i}${format([pattern])}`.padStart(3)

log(`${leftLabel.padStart(3)} ${centerLabel.padStart(3)} ${rightLabel.padStart(3)} ${ruleLabel.padStart(4)} ${matchLabel} ${indexLabel}`)
Expand Down
Loading

0 comments on commit 376bba7

Please sign in to comment.