Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #2485 > unrolled thread

Can vi emulate the power of yacc?

Started byrockbrentwood@gmail.com
First post2020-03-13 00:56 -0700
Last post2020-03-13 00:56 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.compilers


Contents

  Can vi emulate the power of yacc? rockbrentwood@gmail.com - 2020-03-13 00:56 -0700

#2485 — Can vi emulate the power of yacc?

Fromrockbrentwood@gmail.com
Date2020-03-13 00:56 -0700
SubjectCan 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.

[toc] | [standalone]


Back to top | Article view | comp.compilers


csiph-web