# Copyright 2010-2026 Free Software Foundation, Inc.
#
# This file is part of GNU Texinfo.
#
# GNU Texinfo is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License,
# or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

# The first column holds type names, second column contains flags.
# Flags for text elements:
#  text: distinguishes text from other elements
#  leading_space: text elements with spaces appearing before actual text.
#                 To keep in sync with Perl parser %leading_space_types.
#
# The following flags correspond to elements holding information on the tree
# associated to the type.  The association is set in the parsing
# code based on the command/container, not using these flags.  Therefore
# the type flags should be determined by looking at the parser code.  The
# main use of these flags is to determine the number of slots needed in
# the elt_info array in generated code.  These flags are not used in the
# C code.
#  spaces_before: element containing the spaces appearing before the
#                 argument
#  braces: element containing the spaces appearing between the @-command name
#          and the opening brace
#  spaces_after: element containing the spaces appearing after the argument
#
# Other flags:
#  with_command: type corresponding to @-command with name determined dynamically.
#                Index commands (that can be added with defindex, for
#                example), definfoenclose'd commands, user-defined macro calls.
#                Mainly used in C specific code for memory management and when
#                passing to Perl.
#  c_only: element type associated to @-commands appearing only in C, needed
#          because each correspond to a different need for associated info
#          element or strings.  Flag only used to avoid passing to Perl.


# Types for @-commands
index_entry_command                    spaces_before,with_command
definfoenclose_command                 braces,with_command

# only in C.  These types should only be used in code to set the
# type at the element creation, except maybe to help with the handling
# of C specific data
nobrace_command                        c_only
line_command                           spaces_before,c_only
block_command                          spaces_before,c_only
brace_command                          braces,c_only
# BRACE_context commands
context_brace_command                  braces,spaces_before,c_only

# For text elements
after_menu_description_line               text
space_at_end_menu_node                    text
empty_line                                text,leading_space
raw                                       text
ignorable_spaces_after_command            text,leading_space,ignorable_text
ignorable_spaces_before_command           text,trailing_space,ignorable_text
spaces_at_end                             text,ignorable_text
spaces_after_close_brace                  text,leading_space,ignorable_text
spaces_before_paragraph                   text
text_after_end                            text
text_before_beginning                     text
normal_text                               text
# text not in the regular converted tree elements.
# Could be part of informative command arguments, for added separators...
other_text                                text
# in info text elements of the same name
spaces_after_argument                     text,ignorable_text
spaces_after_cmd_before_arg               text,ignorable_text
spaces_before_argument                    text,ignorable_text

# Containers
document_root
root_line
before_node_section
postamble_after_end
preamble_before_beginning
preamble_before_setfilename
preamble_before_content
paragraph
preformatted
rawpreformatted

# @-commands arguments containers
arguments_line
brace_command_context
# @-commands containers for one argument content
brace_container
# with separate leading spaces in info, and trailing (if not in inline)
brace_arg                                  spaces_before,spaces_after
# with comment_at_end
block_line_arg                             spaces_before,spaces_after
line_arg                                   spaces_before,spaces_after
following_arg
# similar to def_line_arg, but for user-defined linemacro calls.  Also
# similar to line_arg, but not delimited by commas.
linemacro_arg                              spaces_before,spaces_after

rawline_text                               text

menu_entry
menu_entry_leading_text                    text
menu_entry_name
menu_entry_separator                       text
menu_entry_node
menu_entry_description
menu_comment

# Used internally
internal_menu_star                         text
# right after a line command or block command
internal_spaces_after_command              text,leading_space
# after opening brace or comma
internal_spaces_before_argument            text,leading_space
internal_spaces_before_context_argument    text,leading_space
# on @*index commands line before brace specific @-command
internal_spaces_before_brace_in_index      text

macro_line                                 text

# structure of block commands
before_item
table_entry
table_term
table_definition
inter_item
def_line                              spaces_before
def_item
inter_def_item
before_defline
multitable_head
multitable_body
row

balanced_braces
bracketed_arg                         spaces_before,spaces_after

# container of definition line argument content
def_line_arg
# A special case, as in general it should not be recursed into,
# instead the text within should be translated
untranslated_def_line_arg

# definition line direct arguments containers.  Contains bracketed_arg
# and *def_line_arg.
def_category
def_class
def_type
def_name
def_typearg
def_arg

# text for def commands, definition line direct arguments
delimiter                                 text
spaces                                    text
# type of text element inserted in untranslated_def_line_arg
untranslated                              text

# for unexpanded parts of conditionals
elided_rawpreformatted
elided_brace_command_arg

# for macro expansion source marks
macro_call                                braces,with_command
rmacro_call                               braces,with_command
macro_call_line                           spaces_before,with_command
rmacro_call_line                          spaces_before,with_command
linemacro_call                            spaces_before,with_command

# macro and linemacro (if not bracketed) call arguments texts
macro_call_arg_text                       text
bracketed_linemacro_arg                    text

# virtual type not corresponding to a specific element in tree, but
# used for all the elements that hold text, typically in converters.
text

# for HTML converter
_converted                                text

# not in parser, for virtual element associated to special output units
special_unit_element

