diff --git a/pydevicetree/source/grammar.py b/pydevicetree/source/grammar.py index cabf917..a7941d0 100644 --- a/pydevicetree/source/grammar.py +++ b/pydevicetree/source/grammar.py @@ -21,7 +21,7 @@ node_name = p.Word(p.alphanums + ",.-+_") ^ p.Literal("/") integer = p.pyparsing_common.integer ^ (p.Literal("0x").suppress() + p.pyparsing_common.hex_integer) -unit_address = p.pyparsing_common.hex_integer +unit_address = p.pyparsing_common.hex_integer ^ (p.Literal("0x").suppress() + p.pyparsing_common.hex_integer) ^ p.Word(p.alphanums + "_,") node_handle = node_name("node_name") + p.Optional(p.Literal("@") + unit_address("address")) property_name = p.Word(p.alphanums + ",.-_+?#") label = p.Word(p.alphanums + "_").setResultsName("label")