From: Anton Staaf <robotboy-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: [PATCH v4 0/3] Support character literals
Date: Fri, 9 Sep 2011 12:16:28 -0700 [thread overview]
Message-ID: <1315595791-25793-1-git-send-email-robotboy@chromium.org> (raw)
These patches add simple and escaped character literal parsing support
to the dtc for cell lists and bytestrings. The first patch refactors the
string parsing code in data.c to expose the more primitive character parsing
code for use in the later patches. I have left the bytestring support in
place but my hope is that it is now separate enough to be discussed
independantly of the refactor and cell list changes.
Thanks,
Anton
Changes in v4:
- Make character literal regex more permissive
- Check for empty character literal in eval_char_literal
- Allow lexing of character literals in all contexts
- Remove special case lexing of character literals in bytestrings
Changes in v3:
- Make octal and hex parsing code static to util.c
- Add test cases for both cell lists and bytestings w/ character literals
- Better error handling and simpler lexing
- Removed changes to out of date manual.txt
- Simplify use of get_escape_char in data_copy_escape_string
- Remove get_escape_char_exact
Changes in v2:
- Move the refactor of data.c to a separate patch
- Add support for character literals in cell lists
- Merge normal and escaped literal support for bytestrings into single patch
Anton Staaf (3):
dtc: Refactor character literal parsing code
dtc: Support character literals in cell lists
dtc: Support character literals in bytestrings
Documentation/dts-format.txt | 7 ++-
data.c | 85 ++----------------------------------
dtc-lexer.l | 8 +++
dtc-parser.y | 36 +++++++++++++++
tests/.gitignore | 1 +
tests/Makefile.tests | 1 +
tests/char_literal.c | 58 ++++++++++++++++++++++++
tests/char_literal.dts | 6 +++
tests/run_tests.sh | 3 +
tests/testdata.h | 6 +++
util.c | 99 ++++++++++++++++++++++++++++++++++++++++++
util.h | 8 +++
12 files changed, 234 insertions(+), 84 deletions(-)
create mode 100644 tests/char_literal.c
create mode 100644 tests/char_literal.dts
--
1.7.3.1
next reply other threads:[~2011-09-09 19:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-09 19:16 Anton Staaf [this message]
[not found] ` <1315595791-25793-1-git-send-email-robotboy-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2011-09-09 19:16 ` [PATCH v4 1/3] dtc: Refactor character literal parsing code Anton Staaf
[not found] ` <1315595791-25793-2-git-send-email-robotboy-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2011-09-09 21:07 ` Jon Loeliger
2011-09-09 19:16 ` [PATCH v4 2/3] dtc: Support character literals in cell lists Anton Staaf
[not found] ` <1315595791-25793-3-git-send-email-robotboy-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2011-09-12 0:44 ` David Gibson
[not found] ` <20110912004437.GG9025-787xzQ0H9iQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2011-09-17 16:49 ` Jon Loeliger
[not found] ` <E1R4y4v-0000Nf-5A-CYoMK+44s/E@public.gmane.org>
2011-09-19 2:00 ` David Gibson
[not found] ` <20110919020034.GJ9025-787xzQ0H9iQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2011-09-19 16:45 ` Anton Staaf
[not found] ` <CAF6FioU5_uEh0fLyRBnD7DkPyo_UfjAaWxNONXSxDukpg3QPeg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-20 0:59 ` David Gibson
[not found] ` <20110920005931.GB29197-787xzQ0H9iQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2011-09-20 2:54 ` Anton Staaf
[not found] ` <CAF6FioWTyMEf_BP+_VcJ57jqQt-y9np0n7SkTy6TFMNWWQE-MQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-20 3:34 ` David Gibson
[not found] ` <20110920033441.GI29197-787xzQ0H9iQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2011-09-21 19:38 ` Anton Staaf
[not found] ` <CAF6FioUJkya4kSFQ6+6tYbGcNw5WPSUT8UkgUANmqhhBwZhU1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-22 2:09 ` David Gibson
[not found] ` <20110922020916.GC22223-787xzQ0H9iQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2011-09-22 14:29 ` Jon Loeliger
2011-09-22 14:27 ` Jon Loeliger
2011-09-09 19:16 ` [PATCH v4 3/3] dtc: Support character literals in bytestrings Anton Staaf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1315595791-25793-1-git-send-email-robotboy@chromium.org \
--to=robotboy-f7+t8e8rja9g9huczpvpmw@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).