2007-09-08  Matthieu Lemerre  <racin@free.fr>

	Support for subtypes; function coerced_form can be use to coerce a
	type into its supertype.

	* test/malebolge14-subtypes.l : New test file.

	* src/expander/Makefile.am : Compiles subtype.c

	* src/expander/expand-define.c (expand_all_subtypes): New
	function.
	(expand_all): Call it.

	* src/expander/subtype.l : New file.
	* src/expander/expand.c (declare_function_end): Coercion for the
	return value of a function.
	(init_expand): Calls init__subtype.

	* src/include/l/type.l (Module): New file.

2007-09-06  Matthieu Lemerre  <racin@free.fr>

	Handling of constants.

	* src/init.l (true, false): New constants.
	* src/expander/expand-define.c : Rename define_global to
	define_global_variable.
	Handling of constants.
	* src/expander/expand.c (expand_id_no_fail): Implement expanding
	of constants.
	* src/new-parser/parse-l.l: Can now parse definers `subtype' and
	`constant'.

2007-08-17  Matthieu Lemerre  <racin@free.fr>

	Cleanup: removal of the old parsers and lexers, completly replaced by the new ones in L.

2007-08-17  Matthieu Lemerre  <racin@free.fr>

	* src/new-parser/character-set.c:
	* src/new-parser/character-set.inc: New files.
	
	* src/new-parser/grammar-expander.c: Use new parser for make_list.

	Conversion of grammar-expander.l to new syntax + additions to
	support it.
	
	* src/init.l: New file. Loaded by init.c
	* src/new-parser/grammar-expander.l: Converted to new syntax.

	* src/new-parser/parse-l.l: Add parse while_like.

	* src/expander/expand-loop.c: Initialise expand_while
	* src/expander/expand-loop.aux.c
	* src/expander/expand-loop.aux.inc
	* src/expander/expand-loop.l: New files

2007-08-15  Matthieu Lemerre  <racin@free.fr>

	* src/std/l-form.c Removal of form_parse.
	* src/std/print.c: Removal of the buffered/unbuffered parsers.

	Removal of some old parser functions.

	* src/std/xml.c: Removal of the old XML parser.
	


2007-08-15  Matthieu Lemerre  <racin@free.fr>

	Change of the parser .l files to use the new syntax of the new parser.
	

2007-08-12  Matthieu Lemerre  <racin@free.fr>

	* src/new-parser/parse-l.l: New rules Top_Level.All and Top_Level.Comment

2007-08-11  Matthieu Lemerre  <racin@free.fr>

	L grammar language now use new parser's syntax.
	
        * src/new-parser/grammar-macros.l
        * src/new-parser/parse-grammar.c
        * src/new-parser/parse-grammar.inc
        * src/new-parser/parse-grammar.l
        * src/new-parser/parse-l.c
        * src/new-parser/parse-l.inc
        * src/new-parser/parse-l.l
	* src/new-parser/support.c

2007-08-11  Matthieu Lemerre  <racin@free.fr>

	Now use the new parser to parse the globals.
	
	* src/parser/parse.c (parse_all): Now use new parser's global.

	* src/compiler/type.c: Deal with an operator priority problem.

	* src/c-output/c-output-type.l: Use new type syntax.
	* src/c-output/c-output.l: Likewise.
	* src/new-parser/parse-l.l: Likewise, some syntax changes.

	* src/c-output/support.c (mangle_type_name_rec): Mangle correctly
	new type forms.

	
2007-08-10  Matthieu Lemerre  <racin@free.fr>

	Function types parameters may now not be a tuple type. Handle this
	case.  Singleton tuple types now return the original type;
	i.e. types (Type) and Type are now the same.

	* src/compiler/generate.c
	* src/compiler/type.c
	* src/expander/expand.c
	* src/include/l/sys/type.h
	
