pcb

Comment 1 for bug 1776089

Revision history for this message
Chad Parker (parker-charles) wrote :

Okay, I managed to fix the bison warnings. Branch: LP1776089

This took a while to figure out. One issue had to do with the path for loading elements to a buffer. If "Element" is the first thing in a file, either of these could be valid parse paths:

parse -> parsepcb -> element

or

parse -> parsedata -> pcbdata -> pcbdefinitions -> pcbdefinition -> element

The first was intended for parsing element files, the second for parsing elements in pcb files or "data" files.

I've fixed this by removing the first path, and merging it with the second path. There's a new variable file_type that is an enumerated type that is set depending on the type of file being parsed. The second path now checks that variable and parses the element data appropriately.

The other conflict was similar. There were two paths to "error".

parse -> error

or

parse -> parsedata -> pcbdata -> pcbdefinitions -> pcbdefinition -> error

I fixed this by deleting the second path. This could be used for error recovery, but, our error recovery strategy is presently to abort, it doesn't really do anything anyway. A syntax error is still reported and the load is aborted.