# Copyright 2010-2020 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 <http://www.gnu.org/licenses/>.

# this information is used to setup both the XS Parser commands
# builtin_command_data and the perl Parser commands classification
# hashes.

# Some documentation of the flags (second column) is in commands.h.

##############################################################
# Internal commands
# invalid if not accept_internalvalue set in configuration
txiinternalvalue        internal,brace                  INTERNAL_brace

# nobrace:
# commands never taking braces nor arguments on the line
#
# symbol: non-alphabetical one letter commands without braces.
# skipspace:   following spaces are skipped.
# other:       other.


##############################################################
# no brace commands - single letter commands

*                       nobrace                         NOBRACE_symbol
# space
\x20                    nobrace                         NOBRACE_symbol
\t                      nobrace                         NOBRACE_symbol
\n                      nobrace                         NOBRACE_symbol
-                       nobrace                         NOBRACE_symbol
|                       nobrace,in_heading_spec         NOBRACE_symbol
/                       nobrace                         NOBRACE_symbol
:                       nobrace                         NOBRACE_symbol
!                       nobrace                         NOBRACE_symbol
?                       nobrace                         NOBRACE_symbol
.                       nobrace                         NOBRACE_symbol
@                       nobrace                         NOBRACE_symbol
&                       nobrace                         NOBRACE_symbol
}                       nobrace                         NOBRACE_symbol
{                       nobrace                         NOBRACE_symbol
\\                      nobrace                         NOBRACE_symbol

##########################################################
#
# line commands
#
##########################################################

# commands taking a line as argument or no argument.
# index commands are added dynamically.
#
# The values signification is:
# special:     no value and macro expansion, all the line is used, and
#              analysed during parsing (_parse_special_misc_command)
# lineraw:     no value and macro expansion, the line is kept as-is, not
#              analysed
# skipline:    no argument, everything else on the line is skipped
# text:        the line is parsed as texinfo, and the argument is converted
#              to simple text (in _end_line)
# line:        the line is parsed as texinfo
# specific:    the line is parsed as texinfo and the result should be plain
#              text maybe followed by a comment; the result is analysed
#              during parsing (parse_line_command_args).
#
# Beware that @item may be a 'line' command or a 'nobrace' command
# depending on the context.

# line commands number of arguments is only set for LINE_specific commands
# and is not used anywhere in the code, it is here as documentation only
node                    line                            LINE_line
bye                     line                            LINE_skipline
end                     line                            LINE_text
# set, clear, special argument
set                     line                            LINE_special
clear                   line                            LINE_special
unmacro                 line                            LINE_special
# comments
c                       line                            LINE_lineraw
comment                 line                            LINE_lineraw
# special
definfoenclose          line,deprecated                 LINE_specific  3
alias                   line                            LINE_specific  2
# number of arguments is not known in advance.
columnfractions         line                            LINE_specific
# file names
setfilename             line,close_paragraph,global_unique   LINE_text
verbatiminclude         line,close_paragraph                 LINE_text
include                 line                                 LINE_text

raisesections           line                            LINE_skipline
lowersections           line                            LINE_skipline
contents                line,close_paragraph,global     LINE_skipline
shortcontents           line,close_paragraph,global     LINE_skipline
summarycontents         line,close_paragraph,global     LINE_skipline
insertcopying           line,close_paragraph,global     LINE_skipline
# arg should be an @-command
clickstyle              line,global                     LINE_special
# more relevant in preamble
documentencoding        line,global                     LINE_text
novalidate              line,global_unique              LINE_skipline
# Position with regard with direntry is significant
dircategory             line,close_paragraph            LINE_line
# arg like 200mm,150mm or 11.5in
pagesizes               line,global_unique              LINE_line
finalout                line                            LINE_skipline
# arg none asis
# or a number and forbids anything else on the line
paragraphindent         line,global                     LINE_specific  1
# arg none insert
firstparagraphindent    line,global                     LINE_specific  1
# arg on off
frenchspacing           line,global                     LINE_specific  1
# arg on off
codequoteundirected     line,global                     LINE_specific  1
# arg on off
codequotebacktick       line,global                     LINE_specific  1
# arg on off
xrefautomaticsectiontitle line,global                   LINE_specific  1
# arg on off
deftypefnnewline        line,global                     LINE_specific  1
# arg 10 11
fonttextsize            line,global_unique              LINE_specific  1
# arg false or true
allowcodebreaks         line,global                     LINE_specific  1
# arg asis or a number
exampleindent           line,global                     LINE_specific  1
# args end and separate, nothing else on the line
footnotestyle           line,global_unique              LINE_specific  1
# arg after|before|none
urefbreakstyle          line,global                     LINE_specific  1
smallbook               line,global_unique              LINE_skipline
afourpaper              line,global_unique              LINE_skipline
afivepaper              line,global_unique              LINE_skipline
afourlatex              line,global_unique              LINE_skipline
afourwide               line,global_unique              LINE_skipline
bsixpaper               line,global_unique              LINE_skipline
# arg off on single double singleafter doubleafter
# interacts with setchapternewpage
headings                line,global                     LINE_specific  1
# arg off on odd
setchapternewpage       line,global_unique              LINE_specific  1
# arg on off
microtype               line,global                     LINE_specific  1

everyheading            line,global,heading_spec        LINE_line
everyfooting            line,global,heading_spec        LINE_line
evenheading             line,global,heading_spec        LINE_line
evenfooting             line,global,heading_spec        LINE_line
oddheading              line,global,heading_spec        LINE_line
oddfooting              line,global,heading_spec        LINE_line

# args are index identifiers
syncodeindex            line                            LINE_specific  2
synindex                line                            LINE_specific  2
# one identifier arg
defindex                line                            LINE_specific  1
# one identifier arg
defcodeindex            line                            LINE_specific  1
# language code arg
documentlanguage        line,global                     LINE_text
# arg code example distinct
kbdinputstyle           line,global                     LINE_specific  1
# arg top bottom
everyheadingmarks       line,global_unique              LINE_specific  1
everyfootingmarks       line,global_unique              LINE_specific  1
evenheadingmarks        line,global_unique              LINE_specific  1
oddheadingmarks         line,global_unique              LINE_specific  1
evenfootingmarks        line,global_unique              LINE_specific  1
oddfootingmarks         line,global_unique              LINE_specific  1

# formatting
center                  line,close_paragraph            LINE_line
printindex              line,close_paragraph,global     LINE_specific  1
listoffloats            line,close_paragraph,global     LINE_line
# especially in titlepage
#  shorttitle
shorttitlepage          line,global_unique              LINE_line
settitle                line,global_unique              LINE_line
author                  line,global                     LINE_line
subtitle                line,global                     LINE_line
title                   line,global_unique              LINE_line
# numerical arg
sp                      line,close_paragraph            LINE_specific  1
page                    line,close_paragraph            LINE_skipline
# one numerical/real arg
need                    line,close_paragraph            LINE_specific  1

# not valid for info (should be in @iftex)
vskip                   line                            LINE_lineraw

exdent                  line,close_paragraph            LINE_line

# or nobrace skipspace, depending on the context
item_LINE               line,close_paragraph            LINE_line
itemx                   line,close_paragraph            LINE_line

subentry                line                            LINE_line

##########################################################
#
# no brace commands - miscellaneous commands
#
##########################################################

# formatting
noindent                nobrace                         NOBRACE_skipspace
indent                  nobrace                         NOBRACE_skipspace
headitem                nobrace,close_paragraph         NOBRACE_skipspace
item                    nobrace,close_paragraph         NOBRACE_skipspace
tab                     nobrace,close_paragraph         NOBRACE_skipspace
# only valid in heading or footing
thischapter             nobrace,in_heading_spec         NOBRACE_other
thischaptername         nobrace,in_heading_spec         NOBRACE_other
thischapternum          nobrace,in_heading_spec         NOBRACE_other
thissection             nobrace,in_heading_spec         NOBRACE_other
thissectionname         nobrace,in_heading_spec         NOBRACE_other
thissectionnum          nobrace,in_heading_spec         NOBRACE_other
thisfile                nobrace,in_heading_spec         NOBRACE_other
thispage                nobrace,in_heading_spec         NOBRACE_other
thistitle               nobrace,in_heading_spec         NOBRACE_other
# obsolete @-commands.
refill                  nobrace,deprecated              NOBRACE_other



##########################################################
#
# brace commands
#
##########################################################

# letter_no_arg_commands
aa                      brace,letter_no_arg             BRACE_noarg
AA                      brace,letter_no_arg             BRACE_noarg
ae                      brace,letter_no_arg             BRACE_noarg
oe                      brace,letter_no_arg             BRACE_noarg
AE                      brace,letter_no_arg             BRACE_noarg
OE                      brace,letter_no_arg             BRACE_noarg
o                       brace,letter_no_arg             BRACE_noarg
O                       brace,letter_no_arg             BRACE_noarg
ss                      brace,letter_no_arg             BRACE_noarg
l                       brace,letter_no_arg             BRACE_noarg
L                       brace,letter_no_arg             BRACE_noarg
DH                      brace,letter_no_arg             BRACE_noarg
dh                      brace,letter_no_arg             BRACE_noarg
TH                      brace,letter_no_arg             BRACE_noarg
th                      brace,letter_no_arg             BRACE_noarg

# no arg commands
TeX                     brace                           BRACE_noarg
LaTeX                   brace                           BRACE_noarg
bullet                  brace                           BRACE_noarg
copyright               brace                           BRACE_noarg
registeredsymbol        brace                           BRACE_noarg
dots                    brace                           BRACE_noarg
enddots                 brace                           BRACE_noarg
equiv                   brace                           BRACE_noarg
error                   brace                           BRACE_noarg
expansion               brace                           BRACE_noarg
arrow                   brace                           BRACE_noarg
minus                   brace                           BRACE_noarg
point                   brace                           BRACE_noarg
print                   brace                           BRACE_noarg
result                  brace                           BRACE_noarg
today                   brace                           BRACE_noarg
exclamdown              brace                           BRACE_noarg
questiondown            brace                           BRACE_noarg
pounds                  brace                           BRACE_noarg
ordf                    brace                           BRACE_noarg
ordm                    brace                           BRACE_noarg
atchar                  brace                           BRACE_noarg
ampchar                 brace                           BRACE_noarg
lbracechar              brace                           BRACE_noarg
rbracechar              brace                           BRACE_noarg
backslashchar           brace                           BRACE_noarg
hashchar                brace                           BRACE_noarg
comma                   brace                           BRACE_noarg
euro                    brace                           BRACE_noarg
geq                     brace                           BRACE_noarg
leq                     brace                           BRACE_noarg
tie                     brace                           BRACE_noarg
textdegree              brace                           BRACE_noarg
click                   brace                           BRACE_noarg
quotedblleft            brace                           BRACE_noarg
quotedblright           brace                           BRACE_noarg
quoteleft               brace                           BRACE_noarg
quoteright              brace                           BRACE_noarg
quotedblbase            brace                           BRACE_noarg
quotesinglbase          brace                           BRACE_noarg
guillemetleft           brace                           BRACE_noarg
guillemetright          brace                           BRACE_noarg
guillemotleft           brace                           BRACE_noarg
guillemotright          brace                           BRACE_noarg
guilsinglleft           brace                           BRACE_noarg
guilsinglright          brace                           BRACE_noarg

# accent commands - can be called with or without braces
\"                      brace,accent                    BRACE_accent
~                       brace,accent                    BRACE_accent
^                       brace,accent                    BRACE_accent
`                       brace,accent                    BRACE_accent
'                       brace,accent                    BRACE_accent
,                       brace,accent                    BRACE_accent
=                       brace,accent                    BRACE_accent
ringaccent              brace,accent                    BRACE_accent
H                       brace,accent                    BRACE_accent
dotaccent               brace,accent                    BRACE_accent
u                       brace,accent                    BRACE_accent
ubaraccent              brace,accent                    BRACE_accent
udotaccent              brace,accent                    BRACE_accent
v                       brace,accent                    BRACE_accent
ogonek                  brace,accent                    BRACE_accent
tieaccent               brace,accent                    BRACE_accent
dotless                 brace,accent                    BRACE_accent

# Style commands
asis                    brace                           BRACE_style_other
i                       brace                           BRACE_style_other
b                       brace                           BRACE_style_other
sansserif               brace                           BRACE_style_other
slanted                 brace                           BRACE_style_other
cite                    brace                           BRACE_style_other
clicksequence           brace                           BRACE_style_other
dfn                     brace                           BRACE_style_other
emph                    brace                           BRACE_style_other
sc                      brace                           BRACE_style_other
var                     brace                           BRACE_style_other
headitemfont            brace                           BRACE_style_other
strong                  brace                           BRACE_style_other
sub                     brace                           BRACE_style_other
sup                     brace                           BRACE_style_other

# code style commands
code                    brace                           BRACE_style_code
command                 brace                           BRACE_style_code
env                     brace                           BRACE_style_code
file                    brace                           BRACE_style_code
indicateurl             brace                           BRACE_style_code
kbd                     brace                           BRACE_style_code
key                     brace,contain_plain_text        BRACE_style_code
option                  brace                           BRACE_style_code
samp                    brace                           BRACE_style_code
t                       brace                           BRACE_style_code

# No code style commands
r                       brace                           BRACE_style_no_code

# in this category, the leading and trailing spaces are put in specific
# text with type, but commas do not delimitate arguments.
# As other arguments brace_commands, they can only contain simple text,
# ie not ref, footnote, titlefont, anchor, verb.
# Parsers have specific checks for U content.
U                       brace                           BRACE_arguments     1
hyphenation             brace,global,contain_plain_text BRACE_arguments     1
anchor                  brace                           BRACE_arguments     1
errormsg                brace                           BRACE_arguments     1
sortas                  brace,contain_plain_text        BRACE_arguments     1
seeentry                brace                           BRACE_arguments     1
seealso                 brace                           BRACE_arguments     1

# Leading and trailing spaces kept in main text.
# verb is treated especially, it should not matter much in which category it is.
# value also is treated especially.
value                   brace                           BRACE_special
verb                    brace                           BRACE_special
w                       brace,contain_simple_text       BRACE_special

# other brace commands, leading and trailing spaces kept in main text
dmn                     brace,contain_plain_text        BRACE_other         1
titlefont               brace,close_paragraph,global    BRACE_other         1

# context brace commands - commands that enclose full texts
# not in the main document context.  They can contain multiple paragraphs.
footnote                brace,global                    BRACE_context
caption                 brace,close_paragraph           BRACE_context
shortcaption            brace,close_paragraph           BRACE_context
# Commands that enclose math content, and, because of that, are not in the
# main document context.
math                    brace,math                      BRACE_context

# explained commands
abbr                    brace                           BRACE_arguments     2
acronym                 brace                           BRACE_arguments     2

# leading space is ignored in inline brace commands, not trailing space
# inline format command
inlineraw               brace                           BRACE_inline        2
inlinefmt               brace                           BRACE_inline        2
inlinefmtifelse         brace                           BRACE_inline        3

# inline conditional commands
inlineifclear           brace                           BRACE_inline        2
inlineifset             brace                           BRACE_inline        2

email                   brace                           BRACE_arguments     2

uref                    brace                           BRACE_arguments     3
url                     brace                           BRACE_arguments     3
inforef                 brace,ref,deprecated            BRACE_arguments     3

xref                    brace,ref                       BRACE_arguments     5
ref                     brace,ref                       BRACE_arguments     5
pxref                   brace,ref                       BRACE_arguments     5
image                   brace                           BRACE_arguments     5


##########################################################
# commands delimiting blocks, with an @end.

# def* commands
deffn                   block,def,close_paragraph       BLOCK_def
defvr                   block,def,close_paragraph       BLOCK_def
deftypefn               block,def,close_paragraph       BLOCK_def
deftypeop               block,def,close_paragraph       BLOCK_def
deftypevr               block,def,close_paragraph       BLOCK_def
defcv                   block,def,close_paragraph       BLOCK_def
deftypecv               block,def,close_paragraph       BLOCK_def
defop                   block,def,close_paragraph       BLOCK_def
deftp                   block,def,close_paragraph       BLOCK_def
#   shortcuts
defun                   block,def,def_alias,close_paragraph    BLOCK_def
defmac                  block,def,def_alias,close_paragraph    BLOCK_def
defspec                 block,def,def_alias,close_paragraph    BLOCK_def
defvar                  block,def,def_alias,close_paragraph    BLOCK_def
defopt                  block,def,def_alias,close_paragraph    BLOCK_def
deftypefun              block,def,def_alias,close_paragraph    BLOCK_def
deftypevar              block,def,def_alias,close_paragraph    BLOCK_def
defivar                 block,def,def_alias,close_paragraph    BLOCK_def
deftypeivar             block,def,def_alias,close_paragraph    BLOCK_def
defmethod               block,def,def_alias,close_paragraph    BLOCK_def
deftypemethod           block,def,def_alias,close_paragraph    BLOCK_def

# def*x
deffnx                  line,def,close_paragraph        LINE_line
defvrx                  line,def,close_paragraph        LINE_line
deftypefnx              line,def,close_paragraph        LINE_line
deftypeopx              line,def,close_paragraph        LINE_line
deftypevrx              line,def,close_paragraph        LINE_line
defcvx                  line,def,close_paragraph        LINE_line
deftypecvx              line,def,close_paragraph        LINE_line
defopx                  line,def,close_paragraph        LINE_line
deftpx                  line,def,close_paragraph        LINE_line
#   shortcuts
defunx                  line,def,def_alias,close_paragraph     LINE_line
defmacx                 line,def,def_alias,close_paragraph     LINE_line
defspecx                line,def,def_alias,close_paragraph     LINE_line
defvarx                 line,def,def_alias,close_paragraph     LINE_line
defoptx                 line,def,def_alias,close_paragraph     LINE_line
deftypefunx             line,def,def_alias,close_paragraph     LINE_line
deftypevarx             line,def,def_alias,close_paragraph     LINE_line
defivarx                line,def,def_alias,close_paragraph     LINE_line
deftypeivarx            line,def,def_alias,close_paragraph     LINE_line
defmethodx              line,def,def_alias,close_paragraph     LINE_line
deftypemethodx          line,def,def_alias,close_paragraph     LINE_line

multitable              block,close_paragraph,blockitem BLOCK_multitable

# menu commands in which menu entry and menu comments appear
menu                    block,close_paragraph           BLOCK_menu
detailmenu              block,close_paragraph,global    BLOCK_menu
direntry                block,close_paragraph           BLOCK_menu

# align commands
raggedright             block,close_paragraph
flushleft               block,close_paragraph
flushright              block,close_paragraph
indentedblock           block,close_paragraph
smallindentedblock      block,close_paragraph

cartouche               block,close_paragraph
group                   block,close_paragraph

# region commands
titlepage               block,close_paragraph,global_unique       BLOCK_region
copying                 block,close_paragraph,global_unique       BLOCK_region
documentdescription     block,close_paragraph,global_unique       BLOCK_region

# preformatted commands
example           block,close_paragraph,preformatted,preformatted_code,variadic   BLOCK_preformatted
smallexample      block,close_paragraph,preformatted,preformatted_code            BLOCK_preformatted
lisp              block,close_paragraph,preformatted,preformatted_code            BLOCK_preformatted
smalllisp         block,close_paragraph,preformatted,preformatted_code            BLOCK_preformatted
display           block,close_paragraph,preformatted      BLOCK_preformatted
smalldisplay      block,close_paragraph,preformatted      BLOCK_preformatted
format            block,close_paragraph,preformatted      BLOCK_preformatted
smallformat       block,close_paragraph,preformatted      BLOCK_preformatted

# format raw commands
html                    block                             BLOCK_format_raw
tex                     block                             BLOCK_format_raw
xml                     block                             BLOCK_format_raw
docbook                 block                             BLOCK_format_raw
latex                   block                             BLOCK_format_raw

# raw commands
verbatim                block,close_paragraph             BLOCK_raw
ignore                  block                             BLOCK_raw
macro                   block                             BLOCK_raw
rmacro                  block                             BLOCK_raw

table                   block,close_paragraph,blockitem   BLOCK_item_line       1
ftable                  block,close_paragraph,blockitem   BLOCK_item_line       1
vtable                  block,close_paragraph,blockitem   BLOCK_item_line       1
itemize                 block,close_paragraph,blockitem   BLOCK_item_container  1
enumerate               block,close_paragraph,blockitem   BLOCK_item_container  1
quotation               block,close_paragraph             BLOCK_quotation       1
smallquotation          block,close_paragraph             BLOCK_quotation       1

float                   block,close_paragraph             BLOCK_float           2

displaymath             block,close_paragraph,math        BLOCK_math

##################################################################
# Conditional commands
ifhtml                  block                           BLOCK_conditional
ifnothtml               block                           BLOCK_conditional
iftex                   block                           BLOCK_conditional
ifnottex                block                           BLOCK_conditional
ifxml                   block                           BLOCK_conditional
ifnotxml                block                           BLOCK_conditional
ifdocbook               block                           BLOCK_conditional
ifnotdocbook            block                           BLOCK_conditional
ifinfo                  block                           BLOCK_conditional
ifnotinfo               block                           BLOCK_conditional
ifplaintext             block                           BLOCK_conditional
ifnotplaintext          block                           BLOCK_conditional
iflatex                 block                           BLOCK_conditional
ifnotlatex              block                           BLOCK_conditional
ifset                   block                           BLOCK_conditional
ifclear                 block                           BLOCK_conditional
ifcommanddefined        block                           BLOCK_conditional
ifcommandnotdefined     block                           BLOCK_conditional

##########################################################
# Root commands
node                    line,root                                  LINE_line     4
top                     line,root,sectioning_heading,global_unique   LINE_line
chapter                 line,root,sectioning_heading               LINE_line
unnumbered              line,root,sectioning_heading               LINE_line
chapheading             line,sectioning_heading,close_paragraph    LINE_line
appendix                line,root,sectioning_heading               LINE_line
section                 line,root,sectioning_heading               LINE_line
unnumberedsec           line,root,sectioning_heading               LINE_line
heading                 line,sectioning_heading,close_paragraph    LINE_line
appendixsec             line,root,sectioning_heading               LINE_line
subsection              line,root,sectioning_heading               LINE_line
unnumberedsubsec        line,root,sectioning_heading               LINE_line
subheading              line,sectioning_heading,close_paragraph    LINE_line
appendixsubsec          line,root,sectioning_heading               LINE_line
subsubsection           line,root,sectioning_heading               LINE_line
unnumberedsubsubsec     line,root,sectioning_heading               LINE_line
subsubheading           line,sectioning_heading,close_paragraph    LINE_line
appendixsubsubsec       line,root,sectioning_heading               LINE_line

part                    line,root,sectioning_heading,global        LINE_line
appendixsection         line,root,sectioning_heading               LINE_line
majorheading            line,sectioning_heading,close_paragraph    LINE_line
centerchap              line,root,sectioning_heading,deprecated    LINE_line

