* [PATCH] Update README to match changes in the initialization code
@ 2006-12-18 17:01 James Westby
2006-12-18 22:43 ` James Westby
0 siblings, 1 reply; 3+ messages in thread
From: James Westby @ 2006-12-18 17:01 UTC (permalink / raw)
To: linux-sparse
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-27 19:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-18 17:01 [PATCH] Update README to match changes in the initialization code James Westby
2006-12-18 22:43 ` James Westby
2007-02-27 19:05 ` Josh Triplett
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).