Re: [Haskell-cafe] ANN: bash-0.0.0
* Ivan Lazar Miljenovic ivan.miljeno...@gmail.com [2011-03-06 15:27:50+1100] On 6 March 2011 14:57, Jason Dusek jason.du...@gmail.com wrote: Many-a-time, have I used higher level languages to generate Bash scripts. Here, for the first time, I have taken the time to write a structured and safe Bash pretty printer, leveraging some work on shell escaping I did some months ago. http://hackage.haskell.org/packages/archive/bash/0.0.0/doc/html/Language-Bash.html Maybe this could be integrated with language-sh [1] to get parsing support as well? [1]: http://hackage.haskell.org/package/language-sh There's also Loker[2]. (I haven't done a proper hackage release yet.) Unfortunately, I wasn't aware of language-sh effort when I started Loker. [2]: https://github.com/feuerbach/loker -- Roman I. Cheplyaka :: http://ro-che.info/ Don't worry what people think, they don't do it very often. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: bash-0.0.0
On 6 March 2011 14:57, Jason Dusek jason.du...@gmail.com wrote: Many-a-time, have I used higher level languages to generate Bash scripts. Here, for the first time, I have taken the time to write a structured and safe Bash pretty printer, leveraging some work on shell escaping I did some months ago. http://hackage.haskell.org/packages/archive/bash/0.0.0/doc/html/Language-Bash.html Maybe this could be integrated with language-sh [1] to get parsing support as well? [1]: http://hackage.haskell.org/package/language-sh -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: bash-0.0.0
On Sun, Mar 6, 2011 at 04:27, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Maybe this could be integrated with language-sh [1] to get parsing support as well? [1]: http://hackage.haskell.org/package/language-sh It's hard to say without testing it; but anything labeled Sh probably won't parse real Bash very well. Would parsing a subset be enough? There are certain kinds of unescaped variable references that I don't plan to support in the Syntax; so there'd be nothing to parse them in to. Maybe I will have to rethink this part; I considered a Quoted (Expression t) constructor for Expression. A real parser should probably preserve comments, too. It is normal to include parsers in Language.Something modules; in this particular case, I assumed Bash analysis would not be used much. If you are interested in a way to wrap Bash you pull out of a file into a script you construct with the Syntax, you might try the Language.Bash.Annotations.Lines datatype. -- Jason Dusek Linux User #510144 | http://counter.li.org/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe