## General Grammar for Description Files

For a detailed description, see Grammar for Link Descriptions, Grammar for Compilation Descriptions, and Grammar for Processing Lists.

### Syntax

<debug_opt> = debug | d

<digit> = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

<letter> = A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | r | u | v | w | x | y | z

<new_line> = explicit line break

<profile_opt> = profile | p

<sign> = + | -

<tabulator> =tab

<vmake_default> = f | q | s

<vmake_version> = f | q | s

<extended_letter> = all other printable characters

<character> = <digit> | <letter> | <extended_ letter>

<identifier> = <token>

<space> = [<space>] | [<space>]<tabulator>

<token_sep> = {<token_sep>}<space>

<token> = <character>{<character>}

<list> = [<list>,],{<character>}<token_sep>

<ext_list> = [<ext_list>,],[<sign>]{<character>}<token_sep>

<comment> = [<comment><token_sep>]<token>

<compile_option> = <extended_letter><token>

<demand_spec> = demand[{<layer>{<layer>}}]

<dep_list> = (obj | inc | dep | <demand spec>)=(<list> | <ext_list> | EMPTY)

<expr> = <character>{<character>} | (<expr>) | not<space><expr> | ![<space>]<expr> | <expr><space>[(not | !)<space> ]in<space>[[<space>]<expr>{[<space>] ,[<space>]<expr>}[<space>]] | <expr>=[=]<expr> | <expr>!=<expr> | <expr>&&<expr> | <expr>||<expr>

<layer> = <letter><letter>{<letter>}

<mf_option> = <token>[=<value>]

<option> = [<option><token_sep>](<dep_list> | <mf_option> | <compile_option> | <target_option>)

<option_block> = ([f | [q | [s) <option> {<option>} (f] | q] | s])

<ext_option> = <option_block> | <option> | EMPTY

<target_option> = uncond | remake | <debug opt> | binary | ascii | exec | definition | interface | <profile opt> | shrglob | noshrglob | noobjcopy | (<vmake_version>[<vmake_default>]) | -><token> | <ext_target_option> | <ext_target_option_list> | nobind | noversion | nocomfile

<ext_target_option> = ?<token_sep>(default_layer | default_version | require | -><token> | propagate | parentlinkoption)<token_sep>(: | ([<character>]))<token_sep><token>

<ext_target_option_list> = ?<token_sep>(output | link_with | link_option | tool_option)<token_sep>(: | ([<character>]))<token_sep><token>{<token_sep>,<token_sep><token>}

<ext_target_option_line> = (<ext_target_option> | <ext_target_option_list>) <new_line>

<value> = <character>{<character>}

<def line> = &define | &undef <identifier> [<value>]<new_line>

<comment_line> = #<comment><new_line>

<block> = <instance_block> | <sub_block>

<instance_block> = (<instance_block_start>{<sub_block>}<instance_block_end>) | EMPTY

<instance_block_start> = (&fast | &slow) <comment><new_line>

<instance_block_end> = (&endfast | &endslow) <comment><new_line>

<sub_block> = {<line>} | <sub_block_start>{<line>}<sub_block_end>

<sub_block_start> = &if <expr>{<space>}<new_line> | &ifdef | &ifndef | &ifvar | &ifnvar) <identifier>{<space>}<new_line>

<sub_block_end> = &endif <comment><new_line> | &else <comment><new_line> | &elif <comment><new_line>

<line> = Line

#### General Rules

· <token> can contain a maximum of 512 characters

· <token> must not contain a <space>

· If <instance_block_start> contains the string &xxx, <instance_block_stop> must contain the character string &endxxx.

· If the <option_block>expression starts with [x , it must end with x].

· In <mf_option>, <token> must start with <letter> or <character>.