← Back to team overview

kicad-developers team mailing list archive

Re: import directory

 

On Sat, May 05, 2012 at 06:06:16PM -0600, Frank bennett wrote:
> The standard is 'C'. The syntax for EDIF starts with a BNF
> definition. Any BNF for EEschema or PCBnew files? Then Yacc,
> Lex convert BNF (edif.y) to a 'C' state machine, which is fast.
> Does a BNF -> C++ exist? here is also one for Perl, probably not

bison and flex can generate C++ code IIRC (well, C++ compatible code at least). There are tons of such a tools (IIRC something even in boost)

> Java, C# either! I'm from the old school, BC++ and standard Unix/Linux,
> GNU make works just fine. I'm an embedded guy where 'C' code is a
> luxury, where processor speed and memory size resources are limited.

At least it seems I'm not the only one that remained here :D had to work with 'machines' with a whole 32 byte of ram. For these, C is too heavy:P Also rewrote major parts of an app in assembly during porting because the fscking fujitsu compiler took 4 whole usec to enter an interrupt (not fun when you're timing 8usec long events). So I know what you're talking about :D

> loop because clocks were not first turned on. C++ does not
> guarantee good, maintainable code. C++ is only sort of a standard.

Neither MISRA C for that:P C++ is a standard but most compilers simply don't follow it (also is hell as slow to compile but that could be 'fixed' with bigger hardware); I don't actually like it even if I'm somewhat proficient (most of the thing you gain from C++ are available in C with good libs like glib) but at least it usually works... just stay away from templates if you can since a wrong semicolon can give you a *single* error message long about a page of text (an good luck fixing it).

> Oh, where is the old/new EEschema reader syntax defined. It would
> be nice if the parser could support a blank or comment line for
> better .sch human readability. Also with a hierarchical schematic
> a file name in addition to the line# would be a great help debugging
> .sch generator tools.

At least there is a doc explaining *most* of it. No idea if it's up to date. But there's no unbounded nesting and the state is pretty easy to follow...

-- 
Lorenzo Marcantonio
Logos Srl


References