Name Date Size

..27-Apr.-20224 KiB

.gitignoreH A D17-Apr.-2021425

allocate.cH A D30-Sep.-20194.7 KiB

allocate.hH A D30-Sep.-20192.7 KiB

ast-inspect.cH A D04-Nov.-20196.7 KiB

ast-inspect.hH A D23-Nov.-2017330

ast-model.cH A D23-Nov.-201714.4 KiB

ast-model.hH A D23-Nov.-20172.2 KiB

ast-view.cH A D23-Nov.-20171.1 KiB

ast-view.hH A D23-Nov.-201795

bitmap.hH A D23-Nov.-20171.4 KiB

bits.hH A D29-Nov.-20201.4 KiB

builtin.cH A D31-May-202230.2 KiB

builtin.hH A D17-Apr.-2021353

c2xml.cH A D14-Nov.-20187.7 KiB

cgccH A D09-Jun.-202210.7 KiB

cgcc.1H A D23-Nov.-20171 KiB

char.cH A D10-Aug.-20203.3 KiB

char.hH A D23-Nov.-2017148

compat/H23-Nov.-20174 KiB

compat-bsd.cH A D05-Jul.-20201.1 KiB

compat-cygwin.cH A D23-Nov.-20171.7 KiB

compat-linux.cH A D23-Nov.-2017119

compat-mingw.cH A D23-Nov.-20171.6 KiB

compat-solaris.cH A D05-Jul.-202026

compat.hH A D20-Dec.-2018685

compile-i386.cH A D16-Feb.-202154.8 KiB

compile.cH A D14-Nov.-20182.4 KiB

compile.hH A D23-Nov.-2017199

cse.cH A D18-Apr.-20218.1 KiB

cse.hH A D14-Nov.-2018176

ctags.cH A D14-Nov.-20185.6 KiB

dissect.cH A D21-May-202216.4 KiB

dissect.hH A D20-Feb.-2020759

Documentation/H17-Apr.-20214 KiB

dominate.cH A D14-Nov.-20183.4 KiB

dominate.hH A D14-Nov.-2018258

evaluate.cH A D27-Jun.-202298.1 KiB

evaluate.hH A D09-Aug.-2020973

example.cH A D24-Nov.-202044.1 KiB

expand.cH A D05-Jun.-202232.7 KiB

expand.hH A D23-Nov.-20171.5 KiB

expression.cH A D05-Jun.-202226.1 KiB

expression.hH A D05-Jun.-20228.9 KiB

FAQH A D23-Nov.-20173.3 KiB

flow.cH A D18-Apr.-202123.3 KiB

flow.hH A D18-Apr.-20211.5 KiB

flowgraph.cH A D29-Jan.-20204.8 KiB

flowgraph.hH A D17-Nov.-2020842

gcc-attr-list.hH A D28-Mar.-20194.4 KiB

gdbhelpersH A D28-Nov.-20195.1 KiB

graph.cH A D14-Nov.-20185.7 KiB

gvpr/H23-Nov.-20174 KiB

ident-list.hH A D17-Apr.-20212.2 KiB

inline.cH A D27-Jun.-202215.6 KiB

ir.cH A D24-Nov.-20204 KiB

ir.hH A D14-Nov.-2018101

lib.cH A D16-Feb.-202111.4 KiB

lib.hH A D16-Feb.-20217 KiB

LICENSEH A D23-Nov.-20171.5 KiB

linearize.cH A D18-Apr.-202166.8 KiB

linearize.hH A D20-Apr.-20218.7 KiB

liveness.cH A D08-Mar.-20217.1 KiB

liveness.hH A D14-Nov.-2018227

machine.hH A D18-Jul.-20202.9 KiB

MakefileH A D06-Sep.-20218.1 KiB

memops.cH A D18-Apr.-20216.7 KiB

obfuscate.cH A D14-Nov.-20182.2 KiB

opcode.cH A D11-Nov.-20201.5 KiB

opcode.defH A D24-Nov.-20206.7 KiB

opcode.hH A D24-Nov.-20201 KiB

optimize.cH A D01-Dec.-20202.5 KiB

optimize.hH A D14-Nov.-2018122

options.cH A D31-May-202224.5 KiB

options.hH A D21-May-20223.4 KiB

parse.cH A D05-Jun.-202283.8 KiB

parse.dtdH A D23-Nov.-20171.6 KiB

parse.hH A D06-Jul.-20204.4 KiB

pre-process.cH A D05-Mar.-202155.3 KiB

predefine.cH A D17-Jun.-20229.2 KiB

ptrlist.cH A D08-Mar.-202111.2 KiB

ptrlist.hH A D08-Mar.-20219.5 KiB

ptrmap.cH A D14-Nov.-20182.6 KiB

ptrmap.hH A D14-Nov.-2018865

READMEH A D14-Nov.-20182.9 KiB

scheck.cH A D02-Aug.-202110.4 KiB

scope.cH A D21-May-20204.1 KiB

scope.hH A D21-May-20202.1 KiB

semind.1H A D05-Aug.-20202.9 KiB

semind.cH A D21-May-202228.2 KiB

show-parse.cH A D05-Mar.-202128.1 KiB

simplify.cH A D02-Aug.-202169.9 KiB

simplify.hH A D01-Dec.-2020192

sort.cH A D14-Nov.-20185.6 KiB

sparse-llvm-disH A D14-Nov.-2018271

