2016-12-102-10vin Smith  <gavinsmith0123@gmail.com>

	* Parsetexi.pm: Use Texinfo::XSLoader module.

2016-11-12  Gavin Smith  <gavinsmith0123@gmail.com>

	* convert.c (convert_to_normalized): Remove.

2016-09-21  Gavin Smith  <gavinsmith0123@gmail.com>

	* input.c (convert_to_utf8): Start on converting the character 
	encoding of the input.

2016-07-09  Gavin Smith  <gavinsmith0123@gmail.com>

	* convert.c (convert_to_texinfo): New function.
	(text_convert): Remove.

2016-06-13  Gavin Smith  <gavinsmith0123@gmail.com>

	* Makefile.am (bin_PROGRAMS): Add an independent 'parsetexi' 
	executable again.  This will be useful for finding bugs with 
	valgrind. 

2016-05-25  Gavin Smith  <gavinsmith0123@gmail.com>

	* context_stack.c: Implement region stack.

2016-05-22  Gavin Smith  <gavinsmith0123@gmail.com>

	* parser.c (mark_and_warn_invalid): Implement.

2016-05-14  Gavin Smith  <gavinsmith0123@gmail.com>

	* Parsetexi.pm: Remove commented-out code to use other methods 
	of getting data from C code.

2016-03-31  Gavin Smith  <gavinsmith0123@gmail.com>

	* texi2any-2-C.pl: Remove file.

2016-03-31  Gavin Smith  <gavinsmith0123@gmail.com>

	* parser.c (process_remaining_on_line): Handle nested @macro.

2016-03-28  Gavin Smith  <gavinsmith0123@gmail.com>

	* Makefile.am: Disable standalone parsetexi program, as building it
	doesn't work.
	* command_data.awk: Fix command data for commands given by 
	backslash escapes.

2016-03-27  Gavin Smith  <gavinsmith0123@gmail.com>

	Replace MakeMaker build system with automake/libtool one, copied 
	from XSParagraph.
	* Parsetexi: Remove subdirectory.
	* Parsetexi/Parsetexi.xs,
	* Parsetexi/lib/Parsetexi.pm: Move to top level.

2015-12-05  Gavin Smith  <gavinsmith0123@gmail.com>

	* commands.h (CF_global, CF_global_unique): New flags.

2015-12-05  Gavin Smith  <gavinsmith0123@gmail.com>

	* errors.c (command_warnf, command_errorf): Implement.

2015-12-01  Gavin Smith  <gavinsmith0123@gmail.com>

	* separator.c (remove_empty_content_arguments): Implement.

2015-12-01  Gavin Smith  <gavinsmith0123@gmail.com>

	* api.c (parse_text): Use new function input_push_text_with_line_nos
	to keep track of line numbers (for tests).

2015-11-30  Gavin Smith  <gavinsmith0123@gmail.com>
 
	* Parsetexi/lib/Parsetexi.pm (parser): Set conf keys on parser 
	object.

2015-11-29  Gavin Smith  <gavinsmith0123@gmail.com>

	* Parsetexi/lib/Parsetexi.pm (parse_texi_text): Add function.

2015-11-29  Gavin Smith  <gavinsmith0123@gmail.com>

	Update so works again.

	* texi2any-C.pl, texi2any-C-2.pl: Replaced, to match most
	recent revision.
	* Parsetexi/lib/Parsetexi.pm: Set 'level' value from value in 
	'extra'.
	* Match changes made in the main code on 2015-10-02 to make 
	@heading affected by @lowersections.

2015-06-18  Gavin Smith  <gavinsmith0123@gmail.com>

	* parser.c (process_remaining_on_line) <@value> Add element to 
	tree for unexpanded value.
	* api.c (element_to_perl_hash): Output 'type' as name for 
	unexpanded @value.

2015-06-15  Gavin Smith  <gavinsmith0123@gmail.com>

	* Parsetexi/Parsetexi.xs,
	* api.c (build_global_info): New function.
	* Parsetexi/lib/Parsetexi.pm (parse_texi_file): Fetch the 
	"global information," including the @documentencoding.

	* parser.c (global_info): New struct variable.
	* end_line.c (end_line_misc_line) <@documentencoding> Save 
	document encoding.

2015-04-10  Gavin Smith  <gavinsmith0123@gmail.com>

	* end_line.c (end_line_starting_block): Call 
	register_command_arg.
	* parser.c (process_remaining_on_line) <command with command as 
	argument, like @itemize @bullet>: Set command_as_argument extra 
	value.

