aboutsummaryrefslogtreecommitdiff
path: root/dtc-parser.y
AgeCommit message (Collapse)AuthorFilesLines
2007-09-18dtc: Whitespace cleanupDavid Gibson1-6/+6
This large patch removes all trailing whitespace from dtc (including libfdt, the testsuite and documentation). It also removes a handful of redundant blank lines (at the end of functions, or when there are two blank lines together for no particular reason). As well as anything else, this means that quilt won't whinge when I go to convert the whole of libfdt into a patch to apply to the kernel. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2007-07-07dtc: implement labels on property dataMilton Miller1-0/+4
Extend the parser grammer to allow labels before or after any property data (string, cell list, or byte list), and any byte or cell within the property data. Store the labels using the same linked list structure as node references, but using a parallel list. When writing assembly output emit global labels as offsets from the start of the definition of the data. Note that the alignment for a cell list is done as part of the opening < delimiter, not the = or , before it. To label a cell after a string or byte list put the label inside the cell list. For example, prop = zero: [ aa bb ], two: < four: 1234 > eight: ; will produce labels with offsets 0, 2, 4, and 8 bytes from the beginning of the data for property prop. Signed-off-by: Milton Miller <miltonm@bga.com>
2007-07-07dtc: implement labels on memory reserve slotsMilton Miller1-4/+4
Allow a label to be placed on a memory reserve entry. Change the parser to recognize and store them. Emit them when writing assembly output. Signed-off-by: Milton Miller <miltonm@bga.com>
2007-07-07dtc: complain about unparsed digits in cell listsMilton Miller1-3/+11
Check that strtoul() parsed the complete string. As with the number overflow case, write a non-fatal error message to stdout. Signed-off-by: Milton Miller <miltonm@bga.com>
2007-07-07dtc: move declaration of yyerrorMilton Miller1-1/+0
yyerror() is used by both dtc-parser.y and dtc-lexer.l, so move the declaration to srcpos.h. Signed-off-by: Milton Miller <miltonm@bga.com>
2007-03-26DTC: Add support for a C-like #include "file" mechanism.Jon Loeliger1-1/+8
Keeps track of open files in a stack, and assigns a filenum to source positions for each lexical token. Modified error reporting to show source file as well. No policy on file directory basis has been decided. Still handles stdin. Tested on all arch/powerpc/boot/dts DTS files Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-02-16Moved data_convert_cell() out of data.c to the parser.Jon Loeliger1-3/+27
It constructs a cell_t, not data objects. Renamed it to cell_from_string() as well. Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-02-15Add support for decimal, octal and binary based cell values.Jon Loeliger1-2/+14
New syntax d#, b#, o# and h# allow for an explicit prefix on cell values to specify their base. Eg: <d# 123> Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-02-08Allow multipart property valuesDavid Gibson1-3/+10
At present each property definition in a dts file must give as the value either a string ("abc..."), a bytestring ([12abcd...]) or a cell list (<1 2 3 ...>). This patch allows a property value to be given as several of these, comma-separated. The final property value is just the components appended together. So a property could have a list of cells followed by a string, or a bytestring followed by some cells. Cells are always aligned, so if cells are given following a string or bytestring which is not a multiple of 4 bytes long, zero bytes are inserted to align the following cells. The primary motivation for this feature, however, is to allow defining a property as a list of several strings. This is what's needed for defining OF 'compatible' properties, and is less ugly and fiddly than using embedded \0s in the strings. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Jon Loeliger <jdl@freescale.com>
2005-10-24Rework tracking of reserve entries during processing. This is initial workDavid Gibson1-10/+7
to allow more powerful handling of reserve entries.
2005-10-19Rudimentary support for reporting the line number of syntax errors.David Gibson1-3/+4
2005-07-15Support for specifying memreserve ranges in the source format, based onDavid Gibson1-4/+35
a patch by Jon Loeliger <jdl AT freescale.com>, although tweaked substantially.
2005-07-11Use u8 instead of uint8_t, as we do with the other size types.David Gibson1-1/+1
2005-06-17Remove build_empty_property(). It wasn't useful.David Gibson1-1/+1
2005-06-16Rudimentary phandle reference support.David Gibson1-0/+4
2005-06-16Initial label support. Also switch to glr-parser mode and get rid ofDavid Gibson1-6/+19
hacks that were necessary without it.
2005-06-08Initial commitDavid Gibson1-0/+116