Mail Archives: geda-user/2015/02/06/13:46:07
On Fri, 6 Feb 2015, John Doty wrote:
>
> On Feb 6, 2015, at 9:29 AM, Jason White <whitewaterssoftwareinfo AT gmail DOT com> wrote:
>
>> For those who have not seen, I implemented an example program in C
>> using Lua to safely read data defined in Lua files.
>
> And that is of little use. The schematic and configuration files need to be trivially readable/writable by *any* language that the tool maker chooses (AWK, perl, Python, ObjectiveC, ?). The geda-gaf schematic format is already excellent from that perspective. Guile configuration files are less satisfactory. Formats tied to a specific language implementation are not a good idea.
I agree. Another aspect of the same thing: ideally, the cost of
implementing importers, exporters or filters should be low, independelty
of the language the user picks. When this works, the cost is either
equally hard or equally easy.
If we go for the easy parsing, the language should be small and simple.
A turing complete scripting language is usually not the smallest or
simplest approach. a subset of such a language is better, but may still be
too feature-rich. Unless you assume everyone will use a lua interpreter...
So the question is: what's the smallest C or python or awk or whatever
non-lua program you can write that can parse the file _without_ depending
on a lua interpreter? And how far can it go supporting the user
exploiting lua features?
Regards,
Igor2
- Raw text -