Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #798
| From | Avoid9Pdf@gmail.com |
|---|---|
| Newsgroups | comp.compilers, comp.unix.shell, comp.os.linux.misc |
| Subject | magic/absurd bash interpreter/compiler ? |
| Date | 2012-12-23 11:04 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <12-12-014@comp.compilers> (permalink) |
Cross-posted to 3 groups.
It's OK if your dog doesn't KNOW how he catches a ball, or even if you don't know the algorithm of how you ride-a-bicycle, provided you can instinctively do it. But this bash nonsense is infuriating me! We need a rigorous/formal syntax for computing. http://wiki.bash-hackers.org/howto/redirection_tutorial writes: > Let's see another use case. We want to read a file line by line, > this is easy, we just do: > > while read -r line;do echo "$line";done < file ---- Well, I have some experience in building compilers, eg. augumented FiniteStateMachine: where the PASCAL-like syntax-railway-diagrams are just drawn and the diagram has the corresponding action for the received token which progreses past THAT node in the diagram. And FORTH-like interpreters. These all 'compile' from-left-to-right, with possibly one token look-ahead. But this bash crap, seems to give a whole recursively-descendable-structure and at the END, mentions ByTheWay <use FileIn as input>, whereas the <InputFile> must be known at the BEGINING. Does this thing use multiple passes. Eg. where the complete command-line is FIRST analysed for "<", ">", and then LATER any function/s who's input and/or output is not specified, can use the previous scan's stuff. What kind of mental model must we develop to handle this bash syntax which contradicts normal/proper syntax, or must we approach is like an infant learns its first language, or like your dog catches a ball? == TIA. [The last time I checked, bash compiles commands into an internal form and then interprets that. I presume you know that bash is a modestly enhanced version of the Bourne shell which has been part of Unix since 1977. I'd think that's been long enough for people to get used to the syntax. It's nowhere near as bad as the older Mashey shell. -John]
Back to comp.compilers | Previous | Next — Next in thread | Find similar | Unroll thread
magic/absurd bash interpreter/compiler ? Avoid9Pdf@gmail.com - 2012-12-23 11:04 +0000
Re: magic/absurd bash interpreter/compiler ? J G Miller <miller@yoyo.ORG> - 2012-12-24 00:28 +0000
Re: magic/absurd bash interpreter/compiler ? "Jonathan Thornburg" <jthorn@astro.indiana.edu> - 2012-12-24 03:57 +0000
Re: magic/absurd bash interpreter/compiler ? Eric <eric@deptj.eu> - 2012-12-24 19:13 +0000
Re: magic/absurd bash interpreter/compiler ? Barry Margolin <barmar@alum.mit.edu> - 2012-12-24 20:48 -0500
Re: magic/absurd bash interpreter/compiler ? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-12-25 03:25 +0000
Re: magic/absurd bash interpreter/compiler ? Eric <eric@deptj.eu> - 2012-12-26 12:51 +0000
Re: magic/absurd bash interpreter/compiler ? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-12-28 03:17 +0000
Re: magic/absurd bash interpreter/compiler ? Barry Margolin <barmar@alum.mit.edu> - 2012-12-28 10:25 -0500
csiph-web