This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Adding Python as a possible language and it's usage
On 19/07/18 12:30, Florian Weimer wrote:
> * Segher Boessenkool:
>
>> What would the advantage of using Python be? I haven't heard any yet.
>> Awk may be a bit clunky but at least it is easily readable for anyone.
>
> I'm not an experienced awk programmer, but I don't think plain awk
> supports arrays of arrays, so there's really no good way to emulate
> user-defined data types and structure the code.
>
You can do multi-dimentional arrays in awk. They're flattened a bit
like tcl ones are, but there are ways of iterating over a dimention.
See, for example, config/arm/parsecpu.awk which gets up to tricks like that.
R.