Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
23
Task/Odd-word-problem/Nom/odd-word-problem.num
Normal file
23
Task/Odd-word-problem/Nom/odd-word-problem.num
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#*
|
||||
GRAMMAR PARSE TOKENS
|
||||
no tokens required, except to store odd/even state
|
||||
|
||||
HISTORY
|
||||
13 sept 2021: written
|
||||
|
||||
*#
|
||||
|
||||
begin { add "odd*"; push; }
|
||||
read;
|
||||
[:alpha:] {
|
||||
pop;
|
||||
B"odd*" { push; get; put; clear; }
|
||||
B"even*" { push; swap; get; put; clear; }
|
||||
}
|
||||
![:alpha:].!"" {
|
||||
pop;
|
||||
B"odd*" { replace "odd*" "even*"; push; }
|
||||
B"even*" { replace "even*" "odd*"; push; }
|
||||
swap; print; clear; swap; print; clear;
|
||||
}
|
||||
(eof) { get; print; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue