User loginNavigation |
Turing Extender Language (TXL)TXL has been mentioned briefly before on LTU. There is a recent paper in the LTDA Proceedings 2004 about the motivations of TXL, where the language designers iteratively modified their grammar to suit the intuitive expectations of their users. Turing uses an asterisk (*) to denote the upper bound of a parameter array (as in array 1..* of int). Users therefore began to write s(3..*) to mean the substring from position 3 to the end of the string, s(1..*-1) to mean the substring from the first position to the second last, s(*-1..*) to mean the substring consisting of the last two characters, and so on. As these forms evolved, the language was modified to adapt to the users’ expectations. The approach above does sound fruitful, if we want to achieve higher programmer productivity, rapid iterative design of the tools used has a radical chance of making an impact, instead of the path of taking tens of years before a language becomes a productive medium. Incidentally, TXL allows more than rapid prototyping of the Turing language itself though. Here is an example of how one can override the Pascal grammar. % Trivial coalesced addition dialect of Pascal % Based on standard Pascal grammar include "Pascal.Grm" % Overrides to allow new statement forms redefine statement ... | [reference] += [expression] end redefine % Transform new forms to old rule main replace [statement] V [reference] += E [expression] by V := V + (E) end rule The designers of TXL chose Lisp as the model for the underlying semantics, and uses functional programming with full backtracking for both parser and transformer. By Chui Tey at 2005-04-14 03:13 | LtU Forum | previous forum topic | next forum topic | other blogs | 6853 reads
|
Browse archives
Active forum topics |
Recent comments
12 weeks 1 day ago
12 weeks 1 day ago
12 weeks 1 day ago
34 weeks 3 days ago
38 weeks 4 days ago
40 weeks 2 days ago
40 weeks 2 days ago
42 weeks 6 days ago
47 weeks 4 days ago
47 weeks 4 days ago