1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2025-04-21 12:27:27 +03:00

b2/: make "again" include the match; make "break" pop the stack

This commit is contained in:
Werner Almesberger
2012-05-22 15:29:27 -03:00
parent 2ce2da5c30
commit bb809b0d6c
2 changed files with 23 additions and 9 deletions

View File

@@ -2,6 +2,16 @@ FN=DNP { ignore }
FN=X(*) { $=$1 }
/* iteration demo */
FOO=abcde
BAR=x /* BAR= wouldn't be syntactically correct. We need a non-empty value */
FOO=(*)(?) {
BAR=$BAR$2
FOO=$1
again FOO
}
BAR=x(*) { $=$1 } /* remove the "x" */
REF=R[0-9]* {
T=R
VAL=(#R) { R=$1 }