Gentoo Archives: gentoo-portage-dev

From: Nathan Eloe <powerofazure@×××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Google Summer of Code: Bash AST and grammar
Date: Wed, 21 Jul 2010 17:04:39
Message-Id: 4C471F93.8010502@gmail.com
In Reply to: Re: [gentoo-portage-dev] Google Summer of Code: Bash AST and grammar by Sebastian Pipping
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 On 7/21/10 10:25 AM, Sebastian Pipping wrote:
5 > On 07/21/10 16:56, Sebastian Pipping wrote:
6 >> A few things I haven't seen, yet:
7 >>
8 >> # Adjacent changes in quotation
9 >> echo "abc"'"'"def" # Makes abc"def
10 >>
11 >> # Escape sequences like ..
12 >> echo "abc\"def"
13 >>
14 >> # Invocation from ibnside strings
15 >> echo "foo $(echo foo), bar `echo bar`"
16
17 I'll test those, though I think the only one that I haven't even thought
18 about was the escape sequences
19
20 >> # Heredocs (and their variations ..)
21 >> cat <<EOF >/dev/stdout
22 >> 1
23 >> 2
24 >> EOF
25 >>
26
27 Heredocs/strings are... present but broken. The problem is they just
28 consume strings like crazy. Perhaps with some semantic predicates I can
29 get it to stop at the end. For now though it would just keep consuming
30 till the end of the file
31
32 >> # Construct of $((..))
33 >> # Refs to variable withzout "$" upfront
34 >> z=3; echo $((z+3))
35 >
36 > An important one I forgot:
37 >
38 > # Line continuation
39 > echo one \
40 > two
41 >
42
43 Both of these have yet to be implemented, though doing so should be trivial.
44
45 Thanks for the input! Any and all input I can get is helpful.
46
47 Nathan
48 -----BEGIN PGP SIGNATURE-----
49 Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
50 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
51
52 iEYEARECAAYFAkxHH5MACgkQFpoRlVgtqKbnfwCbBdgYaqZfSLxa7GTgrtV1wZfg
53 e94An3HkOPUE6BVQ1YsyeogJ92ZsRK6z
54 =5ezP
55 -----END PGP SIGNATURE-----