| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
The sparse interface is a kind of snaky that it change the input argument
array. The function sparse() does the same hack just to skip the files.
This patch add the ptr list for string. So sparse_initialize will
return list of file to compile. The string pointer is not aligned
at word boundary. This patch introduce non taged version of the ptr
list iteration function.
Signed-off-by: Christopher Li <sparse@chrisli.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Start off with
sparse_initialize(argc, argv);
which will return the number of filenames found. You can then use that,
or just check if *argv is NULL in a loop like
while (*argv)
list = sparse(argv);
where you get the declaration list for each file in turn.
|
|
|
|
| |
All donw now, methinks.
|
| |
|
|
|
|
| |
Maybe this makes us gcc-compatible. Maybe it doesn't.
|
|
|
|
| |
This makes "-m64" actually work.
|
|
|
|
| |
isn't the sole copyright owner these days.
|
| |
|
| |
|
|
|
|
| |
the real one when it goes out the door.
|
|
|
|
|
|
|
| |
to it, instead of having everybody have pointers to "struct token"
only because they wanted to have the position.
Fix array addition type degeneration.
|
| |
|
|
|
|
|
|
|
|
|
| |
specifiers parsing (which is a proper superset of the much more limited
parsing that we wanted at this point).
Parse void and ellipsis arguments in function argument lists.
Parse named structure member initializers.
|
|
|
|
| |
to change it from the callers..
|
|
|
|
| |
placeholder LICENSE file.
|
| |
|
|
|
|
|
| |
#ifndef X ... #endif X if X is already defined. This avoids
doing unnecessary work on duplicate includes.
|
| |
|
|
|
|
|
|
|
|
|
| |
meaningful in parsing: at preprocessor macro definition time, where
the whitespace between the macro name and the potentially following
'(' determines whether the macro takes arguments or not.
Make tokenization save off one bit of whitespace (in addition to the
one bit of newline that it already saves off).
|
| |
|
|
|
|
| |
'elif'.
|
|
|
|
| |
Make tokens know about newlines
|
|
|
|
|
|
|
|
| |
do not want any allocation overhead when some of the data structures
average a length of 2.8 bytes (integer constant tokens).
Fix up integer constant token parsing (don't try to evaluate them
at parse-time, we just lose information that way).
|
|
|
|
| |
Make string constants contain the final '\0' at the end.
|
|
|
|
| |
This adds a layer of symbol information on top of the raw tokens.
|
|
|
|
|
|
| |
Add support for parsing function calls.
Cleanup namespace.
|
|
|
|
|
|
| |
simple binops so far, type parsing is still way off).
Clean up and update tokenization.
|
|
to do a semantic parser that is smaller than gcc is.
Right now this is just the lexer, though, along with a test app to print
the results back out to verify the thing.
|