From: Franz Schrober <franzschrober@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: jw+debian@jameswestby.net, sparse@chrisli.org,
franzschrober@gmail.com, Franz Schrober <franzschrober@yahoo.de>
Subject: [PATCHv2 1/5] Revert "Update the information in README about using the library."
Date: Thu, 28 Nov 2013 11:16:18 +0100 [thread overview]
Message-ID: <1385633782-775-2-git-send-email-franzschrober@gmail.com> (raw)
In-Reply-To: <1385633782-775-1-git-send-email-franzschrober@gmail.com>
From: Franz Schrober <franzschrober@yahoo.de>
James Westby is the only person not reacting when asking him about the MIT
license change over email or social media. So he has to count as not accepting
and reverting his contributions is the only way to to avoid possible legal
problems. The contributions can be re-added later when they are rewritten from
scratch.
This reverts commit 34ac7df96dd9609d684b0c949a52bc07ab1fd8b5.
Cc: James Westby <jw+debian@jameswestby.net>
Signed-off-by: Franz Schrober <franzschrober@yahoo.de>
---
README | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/README b/README
index 63f752b..a731a82 100644
--- a/README
+++ b/README
@@ -47,22 +47,35 @@ requires the information.
This means that a user of the library will literally just need to do
- struct string_list *filelist = NULL;
- char *file;
+ struct token *token;
+ int fd = open(filename, O_RDONLY);
+ struct symbol_list *list = NULL;
- action(sparse_initialize(argc, argv, filelist));
+ if (fd < 0)
+ exit_with_complaint();
- FOR_EACH_PTR_NOTAG(filelist, file) {
- action(sparse(file));
- } END_FOR_EACH_PTR_NOTAG(file);
+ // Initialize parse symbols
+ init_symbols();
+
+ // Tokenize the input stream
+ token = tokenize(filename, fd, NULL);
+
+ // Pre-process the stream
+ token = preprocess(token);
+
+ // Parse the resulting C code
+ translation_unit(token, &list);
+
+ // Evaluate the types now if we want to
+ // Or leave it until later.
+ symbol_iterate(list, evaluate_symbol, NULL);
and he is now done - having a full C parse of the file he opened. The
library doesn't need any more setup, and once done does not impose any
more requirements. The user is free to do whatever he wants with the
parse tree that got built up, and needs not worry about the library ever
again. There is no extra state, there are no parser callbacks, there is
-only the parse tree that is described by the header files. The action
-function takes a pointer to a symbol_list and does whatever it likes with it.
+only the parse tree that is described by the header files.
The library also contains (as an example user) a few clients that do the
preprocessing, parsing and type evaluation and just print out the
--
1.8.4.4
next prev parent reply other threads:[~2013-11-28 10:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-28 10:16 [PATCHv2 0/5] sparse: Relicense from non-dfsg-free OSL 1.1 to MIT license Franz Schrober
2013-11-28 10:16 ` Franz Schrober [this message]
2013-11-28 10:16 ` [PATCHv2 2/5] Revert "Fix mistaken comparison that becomes a no-op." Franz Schrober
2013-11-28 10:16 ` [PATCHv2 3/5] sparse: Relicense under the MIT license Franz Schrober
2013-11-28 10:16 ` [PATCHv2 4/5] FAQ: Remove outdated section about the license Franz Schrober
2013-11-28 21:05 ` Josh Triplett
2013-11-29 12:19 ` Schrober
2013-11-29 12:30 ` [PATCHv3 4/5] FAQ: Remove outdated sections " Franz Schrober
2013-11-28 10:16 ` [PATCHv2 5/5] sparse: Also check bit_offset when checking implicit casts Franz Schrober
2013-11-28 10:22 ` [PATCHv2 0/5] sparse: Relicense from non-dfsg-free OSL 1.1 to MIT license Franz Schrober
[not found] ` <CANeU7Qkjvh4OeCWANFbV6COU4NvjB1pUGXwry7CNCrQz8WG0zw@mail.gmail.com>
2013-11-29 23:18 ` Fwd: " Christopher Li
2013-11-30 12:48 ` Franz Schrober
2013-12-03 8:17 ` Franz Schrober
2013-12-03 10:37 ` Dan Carpenter
2013-12-03 11:02 ` Schrober
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=1385633782-775-2-git-send-email-franzschrober@gmail.com \
--to=franzschrober@gmail.com \
--cc=franzschrober@yahoo.de \
--cc=jw+debian@jameswestby.net \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.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).