| |||
| Home > Via File Syntax > Syntax | |||
Via files must conform to the following syntax rules:
A via file is a text file containing a sequence of words. Each word in the text file is converted into an argument string and passed to the tool.
Words are separated by white space, or the end of a line, except in delimited strings. For example:
-split -ropi -- Treated as two words -split-ropi -- Treated as one word
The end of a line is treated as white space. For example:
-split -ropi
is equivalent to:
-split -ropi
Strings enclosed in quotation marks ("), or apostrophes (') are treated as a single word. Within a quoted word, an apostrophe is treated as an ordinary character. Within an apostrophe delimited word, quote is treated as an ordinary character.
Quotation marks are used to delimit filenames or pathnames that contain spaces. For example:
-libpath c:\Program Files\ARM -- Three words -libpath "c:\Program Files\ARM" -- Two words
Apostrophes can be used to delimit words that contain quotes. For example:
-DNAME='"ARM RealView Compilation Tools for BREW"' -- One word
Characters enclosed in parentheses are treated as a single word. For example:
-option(x, y, z) -- One word -option (x, y, z) -- Two words
Within quoted or apostrophe delimited strings, you can use a backslash (\) character to escape the quote, apostrophe, and backslash characters.
A word that occurs immediately next to a delimited word is treated as a single word. For example:
-I"C:\Program Files\ARM"
is treated as the single word:
-IC:\Program Files\ARM
Lines beginning with a semicolon (;) or a hash (#) character as the first non-whitespace character are comment lines. If a semicolon or hash character appears anywhere else in line, it is not treated as the start of a comment. For example:
-o objectname.axf ;this is not a comment
A comment ends at the end of a line, or at the end of the file. There are no multi-line comments, and there are no part-line comments.
Lines that include the preprocessor option -Dsymbol=”value” must
be delimited with a single quote, either as ‘-D
or as symbol=”value”’-Dsymbol=’”value”’. For example:
-c -DFOO_VALUE=’”FOO_VALUE”’