sparse-llvm.cH A D08-Mar.-202131.1 KiB

sparse.1H A D21-Oct.-202019.6 KiB

sparse.cH A D21-May-20228 KiB

sparsecH A D13-Oct.-2019958

sparseiH A D23-Nov.-2018404

ssa.cH A D18-Apr.-20218.6 KiB

ssa.hH A D14-Nov.-201898

stats.cH A D23-Nov.-20171.7 KiB

storage.cH A D08-Mar.-20216.6 KiB

storage.hH A D23-Nov.-20171.7 KiB

symbol.cH A D23-Jan.-202127.7 KiB

symbol.hH A D02-Jan.-202116.4 KiB

target-alpha.cH A D18-Jul.-2020986

target-arm.cH A D18-Jul.-20201.1 KiB

target-arm64.cH A D18-Jul.-2020847

target-bfin.cH A D13-Jun.-2020563

target-default.cH A D22-Jan.-2020190

target-h8300.cH A D18-Jul.-2020663

target-m68k.cH A D18-Jul.-2020572

target-microblaze.cH A D18-Jul.-2020697

target-mips.cH A D18-Jul.-20201.2 KiB

target-nds32.cH A D18-Jul.-2020640

target-nios2.cH A D18-Jul.-20201.1 KiB

target-openrisc.cH A D18-Jul.-2020582

target-ppc.cH A D18-Jul.-20201.6 KiB

target-riscv.cH A D05-Jun.-20224 KiB

target-s390.cH A D18-Jul.-20201.3 KiB

target-sh.cH A D18-Jul.-2020666

target-sparc.cH A D18-Jul.-20201.6 KiB

target-x86.cH A D11-Oct.-20203.4 KiB

target-xtensa.cH A D28-Jul.-2020583

target.cH A D18-Jul.-20206.5 KiB

target.hH A D18-Jul.-20204.1 KiB

test-dissect.cH A D21-May-20222.7 KiB

test-inspect.cH A D05-Jul.-2020899

test-lexing.cH A D14-Nov.-20181.7 KiB

test-linearize.cH A D14-Nov.-20182 KiB

test-parsing.cH A D02-Jan.-20212.4 KiB

test-show-type.cH A D10-Nov.-2019512

test-sort.cH A D23-Nov.-2017852

test-unssa.cH A D14-Nov.-20181.7 KiB

token.hH A D21-May-20226.5 KiB

tokenize.cH A D09-Jun.-202223.2 KiB

unssa.cH A D14-Nov.-20183.5 KiB

utils.cH A D06-Jul.-2020956

utils.hH A D06-Jul.-20201.3 KiB

validation/H09-Jun.-202220 KiB

version.cH A D16-Feb.-202184


2  sparse (spärs), adj,., spars-er, spars-est.
3	1. thinly scattered or distributed; "a sparse population"
4	2. thin; not thick or dense: "sparse hair"
5	3. scanty; meager.
6	4. semantic parse
7  	[ from Latin: spars(us) scattered, past participle of
8	  spargere 'to sparge' ]
10	Antonym: abundant
12Sparse is a semantic parser of source files: it's neither a compiler
13(although it could be used as a front-end for one) nor is it a
14preprocessor (although it contains as a part of it a preprocessing
17It is meant to be a small - and simple - library.  Scanty and meager,
18and partly because of that easy to use.  It has one mission in life:
19create a semantic parse tree for some arbitrary user for further
20analysis.  It's not a tokenizer, nor is it some generic context-free
21parser.  In fact, context (semantics) is what it's all about - figuring
22out not just what the grouping of tokens are, but what the _types_ are
23that the grouping implies.
25And no, it doesn't use lex and yacc (or flex and bison).  In my personal
26opinion, the result of using lex/yacc tends to end up just having to
27fight the assumptions the tools make. 
29The parsing is done in five phases:
31 - full-file tokenization
32 - pre-processing (which can cause another tokenization phase of another
33   file)
34 - semantic parsing.
35 - lazy type evaluation
36 - inline function expansion and tree simplification
38Note the "full file" part. Partly for efficiency, but mostly for ease of
39use, there are no "partial results". The library completely parses one
40whole source file, and builds up the _complete_ parse tree in memory.
42Also note the "lazy" in the type evaluation.  The semantic parsing
43itself will know which symbols are typedefines (required for parsing C
44correctly), but it will not have calculated what the details of the
45different types are.  That will be done only on demand, as the back-end
46requires the information. 
48This means that a user of the library will literally just need to do
50  struct string_list *filelist = NULL;
51  char *file;
53  action(sparse_initialize(argc, argv, filelist));
55  FOR_EACH_PTR(filelist, file) {
56    action(sparse(file));
57  } END_FOR_EACH_PTR(file);
59and he is now done - having a full C parse of the file he opened.  The
60library doesn't need any more setup, and once done does not impose any
61more requirements.  The user is free to do whatever he wants with the
62parse tree that got built up, and needs not worry about the library ever
63again.  There is no extra state, there are no parser callbacks, there is
64only the parse tree that is described by the header files. The action
65funtion takes a pointer to a symbol_list and does whatever it likes with it.
67The library also contains (as an example user) a few clients that do the
68preprocessing, parsing and type evaluation and just print out the
69results.  These clients were done to verify and debug the library, and
70also as trivial examples of what you can do with the parse tree once it
71is formed, so that users can see how the tree is organized.