aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* cleanup write to argument array hackChristopher Li2006-12-041-3/+7
| | | | | | | | | | | | 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>
* Update the calling interface to "sparse()".Linus Torvalds2005-08-031-1/+3
| | | | | | | | | | | | | | 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.
* Make "test-lexing" use sparse() infrastructure.Linus Torvalds2005-04-071-31/+2
| | | | All donw now, methinks.
* Janitorial trivialities.welinder@darter.rentec.com2005-04-071-1/+1
|
* Make "next_path" be per-stream for better "include_next".Linus Torvalds2005-04-071-1/+1
| | | | Maybe this makes us gcc-compatible. Maybe it doesn't.
* Initialize C type system after parsing the command line arguments.Linus Torvalds2005-04-071-0/+4
| | | | This makes "-m64" actually work.
* Update copyright notices to reflect the fact that TransmetaLinus Torvalds2005-04-071-0/+1
| | | | isn't the sole copyright owner these days.
* Make the example clients be under the OSL v1.1 too. Linus Torvalds2005-04-071-1/+3
|
* Make test-lexer output indentation.Linus Torvalds2005-04-071-3/+8
|
* Change the copyright to Transmeta Corp, that's likely to beLinus Torvalds2005-04-071-1/+1
| | | | the real one when it goes out the door.
* Introduce a "struct position", and have the different types referLinus Torvalds2005-04-071-2/+2
| | | | | | | to it, instead of having everybody have pointers to "struct token" only because they wanted to have the position. Fix array addition type degeneration.
* Add preprocessor directives to manipulate the include path.Linus Torvalds2005-04-071-14/+0
|
* Parse type qualifiers properly instead of re-using the declarationLinus Torvalds2005-04-071-0/+1
| | | | | | | | | 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.
* Move includepath[] array out of pre-processor, since we wantLinus Torvalds2005-04-071-0/+13
| | | | to change it from the callers..
* Add copyright statements and file comments. Add a FAQ, README, andLinus Torvalds2005-04-071-0/+6
| | | | placeholder LICENSE file.
* Fix up warnings by adding includes and the proper prototypes.Linus Torvalds2005-04-071-0/+1
|
* Avoid re-tokenizing header files that are protected byLinus Torvalds2005-04-071-0/+1
| | | | | #ifndef X ... #endif X if X is already defined. This avoids doing unnecessary work on duplicate includes.
* Fix fd leak in tokenization.Linus Torvalds2005-04-071-0/+1
|
* Tokenization drops whitespace, but there is one area where it isLinus Torvalds2005-04-071-3/+5
| | | | | | | | | 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).
* Whitespace and comment fixes for testersLinus Torvalds2005-04-071-0/+1
|
* Teach the preprocessing pass to handle 'include' and Linus Torvalds2005-04-071-4/+4
| | | | 'elif'.
* Add initial preprocessor pass (doesn't actually do much)Linus Torvalds2005-04-071-0/+1
| | | | Make tokens know about newlines
* Implement space-efficient allocator for small data structures. WeLinus Torvalds2005-04-071-2/+2
| | | | | | | | 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 lexing tester print out string constants properly.Linus Torvalds2005-04-071-13/+6
| | | | Make string constants contain the final '\0' at the end.
* Start handling minimal semantic information, needed for types.Linus Torvalds2005-04-071-0/+2
| | | | This adds a layer of symbol information on top of the raw tokens.
* Mark local parsing functions 'static'.Linus Torvalds2005-04-071-1/+1
| | | | | | Add support for parsing function calls. Cleanup namespace.
* Add simple recursive-descent C expression parsing (but we only do theLinus Torvalds2005-04-071-91/+1
| | | | | | simple binops so far, type parsing is still way off). Clean up and update tokenization.
* Yaah. I'm a retard, but I want to at least try to see how hard it isLinus Torvalds2005-04-071-0/+126
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.