From: James Westby <jw+debian@jameswestby.net>
To: linux-sparse@vger.kernel.org
Subject: [PATCH] Update README to match changes in the initialization code
Date: Mon, 18 Dec 2006 17:01:13 +0000 [thread overview]
Message-ID: <20061218170107.GA7269@jameswestby.net> (raw)
There have been changes in the functions to call to get the parse tree
from sparse, so update the README file to reflect these changes.
Signed-off-by: James Westby <jw+debian@jameswestby.net>
---
README | 20 +++-----------------
1 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/README b/README
index 6b1034b..b9ee73c 100644
--- a/README
+++ b/README
@@ -47,28 +47,14 @@ requires the information.
This means that a user of the library will literally just need to do
- struct token *token;
- int fd = open(filename, O_RDONLY);
struct symbol_list *list = NULL;
- if (fd < 0)
- exit_with_complaint();
-
- // 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);
+ // Initialise sparse and tokenize, preprocess and parse the file.
+ list = sparse(filename);
// Evaluate the types now if we want to
// Or leave it until later.
- symbol_iterate(list, evaluate_symbol, NULL);
+ evaluate_symbol_list(list);
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
--
1.4.4.2
next reply other threads:[~2006-12-18 22:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-18 17:01 James Westby [this message]
2006-12-18 22:43 ` [PATCH] Update README to match changes in the initialization code James Westby
2007-02-27 19:05 ` Josh Triplett
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=20061218170107.GA7269@jameswestby.net \
--to=jw+debian@jameswestby.net \
--cc=linux-sparse@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.