* dtc: Fix recognition of whitespace characters
@ 2007-06-07 2:07 David Gibson
2007-06-07 2:56 ` Jon Loeliger
0 siblings, 1 reply; 2+ messages in thread
From: David Gibson @ 2007-06-07 2:07 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev, Mark Lacas
At present, the lexer in dtc recognizes only space, tab and newline as
whitespace characters. This is broken; in particular this means that
dtc will get syntax errors on files with DOS-style (CR-LF) newlines.
This patch fixes the problem, using flex's built-int [:space:]
character class.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
Jon, please apply.
Index: dtc/dtc-lexer.l
===================================================================
--- dtc.orig/dtc-lexer.l 2007-06-07 12:00:31.000000000 +1000
+++ dtc/dtc-lexer.l 2007-06-07 12:03:31.000000000 +1000
@@ -27,7 +27,7 @@
PROPCHAR [a-zA-Z0-9,._+*#?-]
UNITCHAR [0-9a-f,]
-WS [ \t\n]
+WS [[:space:]]
REFCHAR ({PROPCHAR}|{UNITCHAR}|[/@])
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: dtc: Fix recognition of whitespace characters
2007-06-07 2:07 dtc: Fix recognition of whitespace characters David Gibson
@ 2007-06-07 2:56 ` Jon Loeliger
0 siblings, 0 replies; 2+ messages in thread
From: Jon Loeliger @ 2007-06-07 2:56 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev, Mark Lacas
So, like, the other day David Gibson mumbled:
> At present, the lexer in dtc recognizes only space, tab and newline as
> whitespace characters. This is broken; in particular this means that
> dtc will get syntax errors on files with DOS-style (CR-LF) newlines.
Doctor, it hurts when I use DOS. :-)
> This patch fixes the problem, using flex's built-int [:space:]
> character class.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>
> Jon, please apply.
Applied.
Thanks,
jdl
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-07 2:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-07 2:07 dtc: Fix recognition of whitespace characters David Gibson
2007-06-07 2:56 ` Jon Loeliger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).