2015-04-10  Gavin Smith  <gavinsmith0123@gmail.com>

	* Parsetexi/lib/Parsetexi.pm (parser): Add code to receive 
	"values" configuration value.
	(parse_texi_line): First implementation.
	* Parsetexi/Parsetexi.xs (parse_string, store_value)
	(wipe_values): Expose.
	* api.c (parse_string): New function.
	* macro.c (wipe_values): New function.

2015-04-09  Gavin Smith  <gavinsmith0123@gmail.com>

	* end_line.c (parse_line_command_args) <CM_synindex>: Record
	index synonym.
	* api.c (build_single_index_data): Create "contained_indices" 
	and "merged_in".

2015-03-23  Gavin Smith  <gavinsmith0123@gmail.com>

	* tree_types.h (enum extra_type): Add extra_def_args.
	(DEF_ARGS_EXTRA): New type.
	* api.c (element_to_perl_hash),
	* dump_perl.c (dump_extra): Handle extra_def_args.
	* def.c (parse_def, next_bracketed_or_word): First 
	implementations.
	* end_line.c <ET_def_line>: Call parse_def.  Don't record the 
	index entry yet.

2015-03-14  Gavin Smith  <gavinsmith0123@gmail.com>

	* close.c (close_command_cleanup): @multitable handling.

2015-03-07  Gavin Smith  <gavinsmith0123@gmail.com>

	* Parsetexi/lib/Parsetexi.pm (parse_texi_file): Handle warnings 
	as well as error messages.
	* close.c (close_command_cleanup) <CF_blockitem>: More complete.
	* multitable.c (gather_previous_item): Implement.

2015-03-06  Gavin Smith  <gavinsmith0123@gmail.com>

	* counter.c: New file.
	* commands.h (command_name): New macro.

2015-03-01  Gavin Smith  <gavinsmith0123@gmail.com>

	* end_line.c (parse_line_commanad_args) <CM_defindex>: Call 
	add_index.
	* handle_commands.c (handle_misc_command) <CM_node>: Set 
	remaining_args on element.
	* api.c (element_to_perl_hash): Output 'line_nr'.

