projects
/
b43-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ssb-sprom: Fix for incorrect Subsystem and PCI Product IDs on rev 4 SPROMs
[b43-tools.git]
/
assembler
/
scanner.l
diff --git
a/assembler/scanner.l
b/assembler/scanner.l
index bb866a93d1c7d302959d1e3617274dfb8a574414..5013d0e94e4e0a430fcab9f357624686cd2a7888 100644
(file)
--- a/
assembler/scanner.l
+++ b/
assembler/scanner.l
@@
-51,6
+51,7
@@
NEWLINE ((\r)|(\n)|(\r\n))
^{WS}*"%"{WS}*arch { update_lineinfo(); return ASM_ARCH; }
^{WS}*"%"{WS}*start { update_lineinfo(); return ASM_START; }
^{WS}*"%"{WS}*arch { update_lineinfo(); return ASM_ARCH; }
^{WS}*"%"{WS}*start { update_lineinfo(); return ASM_START; }
+"%"{WS}*assert { update_lineinfo(); return ASM_ASSERT; }
^{WS}*\.text{WS}*$ { update_lineinfo(); return SECTION_TEXT; }
^{WS}*\.initvals/\({IDENTIFIER}\) { update_lineinfo(); return SECTION_IVALS; }
^{WS}*\.text{WS}*$ { update_lineinfo(); return SECTION_TEXT; }
^{WS}*\.initvals/\({IDENTIFIER}\) { update_lineinfo(); return SECTION_IVALS; }
@@
-67,6
+68,10
@@
lr/[0-3] { update_lineinfo(); return LR; }
\( { update_lineinfo(); return PAREN_OPEN; }
\) { update_lineinfo(); return PAREN_CLOSE; }
\( { update_lineinfo(); return PAREN_OPEN; }
\) { update_lineinfo(); return PAREN_CLOSE; }
+== { update_lineinfo(); return EQUAL; }
+!= { update_lineinfo(); return NOT_EQUAL; }
+\|\| { update_lineinfo(); return LOGICAL_OR; }
+\&\& { update_lineinfo(); return LOGICAL_AND; }
\+ { update_lineinfo(); return PLUS; }
\- { update_lineinfo(); return MINUS; }
\* { update_lineinfo(); return MULTIPLY; }
\+ { update_lineinfo(); return PLUS; }
\- { update_lineinfo(); return MINUS; }
\* { update_lineinfo(); return MULTIPLY; }
@@
-149,6
+154,7
@@
shm32 { update_lineinfo(); return IVAL_SHM32; }
%%
struct lineinfo cur_lineinfo;
%%
struct lineinfo cur_lineinfo;
+//FIXME The linenumber sometimes is wrong.
static void interpret_cppinfo(const char *str)
{
static void interpret_cppinfo(const char *str)
{
@@
-175,7
+181,7
@@
static void interpret_cppinfo(const char *str)
memset(tmp, 0, sizeof(tmp));
memcpy(tmp, str, min(sizeof(tmp) - 1,
(int)(found - str)));
memset(tmp, 0, sizeof(tmp));
memcpy(tmp, str, min(sizeof(tmp) - 1,
(int)(found - str)));
- cur_lineinfo.lineno = strtoul(tmp, NULL, 10);
+ cur_lineinfo.lineno = strtoul(tmp, NULL, 10)
- 1
;
str = found;
str++;
str = found;
str++;