2007-07-24  Matthieu Lemerre  <racin@free.fr>

	Many changes; now all the test cases work with the new L
	grammar (including a new XML parser written this grammar).
	
	* c-output/*.l: Now use the new printer specification
	convention (with prefix labels).

	* test/*.l: Test cases now use the new L grammar.

2007-06-18  Matthieu Lemerre  <racin@free.fr>

	* src/new-parser/parse-l.l: New L grammar. Many changes in support
	files.
	
	* src/init.c (declare_function_begin, declare_function_end):
	Export these functions.

2007-06-11  Matthieu Lemerre  <racin@free.fr>

	* src/new-parser/parse-grammar.l: Rule macros parameters are
	passed with <> instead of ().
	

2007-05-28  Matthieu Lemerre  <racin@free.fr>

	Better C output; use the fact that lets are condensed at the
	beginnings of the bloks.
	
	* src/c-output/c-output.l (doit): Use quote_string
	* src/c-output/support.c (quote_string): New function.
	* src/c-output/c-output.l (c_output_label, c_output_seq): Output
	statements and block expressions instead of using ,
	
2007-05-23  Matthieu Lemerre  <racin@free.fr>

	* src/new-parser/parse-grammar.l (parse_Grammar): remove Grouping
	rule, binding is done using only ':' instead. Convert the grammar
	to the new rules.

2007-05-21  Matthieu Lemerre  <racin@free.fr>

	Handling of grammar macros.
	
	* src/expander/expand-define.c (expand_all): Hande grammar_macros.
	* src/expander/expand.c (declare_function_begin, declare_function_end):
	New declare_*_begin/end couple.
	(expand_lambda): Use them.
	* src/new-parser/grammar-expander.l (head_set): Handle '*', '+'
	and '@'.
	(grammar_expander_rec): Handle '+' and '@'.
	* src/new-parser/parse-grammar.l (parse_grammar): New grammar
	rules Rule_Macro and Replacement. Some rearrangements in other
	rules.
	* src/new-parser/support.c (call_grammar_macro): New C function:
	call grammar macro.  Hack to re-use expanders for grammar macro
	expansion.
	* src/parser/parse.c (parse_all): Hande parse_macro.

2007-05-19  Matthieu Lemerre  <racin@free.fr>

	Handling of symbol and rule_macro case in the parser.
	
	* src/std/l-form.c (is_symbol_form): Bugfix.
	* src/new-parser/support.c (parse_symbol): New function.
	* src/new-parser/parse-grammar.l: Handling of Symbol and call to
	Rule_Macro.
	* src/new-parser/grammar-expander.l (head_set): Support for the
	symbol case (a shortcut for parsing tokens and their following
	spacing, and returning a symbol) and room for the '@' case.
  
2007-05-18  Matthieu Lemerre  <racin@free.fr>

	Bugfixes.
	
	* src/new-parser/grammar-expander.l (head_set): Handle the '.'
	case.
	* src/new-parser/support.c (string_to_int_list): Bugfix.

	Handling of inter-grammar calls.
	
	* src/new-parser/grammar-expander.l (head_set_hash, rules_hash):
	Now are double hashes (grammar, rule). Change callers.
	(grammar_expander_rec): Handle the explicit grammar call case.
	(expand_grammar_list): New function, replace grammar_produce_function_definitions.
	* src/new-parser/parse-grammar.l (parse_grammar): Now parses the
	grammar.rule form.
	* src/expander/expand-define.c (expand_all): Call
	expand_grammar_list for grammar expansion.

	Parse functions now have a name depending on the grammar name.
	
	* src/parser/parse.c (parse_all): Allow the parser to parse the
	species declaration. Call the new rule name
	_l__parse__parse_grammar__Grammar.

	* src/new-parser/support.c (_l__parse__parse_grammar__Expression)
	(_l__parse__parse_grammar__Type): New names for parse_Expression
	and parse_Type.
	(pre_define_function): Now takes the name of the function as an argument.

	* src/new-parser/parse-grammar.l (test): Use the parse expander.

	* src/new-parser/grammar-expander.l
	(function_name_from_grammar_and_rule): New function for nomming
	parsing rule functions. Use it in the file.
	(grammar_name): New global.
	(parse): New expander, for calling grammar rules.

	Add type check of function parameters.
	
	* src/expander/expand.c (expand_function): Type checking added.

2007-05-09  Matthieu Lemerre  <racin@free.fr>

	Removed the bootstrap file

	* src/new-parser/parse-grammar-bootstrap.l: Remove file.
	
	The new L parser for the parse-language can parse its own
	definition.
	
	* src/parser/parse.c (l_parse_type): New function.
	* src/new-parser/support.c (parse_Type, pre_define_function)
	(get_test_string): New functions, callable from L.
	* src/new-parser/parse-grammar.l: Updated with the function return
	types. Now "bootstrap" itself (i.e. auto-parse itself).
	* src/new-parser/parse-grammar-bootstrap.l: Updated; becomes
	useless.
	* src/new-parser/grammar-expander.l (head_set): catch error case
	"trying to take the head set of an unknown rule"
	(grammar_produce_function_definitions): Bugfixes, and call to
	pre_define_function.
	* src/new-parser/character-set.l (sort_Character_Set): New
	function.
	(make_Character_Set): call sort_Character_Set.

2007-05-05  Matthieu Lemerre  <racin@free.fr>

	Little name change.
	
	* src/include/l/global.h (get_global_address): Changed to
	(get_global).
	(struct global): moved from sys/global.h. Changed field
	for_backend to address. Fixed users.

	The code generator now generates PIC code. Mutually recursive
	functions are handled.
	
	* src/compiler/jit/backend.c (block_list, generate_function_start)
	(generate_function_end) : Remove use of global_block to detect
	globals and handle them separately.
	(create_global_variable_at): Put the address in the global.
	(get_location): Check if the id is global; if so use it in the
	code to retrieve dynamically the address.  *
	src/expander/expand-define.c (define_global): Do not create a new
	global on redifinition, just change the address.
	(expand_all_function_and_global): Make two passes, one to define
	the functions and one to expand the code.
	
	* src/new-parser/parse-grammar-bootstrap.l (parse_Rule): Now there
	is only need for one parse_Rule, remove the useless one.

	* test/cocyte24-even-odd.l: New test file.
	
	Handling of grammar definitions.
	
	* src/expander/expand-define.c (expand_all): Kludge to handle
	grammar definitions.
	
	declare_* functions for expanders with lexical scope and side
	effects.
	
	* src/new-parser/grammar-expander.l (List): Use these functions.

	* src/expander/expand.c:
	(declare_block_begin, declare_block_end): New functions, callable
	from L.
	(expand_block): Use these functions.

	Initial new parser support.
	
	* src/configure.in: Add new-parser.
	* src/Makefile.am (libl_la_LIBADD): Add new-parser/libl-new-parser.la

	* src/parser/parse.c (parse_all): Parse grammars.
	* src/new-parser/Makefile.am
        * src/new-parser/character-set.l
        * src/new-parser/grammar-expander.c
        * src/new-parser/grammar-expander.inc
        * src/new-parser/grammar-expander.l
        * src/new-parser/parse-grammar-bootstrap.l
        * src/new-parser/parse-grammar.c
        * src/new-parser/parse-grammar.inc
        * src/new-parser/parse-grammar.l: 
	* src/new-parser/support.c: New files
	
	New C output of make_list.l
	
	* src/std/list.c (init_list): call init_make_list

	C output bugfix, new list functions, new form functions, exit
	type, new list functions.
	
	* src/c-output/support.c (convert_id, convert_id_as_string):
	convert '-' to '_'.
	* src/c-output/c-output.l (doit): convert the initialization
	function.
	
	* src/objects/pair.c (copy_list, append): New functions.
	* src/std/list.c (init_list): Export append to L.

	* src/std/l-form.c (is_compound_form, is_id_form)
	(is_symbol_form, is_int_form, is_string_form): New functions. 
	(init_l_form): Exported to L.

	* src/expander/expand.c (expand_if): Quick hack that allows one
	branch of an if to have an Exit type, which coerce into anything.

	* src/compiler/generate.c (compile_function_call): More debugging
	info.
	(compile_if): Remove type check between if and else, for Exit
	types.
	
2007-04-26  Matthieu Lemerre  <racin@free.fr>

	C output now handles strings properly, does the initalisation of
	expanders, and outputs boolean operators; new error library; New
	expander with_output_to_string
	
	* src/std/output.c (flush_string_od)
	(make_string_output_descriptor)
	(string_output_descriptor_to_string): New functions for output to
	Strings.
	(make_output_descriptor_write_file): Now creates file readable and
	writable.
	(stdout_output_descriptor, stderr_output_descriptor): Now
	available to L.

	* src/std/make-list.l: Now make returns Void.

	* src/parser/parse.c (parse_while): While is now calls @not and not !

	* src/compiler/jit/backend.c (generate_function_start): Moved the
	allocation limit from 4096 to 16384.
 
	* src/c-output/support.c (get_string_length): New function.
	(file_name_non_extension): Likewise. Both are exported to L.

	* src/c-output/c-output.l (c_output_form): Now uses a constant
	String objects.
	(strings_needed, strings_counter): New globals.
	(doit): Initialize the globals and outputs the constant Strings.
	(c_output_logical_or, c_output_logical_and)
	(c_output_logical_not): New functions.
	(c_output_init_definition): New function.
	(print_error, assert, panic): Moved to error.l

	* std/string.l: New file; defines the expander with_output_to_string
	* src/std/error.l: New file, with generated files error.c and
	error.inc
	
2007-04-23  Matthieu Lemerre  <racin@free.fr>

	Removed write out of address spaces errors.
	
	* src/include/l/string.h (maken_heap_string): Removed an
	off-by-one write error.
	* src/expander/expand.c (expand_binary_operator): Likewise.
	(expand_binary_relationship): Likewise.
	* src/expander/expand.c (expand_seq): Handle the case seq().


2007-04-22  Matthieu Lemerre  <racin@free.fr>

	Support for boolean and, or, and not.
	
	* test/cocyte23-bool-operations.l: New test file.

	* src/parser/parse.c (get_next_token): Now AND_TK is not parsed as
	a UNARY_RTK, but as a LOGICAL_AND_RTK. OR_TK is parsed as a
	LOGICAL_OR_RTK.
	(logical_or, logical_and): New left parse operators.
	(parse_assignment_expression): Subrule is a logical and instead of
	an equality.
	(parse_unary_expression): Transform the && token into @get_label

	* src/expander/expand.c (expand_logical_or, expand_logical_and)
	(expand_logical_not): New base expanders
	(init_expand): Initialize them.

	* src/compiler/generate.c (compile_not, compile_or, compile_and):
	Now work.
	(compile_or_boolean, compile_and_boolean): Added these boolean
	operations.
	(init_generate) Initialize all this.

2007-04-20  Matthieu Lemerre  <racin@free.fr>

	Support for compile_time definitions.

	* src/std/make-list.l: make_list_list is now a compile_time global
	constant.
	* src/std/list.c (make_list_list): Remove useless definition.
	* src/parser/parse.c (parse_all): Parse compile_time.
	* src/expander/expand-define.c (expand_all): Compile compile_time
	definitions first.
	* src/c-output/c-output.l (c_output_definition): Handle the
	compile_time case.
	* src/compiler/jit/backend.c (create_global_variable): Nullify the
	global when initialized.

	Better C output support.

	* src/parser/form.c (String_Form): Add new alias.
	* src/c-output/c-output.l (c_output_ref): Hack to solve problem
	that & cannot take a cast as an argument in C.
	(c_output_function_definition): Call convert_id on the function
	parameters and function name.
	(c_output_definition): Now also expand the functions used for
	expansion.
	(doit): Hack to handle output of the Output_Descriptor.

	Support for make-list/make
	
	* src/std/list.c (make_list_list): New variable.
	* src/std/make-list.l: New file.
	* src/std/make-list.c, src/std/make-list.inc: Generated from
	make-list.l
	* src/std/Makefile.am (libl_std_la_SOURCES): Add make-list.c
	
2007-04-17  Matthieu Lemerre  <racin@free.fr>

	Expand now returns Expanded Forms for L.
	
	* src/c-output/support.c: Move type Expanded_Form definition from
	here...
	* src/std/l-form.c (init_l_form): To here.
	(init_l_form): Expand now returns an expanded form

	Gensym now takes a String and is exported to L.
	
	* src/std/list.c (list_printer): Added skeleton.
	* src/std/init_library.c (init_library): Init gensym.
	* src/objects/symbol.c (gensym_c): Renamed from gensym. Fix all
	callers.
	(gensym): Now takes a String as an argument.

2007-04-16  Matthieu Lemerre  <racin@free.fr>

	Remove restrictions on expansions to be generic form
	
	* src/expander/expand.c (expand): Change check of the exit loop

2007-04-14  Matthieu Lemerre  <racin@free.fr>
	
	Support for real iteration on hash tables.

	* src/c-output/c-output-type.l (output_all_type_definitions): Use
	foreach instead of foreach_hash.
	* src/c-output/c-output.l (doit): Likewise.
	* src/std/hash.c (hash_foreach_expander): Filled the foreach
	expander.
	(make_type_Hash): Declares it as a foreach expander.
	* test/malebolge05-hash.l (test): Test iteration.

	C output support; L code can now be outputed to C code.
	
	* src/c-output/Makefile.am
        * src/c-output/c-output-type.l
        * src/c-output/c-output.c
        * src/c-output/c-output.inc
        * src/c-output/c-output.l
        * src/c-output/foreach-hash.l
        * src/c-output/support.c: New files.
	
	* configure.in: Add c-output
	* src/Makefile.am: Creates a libl; creates c_output.
	* src/init.c (init): Calls init_c_output_support.
	* src/compiler/type.c (pre_create_type): Redefinition is no more
	an error.
	* src/lexer/Makefile.am: Lexer uses libtool.
	* src/parser/form.c (Int_Form, Id_Form, Symbol_Form)
	(Compound_Form): New aliases.
	* src/std/hash.c (init_hash): Defines JudyLFirst and JudyLNext.
	(make_hash_table, gethash, puthash, make_hash_string_table)
	(gethash_string, puthash_string): Defines them here
	* src/include/l/sys/hash.h: Only declares the functions now.
	* src/std/l-form.c (expand_form_rec, init_l_form): Rename
	Generic_Form_Function to Compound_Form.
	(init_l_form): Defines Id_Form, Int_form, Symbol_Form, String_Form
	* src/std/xml.c (init_xml): Use eval_cstring to define type
	XML_Node.

2007-04-10  Matthieu Lemerre  <racin@free.fr>

	Shadowing support; all let declarations are gathered at the
	beginning of the blocks in the expanded code.
	
	* test/malebolge13-shadow.l: New test file.

	* src/expander/expand.c (id_info): New field unique_name
	(uniquify): New function.
	(insert_id): Shadowing is a normal behaviour.
	(expand_id_no_fail): Old expand_id, but does not fail.
	(expand_id): Calls expand_id_no_fail
	(expand_block): At the end of a block, declares all the used local
	variables at the beginning of the block.
	(expand_let): Use the unique name instead
	* src/expander/left-expand.c (left_expand_let): Use the unique name.

2007-04-05  Matthieu Lemerre  <racin@free.fr>

	Parser hack to allow including L files in L.
	
	* src/parser/parse.c (parse_all): Handle include keyword.
	* src/parser/parse.c (parse): Handle include forms.

2007-04-03  Matthieu Lemerre  <racin@free.fr>

	Better tuple left-expansion.
	
	* src/expander/left-expand.c (left_expand_tuple): Now components
	inside tuples are left expanded too.

	Basic debugging support : return the matching function from a
	program counter.
	
	* src/compiler/jit/backend.c (struct debug_info): New struct.
	(function_offsets): New global.
	(find_owning_function): Function to call for debugging.
	(generate_function_start): Create debug info.
	(generate_function_end): Complete debug info.

	Define forms are not expanded.
	
	* src/expander/expand-define.c (expand_all_function_and_global)
	(expand_expander, expand_attribute, expand_all_types)
	(expand_define, expand_function_definition): Don't expand define
	forms.
	(expand_all): Return the type list too.

2007-04-01  Matthieu Lemerre  <racin@free.fr>

	Removed noisy output.
	
	* src/std/creator.c (expand_creator): 
	* src/std/foreach.c (list_foreach_expander): 

	* src/compiler/jit/register.c (allocate_free_data_register)
	(allocate_data_register, free_data_register)
	* src/compiler/jit/backend.c (generate_function_end,delete_block):
	* src/compiler/generate.c (generate)
	* src/compiler/c-to-l.h (compile_function_call): Commented out debug output.

2007-03-31  Matthieu Lemerre  <racin@free.fr>

	Support for virtual attributes and additional checks when
	expanding accessers.

	* test/malebolge12-virtual-attributes.l: New test file.
	* src/expander/expand-define.c (expanded_form_t): Definers now
	take a form as a second argument (and not just an Id).
	(expand_expander, expand_macro): Adapt them to take the form
	second argument.
	(Virtual_Accesser, Virtual_Left_Accesser): New types.
	(virtual_attributes_hash, virtual_left_attributes_hash): New hashes.
	(virtual_accesser, virtual_left_accesser): New accessers.
	(expand_attribute): New definer. Initialised.
	(expand_all_misc, expand_all): Adapted to the above changes.
	* src/parser/parse.c (parse_all): Parse attributes.

	* src/expander/access.c (get_accesser, get_left_accesser): Make
	them non static.
	(struct_accesser, derived_accesser, struct_left_accesser)
	(derived_left_accesser): Add checks.
	
	Add the div operation.
	
	* src/compiler/jit/operations.c (DEFINE_INT_OPERATION_NON_COMMUTATIVE): 
	New macro. Use it to define div operations.
	* src/compiler/generate.c: Add the div operation.
	(init_generate): Init it.

2007-03-30  Matthieu Lemerre  <racin@free.fr>

	Add support for macros.
	
	* src/compiler/generate.c (generate): Does not treat non-globals
	and non-functions.
	* src/expander/expand-define.c (init_expand_define): New function.
	(Definer): New type.
	(define_definer,expand_expander,expand_macro): New function.
	(expand_all_misc): Renamed from expand_all_expanders. Now calls
	the corresponding definer.
	(expand_all): Call the expanders in the right order.
	* src/expander/expand.c (init_expand): Init expand_define.
	* src/parser/parse.c (parse_all): Parse macros.
	* src/std/l-form.c (expand_form_rec): Now takes an id_list
	argument, which are the ids not to transform into form (they
	contain forms).
	(init_l_form): Exports the expander to L.
	* test/malebolge11-macros.l: New file.

2007-03-28  Matthieu Lemerre  <racin@free.fr>

	Bug fix in form handling and definition of expanders in the order
	of their definition.

	* test/malebolge10-expanders.l: Test in order expansion.

	* src/std/l-form.c (expand_form_rec): Removed a bug that made some
	definitions expanded twice.
	* src/expander/expand-define.c (expand_function_definition): New
	function.
	(expand_all_function_and_global): Use expand_function_definition.
	(expand_all_expanders): Use expand_function_definition; compile
	the expanders in order of their definition so that an expander can
	be used in another expander's function.  
	(expand_all): Put the expanders to expand list in order.

2007-03-27  Matthieu Lemerre  <racin@free.fr>

	Moved type handling to expand-define, and clean remaining of
	analysis.c.
	
	* src/expander/expand-define.c (global_hash): Moved from
	analysis.c
	(define_function): New function.
	(expand_all_function_and_global): Now uses define_function.
	(define_type, define_type_alias): Moved from analysis.c
	(expand_all_types): New function.
	(expand_all): Call expand_all_types.
	* src/compiler/analysis.c: Removed everything except
	initialisation (to remove later).
	* src/eval.c (eval_file): Removed call to analyze.
	(eval): Likewise.

	Expanders take a Compound Form instead of a Form as an argument.
	
	* src/std/l-form.c (init_l_form): Defines type Compound_Form, and
	redefines type Form.
	* src/expander/expand-define.c (expand_all_expanders): Expanders
	take a Compound_Form instead of a Form as an argument.

2007-03-25  Matthieu Lemerre  <racin@free.fr>

	Transition from analysis.c to expand-define.c; handling of
	expander definition and small parse change in form.
	
	* test/malebolge10-expanders.c: New test file.
	* test/malebolge06-form.l: Changed to handle the $...$ and $@
	... $ forms of backticking.
	* src/std/l-form.c (init_l_form): Defines a real type for Form.
	* src/expander/expand-define.c (define_global): New function.
	(expand_all_function_and_global): Handle definition of functions
	and globals; much code moved from analysis.c
	(expand_all_expanders): New function.
	(expand_all): Returns the expanded definitions.
	* src/parser/form.c (init_form): Remove all definitions of these
	functions from L.
	* src/parser/parse.c (parse_all): Now parses expander definitions.
	(parse_macro): The backtick facility is now done with two
	surrounding dollars.
	* src/compiler/generate.c (compile_function): Added an assertion
	to prevent an error.
	(init_generate): Remove definition of compile to L from here, because
	of the yet-undefined Form.
	* src/compiler/analysis.c (define_function)
	(analysis_define_global, define_generic): Removed functions.
	(do_nothing): Transitional function to replace them.

	Really handle the recursive types.

	* src/compiler/type.c (define_type_type_form): Handle the fact
	that interning the types can be splitted.
	* src/compiler/type.c (is_defining_type, uncomplete_types): New
	globals.
	(finish_type_pointer): End part of old make_type_pointer.
	(make_type_pointer): Splitted in two halves. Does not make the
	subtype if defining a new type, to handle recursive definitions.

2007-03-24  Matthieu Lemerre  <racin@free.fr>

	Definition handling change; aiming to better handle the analysis
	phase.
	
	* src/expander/Makefile.am: add expand-define.c
	* src/objects/pair.c (reverse): Bug fix.
	* src/expander/expand-define.c: New file.
	* src/expander/expand.c (expand_define): Removed expander.
	* src/compiler/generate.c (generate): Now takes and expanded_form
	as an argument.
	* src/eval.c (expand_form_list): Now just calls expand_all.
	* src/compiler/analysis.c (analyze): Now outputs all definitions
	to the expander.

2007-03-20  Matthieu Lemerre  <racin@free.fr>

	Change print_String to print_string.
	
	* src/std/output.c (maybe_flush): Symbol alias to flush.
	(print_string): Renamed from print_String. Replace callers and
	headers.
	(print_string_to_output_descriptor): Renamed from
	print_String_to_output_descriptor.

	Remove remaining debug output.

	* src/parser/parse.c (string_to_type_form): Remove output.
	* src/compiler/type.c (pre_create_type): Likewise.
	* src/memory/code.c (finish_code): Likewise.

	Generators now handle goto differently: there is goto_constant and
	goto_variable.
	
	* src/expander/expand.c (expand_goto): Separates goto into
	compile_goto_constant and compile_goto_variable.
	* src/compiler/jit/backend.c (backend_compile_goto_constant): New
	function.
	(backend_compile_goto_variable): Old backend_compile_goto.
	* src/compiler/generate.c (compile_goto_constant)
	(compile_goto_variable): Split compile_goto into these.
	@goto_constant and @goto_variable correspond to these.

2007-03-16  Matthieu Lemerre  <racin@free.fr>

	Bug fix.
	
	* src/eval.c (expand_form_list): Renamed from expand_list to
	prevent a name clash, which malebolge02 and 09 to fault.
	Changed callers (in the same file).
	
	Set of corrections.
	
	* src/std/init_library.c (init_library): Init print first; print
	does not depend on anything, and many other libraries define a printer.
	
	* src/std/output.c (make_output_descriptor_write_file): New
	function, accessible from L.
	
	(init_output): Avoid the use of log2f. 
	
	* src/eval.c: Change the order of functions to create more
	intermediary ones.
	* src/include/l/string.h (make_C_string_from_L_string): put a
	final 0.
	* src/compiler/generate.c (compile_function_call): Does not print
	the function name.
	* src/compiler/analysis.c (analysis_define_global) Renamed from
	define_global, made static.
	* src/compiler/c-to-l.h (c_define_global): New function.
	* src/std/print.c (Symbol_Printer): New printer.
	(print_Symbol): Does not print the surrounding ''.
	(init_print): Initialise the symbol printer.
	* src/parser/parse.c (get_next_token): Parse correctly 0x80000000.

2007-03-11  Matthieu Lemerre  <racin@free.fr>

	Add formatters to the printing interface.
	
	* test/malebolge04-print.l: Test formatters.

	* src/std/print.c (define_printer): Now takes a Printer as an argument.
	(expand_print): Checks for formatters (specified using a label).
	Call the printer.
	(String_printer): New printer.
	(Int_printer): New printer.
	(print_Int_Hex): New function, callable from L.
	(print_Int_Dec): New name for print_Int.
	(init_print): Initialize all this.
	* src/include/l/std/print.h: New file. Defines a Printer.

2007-03-10  Matthieu Lemerre  <racin@free.fr>

	Implements list.head and list.tail
	
	* src/std/list.c (make_type_List): Uses the derive accesser and
	left_accesser.
	* test/malebolge02-list.l (test): Test it.
	* test/malebolge01-pointer-access.l: The test is more precise.

2007-03-09  Matthieu Lemerre  <racin@free.fr>

	Stop using the path_info structure in the compiler, which is
	unneeded thanks to the expected type parameter.
	
	* src/compiler/jit/backend.c (struct path_info) removed structure.
	(path_info_list): Removed global.
	(registers_spilled, spilled_locations): New globals (were inside
	path_info before).  Changed all functions to use the new globals
	and not use path_info_list.
	(make_unifiable_location, unify_location)
	(create_execution_path_branch, join_execution_path_branch): Removed functions.
	(create_anonymous_stack_variable): Does not allocate void locations.

	* src/compiler/generate.c (compile_if): Remove calls to
	create_execution_path_branch etc.  Use expected type to
        allocate the return location.	
	(init_generate): Define the exit function.

2007-03-07  Matthieu Lemerre  <racin@free.fr>

	DEFINE_FUNCTION use globals instead of functions (and works
	again); remove use of function_t.

	* src/include/global.h: New file.
	
	* src/objects/function.h (struct function): Removed definition and
	general file cleanup.
	
	* src/compiler/analysis.c (function_type_form): Remove use of
	functions.
	(generate, define_generic): Likewise.
	* src/compiler/generate.c (compile_function): Likewise.
	* src/compiler/jit/backend.c (generate_function_start)
	(generate_function_end): Likewise.
	* src/expander/expand.c (expand_function): Likewise.
	
	(compile_function): Update the global.

	* src/main.c (eval_file): Use globals instead of functions.
	* src/compiler/c-to-l.h (DEFINE_C_FUNCTION2): Likewise.

2007-03-07  Matthieu Lemerre  <racin@free.fr>

	Handles calling of pointer to functions.
	
	* test/cocyte22-funcall.l: New test file.
	 
	* src/expander/expand.c (expand_function): The first argument to
	funcall is know the global variable funcalled, not just a symbol.
	(expand_funcall): New expander.
	(init_expand): Initialise expand_funcall.

	* src/compiler/jit/backend.c (global_location): Removes some
	checks: now we have to create a global (the function itself) while
	creating a function. This is a workaround to handle recursive
	functions.
	(generate_function_start): Now returns the function address.
	(create_global_variable_at): New function.
	(function_call): Handles the call to register case.

	* src/compiler/generate.c (compile_function): Now creates a global
	variable.
	(compile_function_call): get rid of dependency on function_t.

	* src/compiler/analysis.c (define_function): A function now
	declares also a global variable.
 
2007-03-05  Matthieu Lemerre  <racin@free.fr>

	Minor corrections in hashes.
	
	* src/std/hash.c (hash_left_accesser): Check expression type with
	the expected type.
	(hash_left_accesser): Now returns the expression in the right
	type.
	(make_type_Hash): Checks that arguments are at least of size of a
	Pointer.

2007-03-05  Matthieu Lemerre  <racin@free.fr>

	Handles global variables.

	* src/include/l/sys/global.h: New file.
	* test/cocyte21-globals.l: New test file.
	
	* src/parser/parse.c (parse_all): Parse global variables.

	* src/expander/expand.c (expand_define): Handles the definition of
	global symbols.
	(block_list): made static to prevent a symbol clash with backend.
	(expand_id): Now also checks for globals.

	* src/compiler/jit/backend.c (global_location): New function.
	(create_global_variable): New function.
	(global_block): Now is the last element of the block list.
	(block_list): Now is initially global_block. Also made static
	(generate_function_start): Block list is initially global_block.
	(generate_function_end): At the end, block list has returned to
	global_block.

	* src/compiler/generate.c (generate): Compiles global too.

	* src/compiler/analysis.c (init_analysis): Define 'global'
	definer.
	(analyze): Let global be compiled.
	(define_global): New definer.
	(global_hash): New hash table.

2007-03-04  Matthieu Lemerre  <racin@free.fr>

	* src/parser/parse.c (get_next_token): Transforms the "\n" into
	return line characters, etc.

2007-03-04  Matthieu Lemerre  <racin@free.fr>
	
	Add parsing of the cast special form.

	* src/parser/parse.c (parse_cast): New function.
	* src/parser/parse.c (init_parser): Initialise parse of cast.
	* test/malebolge07-creator.l (test): Test parsing of Int * in cast

2007-03-04  Matthieu Lemerre  <racin@free.fr>

	Access to creators from L.
	
	* src/std/creator.c (expand_creator): New expander.
	* src/std/creator.c (init_creator): Inited.

2007-03-04  Matthieu Lemerre  <racin@free.fr>

	* src/expander/access.c (struct_accesser): Catch a programming
	error.

2007-03-04  Matthieu Lemerre  <racin@free.fr>

	Foreach support, and basic foreach expansion for list types.
	
	* src/std/list.c (make_type_List): Associates the created type to
	the foreach expander.

	* src/std/init_library.c (init_library): Initialize foreach.

	* src/std/Makefile.am (libl_std_la_SOURCES): Add foreach.c
	* src/include/l/expand/foreach.h: New file.
	* src/std/foreach.c: New file.
	* test/malebolge09-foreach.l: New test file.

2007-03-04  Matthieu Lemerre  <racin@free.fr>

	Improvements and bugfix in loop expansion.
	
	* src/expander/expand-loop.c (create_loop_label): Corrected an
	off-by-one bug.
	(expand_break): Add a check on the args.
	(expand_continue): Likewise.
	(expand_at_set_continue): Likewise.

2007-02-26  Matthieu Lemerre  <racin@free.fr>

	Expander now expand loops into jumps to labels; remove support for
	loops in the compiler.
	
	* test/cocyte10-loop.l: Test the use of continue/@set_continue.

	* src/parser/parse.c (parse_continue): If continue is used as a
	label, then call the @set_continue generic.
 
	* src/parser/form.c (label_form): Now can be called with a NULL
	second argument.

	* src/expander/expand.c (expand_label): Handle the "label has no
	argument" case.
	(expand_loop, expand_break, expand_continue): Removed
	expanders. Moved to expand-loop.c, with changes to handle loop
	compilation removal in the compiler.
	(init_expand): Remove loop, break, continue initialisation.
	Calls init_expand_loop().

	* src/expander/expand-loop.c: New file.

	* src/expander/Makefile.am (libl_expand_la_SOURCES): Added
	expand-loop.c

	* src/compiler/generate.c (loop_info): Removed structure.
	(current_loops): Remove global.
	(compile_loop, compile_break, compile_continue): Removed
	functions.
	(init_generate): Remove initialisation of current_loops, loop,
	break, continue.

2007-02-26  Matthieu Lemerre  <racin@free.fr>

	Bug fix in detecting gotos to undefined labels.
	
	* src/compiler/jit/backend.c (delete_block): Fix use of wrong
	field of struct block_list.

2007-02-25  Matthieu Lemerre  <racin@free.fr>

	Bug fix when ref/deref was used in void context.

	* src/compiler/generate.c (compile_ref): Change call to free to
	free_location.
	(compile_deref): Likewise.

	* test/cocyte20-expected-type.l: New file
	
2007-02-25  Matthieu Lemerre  <racin@free.fr>

	Implements type_alias.
	
	* src/compiler/type.c (associate_type_with_type_form): New
	function.
	* src/compiler/analysis.c (define_type_alias): Now implemented.
	(init_analysis): Now define Void as an alias to ().
	* test/cocyte14-types.l: Test type_alias too.

2007-02-25  Matthieu Lemerre  <racin@free.fr>

	* src/parser/parse.c (get_next_token): Reput support for unary
	operators * and &, broken in last cvs.

	* test/cocyte01-function-definition.l: Also tests the * binary
	operator.

2007-02-25  Matthieu Lemerre  <racin@free.fr>

	Support for labels and gotos, and preliminary support for local
	species in the expander.  Species are the concepts manipulated in
	L: they can be macros, functions, variables, labels... anything.
	Support for null statement, and && unary operator for computed
	gotos.
	
	* src/expander/expand.c (struct id_info): Support for species.
	(insert_id, expand_id): Adapted to insert any species, not only
	variables.
	(expand_label): Insert a label species.
	(expand_goto): New expander. 
	(expand_at_get_label): New expander.
	(init_expand): Initialise the expanders.

	* src/expander/left-expand.c (left_expand_let): Use the species
	interface too.

	* src/parser/parse.c (parse_atomic): Support for null expressions,
	L's version of C's null statement.
	(get_next_token): Now parses the && unary operator, that allows to
	get the address of a label.

	* src/include/l/sys/hash.h (remhash): New function.
	
	* src/compiler/jit/backend.c (struct block): Add a forward_refs
	hashtable.
	(create_block): Initialise the hashtable.
	(delete_block): Now passes the forward references to the enclosing
	block.
	(get_label, backend_compile_goto, insert_label): New support functions.

	* src/compiler/generate.c (compile_label, compile_at_get_label)
	(compile_goto): New generics. @get_label is a new special form of
	Cocytus to get a label address from a symbol.
	(init_generate): Intialise them.

	* src/compiler/generate.c (compile_label): New function.

	* src/compiler/analysis.c (init_analysis): New type: Label.

	
2007-02-24  Matthieu Lemerre  <racin@free.fr>

	* src/expander/expand.c (expand_label): Now returns void: labels
	expanded regularly are only targets for goto; labels used to name
	parameters must be extracted manually.
	
	* src/std/creator.c (check_struct_parameters): Extracts the label
	manually.

	* test/cocyte17-struct-copy.l: Completed the test case.
	
2007-02-24  Matthieu Lemerre  <racin@free.fr>

	Change in the compiler; new "expected type" argument.
	
	* src/expander/access.c (pointer_left_accesser): Bug fix for a bug
	that appeared with the expected type.
	
	* src/compiler/jit/backend.c (void_location): Now void_locations
	are of type Void.
	* src/generate.c: compile_* functions now take an "expected type"
	argument.

2007-02-15  Matthieu Lemerre  <racin@free.fr>

	* src/parser/parse.c (parse_expression): Reverted change of 13/02,
	which caused parse_expression to call
	parse_statement_or_expression instead of calling directly
	parse_label_expression, which caused a parse bug in cocyte07-if.l

2007-02-13  Matthieu Lemerre  <racin@free.fr>

	Some changes in the parser and in L grammar.
	
	* src/parser/parse.c (parse_foreach): new macro parsed.
	(parse_statement_or_expression): Now parse_label_expression is
	called first (thus, ':' is less prioritary operator).
	(parse_continue): Now is an expression.  Little hack so that
	continue: is parsed as a normal label.
	(parse_label_expression): Renamed from parse_labelled_expression.
	Now accepts any kind of expression left of the ':'.
	(parse_foreach): 

	(parse_tuple): tuple component are now regular expressions, not
	labelled_expression (but as label expressions are expressions,
	they can still be expressions)
	
	* src/parser/form.h (is_form): Fixed a bug in the macro.

2007-02-11  Matthieu Lemerre  <racin@free.fr>

	Let are now expressions, type declaration optional in let a =
	... idioms, change of parsing rule for variable declarations.

	* src/parser/parse.c (parse_error): Now indicates where there is a
	problem.
	(parse_variable_declaration): Change grammar rule: use x:Int
	instead of Int x.
	(parse_let): Change grammar rule, use let x:Int (or just let x)
	instead of let Int x.  Also, let is now an expression.

	* src/parser/form.c (let_form): Change the order between types and
	id when creating let forms.
	* src/expander/left-expand.c (left_expand_let): New expander, 
	initialised.
	* src/expander/expand.c (insert_id): insert_id isn't static, so
	that left_expand_let can use it directly.
	(expand_let): Change the order between type and id in a letform.

	* src/compiler/generate.c (compile_let): Let are now expressions,
	change the return type.  In a let form, type is now after the
	variable.

	* test/malebolge08-let-wo-type.l: New test file.
	* test/* : Use new parsing rules.

	* src/std/creator.c (create_pointed_form): Does not introduce a
	new scope.
	* src/std/print.c: Likewise.
	
2007-02-11  Matthieu Lemerre  <racin@free.fr>

	* src/compiler/jit/backend.c (unify_location): Fixed an assert
	in if expressions.
	
2007-02-10  Matthieu Lemerre  <racin@free.fr>

	* src/compiler/jit/backend.c (return_function_value): Fixed
	previously introduced bug when return value is void.

	Minor corrections:
	
	* src/include/l/string.h (STRING): The STRING wrapper now uses
	compound literals instead of alloca. Thus STRING can safely be
	used in loops.
	* src/std/print.c (print_Symbol): New printer. Initialised.

	Implementation of functions that return void:

	* src/compiler/jit/backend.c (return_function_value): Do nothing
	if return value is void.
	* src/parser/parse.c (parse_function_definition): remove assertion.

	Implementation of unary minus:
	
	* src/parser/parse.c (parse_unary_expression): Handle the unary
	minus.
	* src/expander/expand.c (expand_unary_operator): New expander.
	Initialized.
	* src/compiler/generate.c (compile_unary_minus_Int): New
	function. Initialized.

2007-02-10  Matthieu Lemerre  <racin@free.fr>

	Bug fixes.
	
	* src/std/l-form.c (expand_form_rec): Fixed a bug that prevented
	use of Form('symbol')

	* src/std/print.c (print_Int): Now can print all negative numbers.

2007-02-10  Matthieu Lemerre  <racin@free.fr>

	Bug when unifying Void locations in the compiler; 
	catch when big locations are being unified.
		
	* test/cocyte18-bool-values.l: Test unification of void locations.

	* src/compiler/jit/backend.c (make_unifiable_location): Don't do
	anything for a void location.  Refuse to treat big locations.
	(unify_location): Don't unify void locations.

	* src/compiler/generate.c (compile_if): Add a type check:
	else.type == then.type.

2007-02-10  Matthieu Lemerre  <racin@free.fr>

	Boolean bug fix.
	
	* test/cocyte18-bool-values.l: New test file.
	
	* src/compiler/jit/low-location.c (move_between_low_locations_constant_register):
	Make this function non static; used by bes_to_location.
	* src/compiler/jit/backend.c (bes_to_location): New function.
	* src/compiler/generate.c (DEFINE_BOOLEAN_OP): Implemented. Calls
	bes_to_location.

	
2007-02-10  Matthieu Lemerre  <racin@free.fr>

	Better derived type support : creators and accessers, some more
	errors catched.

	* test/malebolge07-creator.l: New test file.

	* src/std/init_library.c (init_library): Initialise the creator.
	* src/std/Makefile.am (libl_std_la_SOURCES): Added creator.c
	* src/std/creator.c: New file.
	* src/include/l/sys/creator.h: New file.
	* src/include/l/creator.h: New file.
	* src/expander/expand.c (expand_label): New expander. Initialized.

	* src/expander/access.c (get_accesser, get_left_accesser):
	New (private) functions.
	(derived_accesser, derived_left_accesser): New accesser, for
	derived types.
	(define_left_accesser): Corrected type of the argument

	* src/compiler/type.c (make_type_struct): Associates the structure
	type with a creator.
	(make_type_pointer): Same for the pointer type.
	* src/compiler/analysis.c (define_type): Creates a creator, an
	accesser, and a left accesser for the created type.

		
	* src/parser/parse.c (parse_indirection_type_form): Corrected a
	bug that prevented types like Int ** to be parsed.
	
	* src/expander/expand.c (insert_id): Check if id already present,
	or if it shadows an existing identifier.

	* src/compiler/generate.c (type_check): Better error message.

2007-02-05  Matthieu Lemerre  <racin@free.fr>

	* test/cocyte17-struct-copy.l: New test file.

	* src/parser/parse.c: New COLON token.
	(parse_labelled_expression): New grammar rule.
	(parse_tuple): Now use parse_labelled_expression instead of simple
	expression.

	* src/expander/expand.c (expand_struct): New expander.
	(init_expand): Initialize it.

	* src/compiler/jit/backend.c (move_between_big_locations): New
	function.
	(move_between_locations): Add call to move_between_big_locations
	if needed.
	(create_anonymous_stack_variable): New function.
	* src/compiler/generate.c (compile): Now pass the type as an
	argument to compilers.
	(compile_struct): New compiler. 
	(init_generate): Initialize it.
	* src/objects/function.h: Add support for passing types too.


2007-02-05  Matthieu Lemerre  <racin@free.fr>

        Corrected a bug that caused non-word stack allocations to overlap.
	
	* src/compiler/jit/stack.c (allocate_memory_block): Returns an
	offset that points to the beginning of the allocation zone.
 
2007-02-03  Matthieu Lemerre  <racin@free.fr>

	Basic tuple support & little form cleanup.
	
	* test/cocyte16-basic-tuple.l : New test file.

	* src/parser/parse.c (parse_primary_expression): Removed old
	assertion that prevented parsing of tuples of more than 1
	component.

	* src/parser/form.h : Remove form definitions of obsolete forms.

	* src/parser/form.c (void_form): Changed body to use generic_form
	instead of obsolete tuple_form.
 
	* src/expander/left-expand.c (left_expand_tuple): New function. Added in the
	initialisation.

	* src/expander/expand.c (expand_tuple): New function. Added in the
	initialisation.

	* src/compiler/jit/backend.c (compound_location): Changed function
	body.
	(copy_location): New function.
	(void_location): Now use the standard compound_location.
	(spill): Added somme assertions.
	(move_between_compound_locations): New function.
	(move_between_locations): Check if locations is compound, then
	calls move_between_compound_locations.
	(free_location): Added support to compound_locations.
	(free_location): Commented out a wrong assertion.

	* src/compiler/generate.c (compile_tuple): New function.  Added in
	the initialisation.

	* src/compiler/backend.h (struct location): New fields
	location_length, locations for compound location.

2007-02-03  Matthieu Lemerre  <racin@free.fr>

	* src/include/l/sys/hash.h (gethash): Add casts to suppress some
	warnings.
	(gethash_string): Likewise.

2007-02-01  Matthieu Lemerre  <racin@free.fr>

	Corrected a few things not commited in previous revision.
	
	* test/malebolge06-form.l: add f Form.

	* src/std/l-form.c:  Fix include.

2007-02-01  Matthieu Lemerre  <racin@free.fr>

	New set of functions and macros for manipulating L forms from L.
	
	* test/malebolge06-form.l: New test file.
	
	* src/include/l/form.h: New file.
	
	* src/std/init_library.c (init_library): Call init_form().
	* src/std/l-form.c: New file.
	* src/std/list.c (expand_list): Remove call to lispify().
	* src/std/Makefile.am (libl_std_la_SOURCES): add l-form.c.

	* src/parser/parse.c: Changed the lexer and parser to handle $ and $@.
	(l_parse_statement_or_expression): New function.
	* src/parser/form.c (init_form): Move some function definitions to
	L to l-form.c.
	

2007-01-31  Matthieu Lemerre  <racin@free.fr>

	Compiler bug fixed and some checks added.

	* src/compiler/jit/low-location.c (move_between_low_locations_funparm_any): 
	Fix a bug that prevented a temporary register to be freed when not
	used anymore.
	
	* src/main.c (main): Added a check that fails if the test()
	function does not exists.

	* src/eval.c (eval): Comment added; remove it to see the compiled
	function.

2007-01-28  Matthieu Lemerre  <racin@free.fr>

	Hash_String table support.

	* test/malebolge05-hash.l (test): Test Hash_Strings too.

	* src/std/hash.c (expand_hash_string, hash_string_accesser)
	(hash_string_left_accesser, make_type_Hash_String): New functions.
	(init_hash): use the above functions.
	
	* src/include/l/sys/hash.h (make_hash_string_table)
	(gethash_string, puthash_string): New functions.
	(hash_string_table_t): New type.

	* src/include/l/string.h (make_C_string_from_L_string): Function
	for L->C strings.
	(STRING): New macro, for C->L strings.

2007-01-27  Matthieu Lemerre  <racin@free.fr>

	* test/malebolge05-hash.l (test): Just adds another test with
	Hash(Int, Int).

2007-01-27  Matthieu Lemerre  <racin@free.fr>
	
	Hash table support.

	* src/objects/hash.h Moved relevant definitions to ...
	* src/include/l/sys/hash.h Here. Fixed includes.

	* test/malebolge05-hash.l : New file.
	* src/std/hash.c : New file.
	* src/std/init_library.c (init_library): Calls init_hash().
	* src/std/Makefile.am (libl_std_la_SOURCES): add hash.c

2007-01-27  Matthieu Lemerre  <racin@free.fr>

	Square brackets handling and lexer/parser bug fixes.
	
	* src/parser/parse.c : Change to handle the square brackets.
	(parse_postfix_expression): Corrected a bug in '.' handling.
	* src/lexer/character_set.c (single_char_character_set): New
	function.
	* src/lexer/nfa.c (parse_regexp): Corrected an error in the 
	handling of '\'.

2007-01-27  Matthieu Lemerre  <racin@free.fr>

	Left expanders and left accessers support.

	* src/include/l/access.h: Now handles the left accessers too.
	* src/include/l/expand.h: Handles also the left expanders.

	* src/expander/left-expand.c: New file.
	
	* src/expander/expand.c (expand_assign): Now calls left_expand.
	(init_expand): Calls the left expander initialisation function.
	
	* src/expander/access.c (define_left_accesser)
	(left_expand_access, struct_left_accesser)
	(pointer_left_accesser): New functions.
	(left_accesser_hash): New hash table.
	(init_access): Now defines the left expander for [].

	* src/expander/Makefile.am (libl_expand_la_SOURCES): added
	left-expand.c

	* src/compiler/type.c (make_type_struct): Register the type
	left accesser to use struct_left_accesser.
	(make_type_pointer): Use pointer_left_accesser.

	* test/malebolge01-pointer-access.l: Test auto deref when used as
	a lvalue.
	

2007-01-25  Matthieu Lemerre  <racin@free.fr>

	Enhanced accesser, and asprint_type cleanup.
	
	* src/expander/Makefile.am (libl_expand_la_SOURCES): Add access.c
	* src/expander/access.c : New file.
	(expand_access, pointer_accesser, struct_accesser): moved from
	expand.c.
	(define_accesser): New function.
	(init_access): New function.
	(accesser_hash): New hash table.
	(expand_access): Now use the accesser_hash.
	* src/expander/expand.c (init_expand): Now calls init_access. 
	* src/compiler/type.c (make_type_struct): Set the created type to
	use the struct accesser.
	(make_type_pointer): Set it to use the pointer accesser.
	* src/include/l/access.h: New file.

	* src/compiler/type.c (asprint_type): Now takes a Type argument.
	(asprint_type_form): Old asprint_type function.
	Fixed all callers.


2007-01-24  Matthieu Lemerre  <racin@free.fr>

	Yet another cleanup.
	
	* src/compiler/type.c: Cleaned up the file.
	* src/include/l/sys/type.h: New file.
	* src/include/l/type.h: Cleaned up, splitted with sys/type.h.
	Fix some source files to use sys/type.h.
	* src/objects/symbol.h: Fixed a circular header dependency.
	* src/std/list.c (make_type_List): Moved from compiler/type.c
	(init_list): Use new type constructor interface.

2007-01-23  Matthieu Lemerre  <racin@free.fr>

	Another cleanup pass.

	* src/objects/type.h: Removed file.
	* src/objects/pair.c: Cleaned up all useless functions.
	* src/objects/symbol.c: Likewise.
	
	* src/compiler/generate.c (struct_accessor): Likewise.
	* src/compiler/analysis.c (init_analysis): Remove useless declaration.
	* src/parser/form.c: Likewise.


2007-01-22  Matthieu Lemerre  <racin@free.fr>

	Little additional cleanup.

	* src/objects/fixnum.c : File removed.
        * src/objects/fixnum.h : File removed.
        * src/objects/function.c : File removed.
        * src/objects/object.h : File removed.
        * src/objects/string.c : File removed.

	Fixed includes.


2007-01-22  Matthieu Lemerre  <racin@free.fr>

	Cleaned up the type handling.
	
	* src/compiler/type.c (type_hash): removed hash table.
	(make_type): Now quits properly when given an unknown type.
	(intern_type): Removed the special case that used the type_hash.
	(TYPE): New function.
	(define_type_type_form): New function.
	(define_type_string): New function.
	* src/include/l/type.h (TYPE): Removed macro. Added TYPE function.

	* src/compiler/generate.c: Use new function TYPE.  Replaced int by
	Int, void by Void.
	* src/compiler/jit/backend.c (free_location): Likewise.
	* src/compiler/jit/operations.c : Likewise.
	* src/parser/form.c: Likewise.
	* src/std/list.c: Likewise.
	* src/std/output.c: Likewise.
	* src/std/print.c: Likewise.
	* src/std/xml.c: Likewise.
	* test/cocyte12-structures.l: Likewise.
	* test/cocyte15-rec-types.l: Likewise.
	
	* src/objects/object.h (CREATE_OBJECT): Removed use of TYPE.
	* src/objects/symbol.h: Likewise.
	* src/objects/type.h: Likewise.
	
	* src/compiler/c-to-l.h (DEFINE_TYPE_SYMBOL, DEFINE_TYPE): Removed
	macros.
	* src/compiler/analysis.c (init_analysis): Replace DEFINE_TYPE by
	define_type_string.
	(define_type_alias): Triggers a panic.
	(define_type): Uses define_type_type_form.

2007-01-20  Matthieu Lemerre  <racin@free.fr>

	* src/parser/parse.c (parse): New parser entry point, takes a
	String argument.
	(parse_file): Removed function.
	Fixed header parse.h

	* src/include/l/string.h (make_heap_string): Changed to have a
	trailing 0.
	
	* src/main.c (main): Now calls eval_file.
	(maken_heap_string): Same thing.
	* src/eval.c (eval): New file.
	* src/Makefile.am (L_SOURCES): added eval.c

2007-01-18  Matthieu Lemerre  <racin@free.fr>

	* src/std/print.c : New file.
	* src/std/output.c: New file.
	* src/std/init_library.c (init_library): Calls also init_output() and init_print()
	* src/std/Makefile.am (libl_std_la_SOURCES): added output.c and print.c

	* src/parser/parse.c (l_parse_statement): New function
	* src/parser/buffer.h : Changed inline functions to static inline.
	* src/include/l/std/output.h: New file.
	* src/include/l/string.h (struct string): a String and its content
	are not forced to be allocated at the same place; fixed other
	files to take this into account.

	* src/expander/expand.c (expand_block): Added a check on blocks not being empty.
	* src/compiler/c-to-l.h: added the TYPE_ macro
	* src/Makefile.am (L_LDADD): Added -lm

2007-01-17  Matthieu Lemerre  <racin@free.fr>

	* src/parser/form.c (lispify_rec): Use string_t instead of char *.

2007-01-14  Matthieu Lemerre  <racin@free.fr>

	* src/include/type.h : New location for the old compiler/type.h
	file.
	* src/include/string.h : New string structure.
	* src/objects/string.h: Removed file
	* src/compiler/type.h: Removed file
	All including files changes.
	
	* src/std/xml.c: Use string_t instead of char *.
	* src/parser/parse.c (get_next_token): Now creates a string_t
	* src/parser/form.c (string_form): Now takes a string_t instead of
	char *.

2007-01-13  Matthieu Lemerre  <racin@free.fr>

	* doc: New directory, holding L's documentation.
	* configure.in: Added doc/Makefile
	* Makefile.am: Added doc

2007-01-06  Matthieu Lemerre  <racin@free.fr>

	* Initial public release