2015-02-27  Gavin Smith  <gavinsmith0123@gmail.com>

	* tree_types.h (enum extra_type): Add extra_deleted.
	* parser.c (abort_empty_line): Remove "spaces_before_argument" 
	extra value.
	(process_remaining_on_line): Add check for empty input ("EMPTY 
	TEXT").

2015-02-22  Gavin Smith  <gavinsmith0123@gmail.com>

	* macro.c (store_value, fetch_value): New functions.
	* end_line.c (parse_special_misc_command): First implementation.  
	Handle @value.
	* handle_commands.c (handle_misc_command) <MISC_special etc.>: 
	More complete.
	* parser.c (process_remaining_on_line): Handle @value.

2015-02-18  Gavin Smith  <gavinsmith0123@gmail.com>

	* api.c (build_index_data): New function.

2015-02-16  Gavin Smith  <gavinsmith0123@gmail.com>

	* api.c (build_texinfo_tree, build_label_list): New functions,
	to construct Perl objects directly in memory, as a possible 
	replacement for using "eval" in Perl.
	* Makefile.am (AM_CFLAGS): Add flags for linking with Perl 
	libraries.

	* Parsetexi/lib/Parsetexi.pm (parse_texi_file): Add another
	way to get data from C program (disabled).  (Indices not done 
	yet.)

2015-02-14  Gavin Smith  <gavinsmith0123@gmail.com>

	* tree.c (insert_into_contents): Update parent field of inserted 
	element.

2015-02-14  Gavin Smith  <gavinsmith0123@gmail.com>

	* input.c, Parsetexi/Parsetexi.xs (add_include_directory): New 
	function.
	* Parsetexi/lib/Parsetexi.pm (parser): Call it.
	* input.c (input_push_file): Look through list of include 
	directories.

2015-02-13  Gavin Smith  <gavinsmith0123@gmail.com>

	* parser.c (abort_empty_line) <ET_empty_line>: Clear type of
	ET_empty_line element as intended, instead of deleting it.

2015-02-12  Gavin Smith  <gavinsmith0123@gmail.com>

	* separator.c (register_command_arg): New function.
	(handle_close_brace, handle_comma) <brace commands with positive 
	number of args>: Call it.
	* extra.c (add_extra_key_contents_array): New function.

2015-02-12  Gavin Smith  <gavinsmith0123@gmail.com>

	* command_data.txt <brace commands>: Add arg types for all 
	commands (some of these could change).

2015-02-03  Gavin Smith  <gavinsmith0123@gmail.com>

	* parser.c (process_remaining_on_line): Handle @verb.

2015-02-02  Gavin Smith  <gavinsmith0123@gmail.com>

	* parser.c (isolate_last_space, start_empty_line_after_command): 
	Add comments.
	(big_loop, process_remaining_on_line): Function renamed.
	<no brace after brace command>: Add commented-out code and 
	comment.
	* separator.c (handle_open_brace): Set "spaces_before_argument" 
	extra value.

2015-02-02  Gavin Smith  <gavinsmith0123@gmail.com>

	* end_line.c (parse_line_command_args): More complete 
	implementation.
	(is_decimal_numer): New function split from 
	parse_line_command_args.

	* parser.c (read_command_name): Return null if not looking at a 
	valid command name.

2015-02-01  Gavin Smith  <gavinsmith0123@gmail.com>

	* errors.c: New file.
	(line_error, line_errorf, dump_errors): New functions.
	* end_line.c (parse_line_command_args) <@sp>: Call line_errorf 
	if argument is malformed.

	* Parsetexi/lib/Parsetexi.pm (parse_texi_file): Fetch error 
	messages.

	* dump_perl.c (dump_line_nr): Arguments changed.
	* test-files/error.texi: New test file.

2015-01-31  Gavin Smith  <gavinsmith0123@gmail.com>

	* command_data.txt: Specify argument types of the other "misc" 
	commands.
	* end_line.c (parse_line_command_args): More complete 
	implementation.
	* parser.c (digit_chars): New variable.

2015-01-30  Gavin Smith  <gavinsmith0123@gmail.com>

	* end_line.c (end_line_misc_line): Set "misc_content" key as 
	intended, instead of "misc_args".
	<sectioning commands>: Set "level" extra value.
	* handle_commands.c (handle_misc_command): Add comment.

	* command_data.txt: Add "sectioning" flag for sectioning 
	commands.  Add "majorheading".  Say that "@printindex" takes 1 
	argument.
	* end_line.c (parse_line_command_args) <printindex>: Handle.

	* Parsetexi/lib/Parsetexi.pm (_add_parents): Set 'level' value 
	on elements.

2015-01-24  Gavin Smith  <gavinsmith0123@gmail.com>

	* end_line.c (end_line_starting_block, end_line_misc_line): 
	Split functions out of end_line.

2015-01-24  Gavin Smith  <gavinsmith0123@gmail.com>

	* dump_perl.c: In all functions, output to a TEXT object instead 
	of printing to standard output.
	* parser.c (parse_texi_file): Return type changed.

	* dump_perl.c, Parsetexi/Parsetexi.xs (dump_tree_to_string_1)
	(dump_tree_to_string_2, dump_tree_to_string_3)
	(dump_root_element_1, dump_root_element_2): New functions.
	* Parsetexi/lib/Parsetexi.pm: Call XSUB parse_file and then 
	these new functions, instead of capturing output of separate 
	"parsetexi" executable.  Get and eval data from each 
	node/top-level element separately, which is faster than eval-ing 
	a dump of the the entire dump at once.

2015-01-23  Gavin Smith  <gavinsmith0123@gmail.com>

	* indices.c (enter_index_entry): Set 'number' field on index 
	entry.
	* dump_perl.c (dump_entries_of_index): Output 'number' key for 
	index entry.

	* handle_commands.c (handle_misc_command) <item of enumerate>: 
	Set 'item_number" key (incorrectly).

	* separator.c (handle_open_brace) <brace_command_arg>: Require
	more than one parameter before adding 
	ET_empty_spaces_before_argument.

	* Parsetexi/lib/Parsetexi.pm (_find_menus_of_node): Don't set
	'associated_section' by mistake.

2015-01-23  Gavin Smith  <gavinsmith0123@gmail.com>

	* Parsetexi/lib/Parsetexi.pm: Update a comment.
	* end_line.c (end_line): Check return value of lookup_command 
	correctly.

	* Parsetexi/Parsetexi.xs, Parsetexi/lib/Parsetexi.pm: Remove 
	constant loading code.

2015-01-23  Gavin Smith  <gavinsmith0123@gmail.com>

	* tree_types.h (enum extra_type): Add extra_string value.
	* extra.c (add_extra_string): New function.
	* dump_perl.c (dump_extra) <extra_string>: Support.

	* end_line.c (parse_line_command_args): New function.
	<CM_columnfractions>: Split argument line up by whitespace.

	* end_line.c (end_line) <ET_misc_line_arg>: Call 
	parse_line_command_args, and store result in "misc_args" key.
	<@multitable @columnfractions>: Copy "misc_args" key into
	"columnfractions" key.
	<@multitable prototype line>: Set 'prototypes' extra key, 
	copying from contents of argument container.

	* handle_commands.c (handle_misc_command): Set "cell_number" 
	extra keys for a multitable (not correctly yet).
	* end_line.c (end_line) <CM_enumerate>: Output 
	"enumerate_specification" key.

	* command_data.txt: Add @heading.  Remove root flag from heading 
	commands.
	* command_data.awk: Correct output of CM_APOSTROPHE symbol.

2015-01-22  Gavin Smith  <gavinsmith0123@gmail.com>

	* parser.c (big_loop) <reading @ command>: Don't advance the 
	line pointer until we are sure we want to process the command
	name that was just read (and not, for example, do stuff with
	menus).

2015-01-21  Gavin Smith  <gavinsmith0123@gmail.com>

	* tree_types.h (enum extra_type): New values 'extra_node_spec',
	'extra_node_spec_array'.
	(NODE_SPEC_EXTRA): New type.
	* extra.c (add_extra_node_spec, add_extra_node_spec_array): New
	functions.
	* dump_perl.c (dump_extra): Output these two new types of extra 
	key.

	* end_line.c (parse_node_manual): New function.

	* menus.c (register_extra_menu_entry_information): Call 
	parse_node_manual and call add_extra_node_spec with the result.
	* end_line.c (end_line) <@node>: Create 'nodes_manuals' array 
	and call add_extra_node_spec_array. 

	* Parsetexi/lib/Parsetexi.pm (_find_menus_of_node): Don't set
	any of the 'menu_entry_node' values.
	(_complete_node_list): Don't set 'node_content' on any of the 
	'nodes_manuals' entries.  Set 'normalized' on each node from
	the first 'nodes_manuals' entry.

	* tree.c (remove_from_contents): New function.

2015-01-19  Gavin Smith  <gavinsmith0123@gmail.com>

	* dump_perl.c (dump_extra) <extra_index_entry>: Don't output
	current indent.
	<extra_misc_args>: Escape backslashes and single quotes in 
	output.

2015-01-19  Gavin Smith  <gavinsmith0123@gmail.com>

	* command_data.awk: Output #define's into generated 
	commands_id.h file to give more readable alternatives for the 
	CM_hex_?? enum command_id values.
	* convert.c (convert_to_normalized): More complete 
	implementation.

2015-01-18  Gavin Smith  <gavinsmith0123@gmail.com>

	* tree_types.h (INDEX_ENTRY_REF): New type.
	* indices.c (enter_index_entry): Create an INDEX_ENTRY_REF 
	object and store it instead of a pointer to an INDEX_ENTRY, 
	because the latter could be become invalid when the containing 
	array was reallocated.
	* extra.c (add_extra_key_index_entry): Take an INDEX_ENTRY_REF 
	argument.
	* indices.c (enter_index_entry): Call to 
	add_extra_key_index_entry updated.
	* dump_perl.c (dump_extra) <index entry>: Get stored value as an
	INDEX_ENTRY_REF.

	* parser.c (parse_texi): Always return the root of the tree.

2015-01-14  Gavin Smith  <gavinsmith0123@gmail.com>

	First support of outputting an index.

	* extra.c (add_extra_key_misc_args, add_extra_key_index_entry): 
	New functions.
	* tree_types.h (INDEX, INDEX_ENTRY): New types.
	* commands.h (CF_index_entry_command): New flag.

	* indices.c (associate_command_to_index, index_of_command): New
	functions.
	(init_index_commands): Call associate_command_to_index for each 
	index command.
	(enter_index_entry): New function.

	* end_line.c (trim_spaces_comment_from_content): New function.
	(end_line): Call it in two places.
	(end_line) <misc args>: Add "misc_args" extra key, and call 
	enter_index_entry for index commands.

	* dump_perl.c (dump_indices_information): New function.
	(dump_route_to_element): Take extra argument saying which text
	buffer to write to.
	(dump_extra): Handle two extra types of extra key, 
	extra_index_entry and extra_misc_args.  For extra_index_entry, 
	dump to tree_to_indices_dump variable.
	(dump_tree_to_perl): Call dump_indices_information, and output
	tree_to_indices_dump afterwards.

	* Parsetexi/lib/Parsetexi.pm (parse_texi_file): Set 
	'index_names' from output of parsetexi.

	* test-files/index.texi: New test file.

2015-01-12  Gavin Smith  <gavinsmith0123@gmail.com>

	All files: Add copyright and licensing notices.

2014-12-20  Gavin Smith  <gavinsmith0123@gmail.com>

	* labels.c: New file.

	* end_line.c (end_line) <@node>: Call register_label.
	* dump_perl.c (dump_tree_to_perl): Dump information about 
	labels.
	* Parsetexi/lib/Parsetexi.pm: Set 'labels_information' from 
	dump.

	* convert.c (convert_to_normalized): Stub added.

2014-12-19  Gavin Smith  <gavinsmith0123@gmail.com>

	* element_types.txt: Add menu_entry and menu_star types.
	* menus.c: New file.
	(handle_menu, enter_menu_entry_node): Add functions.
	* parser.c (big_loop): Call handle_menu in menus.c.

	* handle_commands.c (handle_block_command) <menu commands>: 
	Outline of menu handling.
	* separator.c (handle_separator): Handle separators inside a 
	menu entry.
	* end_line.c (end_line): Start processing a menu at end of 
	"@menu" line.  Handle end of a line inside a menu.

	* Parsetexi/lib/Parsetexi.pm: Complete 'menus' arrays for each 
	node element, and 'menu_entry' 'extra' keys on menu entries.

	* parser.c (isolate_last_space): Take an extra argument giving 
	type of whitespace element.
	* tree.c (destroy_element): Free the contents and args arrays.
	(pop_element_from_args): New function.

2014-12-17  Gavin Smith  <gavinsmith0123@gmail.com>

	* tree_types.h (LINE_NR): Fields added to struct.
	* input.c (line_nr): New variable.
	(next_text, input_push_text, input_push_file): Update line_nr.
	* handle_commands.c (handle_misc_command): Record current line 
	number.
	* dump_perl.c (dump_element): Dump line number if one was 
	recorded.  This allows error messages to be printed when 
	makeinfo is run.

2014-12-14  Gavin Smith  <gavinsmith0123@gmail.com>

	* Parsetexi/lib/Parsetexi.pm: Put Texinfo::Report in @ISA.
	(parser): Set 'gettext' on parser object.

	* tree_types.h (enum route_element_type): New value 
	route_not_in_tree.
	* dump_perl.c (dump_extra): If extra key marked as not in tree, 
	dump it in the main tree output.
	* end_line.c (@node): Create a new element with some whitespace 
	elements removed from its contents, and save this as 
	"node_content".

2014-12-14  Gavin Smith  <gavinsmith0123@gmail.com>

	* parser.c (current_node, current_section): New variables.
	* end_line.c (end_line) <@node>: Set current_node.
	<root commands>: Set 'associated_node' and 'associated_section' 
	keys, and set current_section.

	* extra.c (lookup_extra_key): New function.

2014-12-14  Gavin Smith  <gavinsmith0123@gmail.com>

	* tree_types.h (ELEMENT): Add fields to save information about 
	'extra' keys on an element.
	* extra.c: New file.
	* dump_perl.c (dump_tree_to_perl): Dump lines filling in 'extra' 
	keys at the end.
	* tree_types.h (ELEMENT): Extra fields added to aid dumping.

	* end_line.c <@node>: Call 'add_extra_key_contents' to set 
	"node_content" key.
	* Parsetexi/lib/Parsetexi.pm (_complete_node_list): Comment out 
	code setting "node_content" keys on node elements.

	* text.c (text_printf): New function.

2014-12-12  Gavin Smith  <gavinsmith0123@gmail.com>

	* Parsetexi/lib/Parsetexi.pm (parse_texi_file): Set 
	'node_content' extra key on each node element as well as in the 
	elements in the 'node_manuals' array.  This means that node 
	names appear in the node information line in the Info output.

2014-12-12  Gavin Smith  <gavinsmith0123@gmail.com>

	* Parsetexi/lib/Parsetexi.pm (parse_texi_file): Set 
	'input_file_name' in document information.  This allows running 
	"./makeinfo test-files/hello.texi", and getting an output file 
	"hello.info".
