Commit d233cd8
committed
Add support for overlay/fragments in DevicetreeLexer and update example DTS file
The DTS lexer had issues with recognizing overlay/fragment syntax, whereby in
the following snippet:
&i2c1 {
serlcd@72 {
compatible = "sparkfun,serlcd";
reg = <0x72>;
columns = <16>;
rows = <2>;
command-delay-ms = <10>;
special-command-delay-ms = <50>;
};
};
the "i2c1" was being tokenized as a Name.Attribute instead of a Name.Function,
causing the rest of the lexing to fail as it encountered the "@" character.
This fixes the issue by adding proper support for overlay/fragment syntax.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>1 parent 28ec10c commit d233cd8
3 files changed
Lines changed: 117 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
75 | 82 | | |
76 | 83 | | |
77 | 84 | | |
| |||
88 | 95 | | |
89 | 96 | | |
90 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
91 | 106 | | |
92 | 107 | | |
93 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
82 | 93 | | |
83 | 94 | | |
84 | 95 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments