Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #2485
| From | rockbrentwood@gmail.com |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Can vi emulate the power of yacc? |
| Date | 2020-03-13 00:56 -0700 |
| Organization | Compilers Central |
| Message-ID | <20-03-014@comp.compilers> (permalink) |
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 comp.compilers | Previous | Next | Find similar
Can vi emulate the power of yacc? rockbrentwood@gmail.com - 2020-03-13 00:56 -0700
csiph-web