Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #2485 > unrolled thread
| Started by | rockbrentwood@gmail.com |
|---|---|
| First post | 2020-03-13 00:56 -0700 |
| Last post | 2020-03-13 00:56 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.compilers
Can vi emulate the power of yacc? rockbrentwood@gmail.com - 2020-03-13 00:56 -0700
| From | rockbrentwood@gmail.com |
|---|---|
| Date | 2020-03-13 00:56 -0700 |
| Subject | Can vi emulate the power of yacc? |
| Message-ID | <20-03-014@comp.compilers> |
There are 3 ingredients in vi which, when combined, via the Chomsky-Schuetzenberger Theorem, may give it the power to fully emulate simple syntax direct translations and push down transducers ... and possibly even syntax directed translations. (1) "%" to match brackets; with the important condition that this works on at least 2 different kinds of brackets (2) the regular expression facility; particularly its ability to name and use parameters (3) the search & replace function. So, here's a simple challenge of sorts to test the idea: write a vi script that converts between infix and postfix order with at least two levels of operator precedence. I don't know if it can actually be done.
Back to top | Article view | comp.compilers
csiph-web