Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Understanding Backus Nauer Form (BNF) Syntax

The scripts used by the ATL Registrar are described in this topic using BNF syntax, which uses the notation shown in the following table.

Convention/symbol

Meaning

::=

Equivalent

|

OR

X+

One or more Xs.

[X]

X is optional. Optional delimiters are denoted by [].

Any bold text

A string literal.

Any italicized text

How to construct the string literal.

As indicated in the preceding table, registrar scripts use string literals. These values are actual text that must appear in your script. The following table describes the string literals used in an ATL Registrar script.

String literal

Action

ForceRemove

Completely removes the next key (if it exists) and then re-creates it.

NoRemove

Does not remove the next key during Unregister.

val

Specifies that <Key Name> is actually a named value.

Delete

Deletes the next key during Register.

s

Specifies that the next value is a string (REG_SZ).

d

Specifies that the next value is a DWORD (REG_DWORD).

m

Specifies that the next value is a multistring (REG_MULTI_SZ).

b

Specifies that the next value is a binary value (REG_BINARY).

Here are a few syntax examples to help you understand how the notation and string literals work in an ATL Registrar script.

<registry expression> ::= <Add Key>

specifies that registry expression is equivalent to Add Key.

<registry expression> ::= <Add Key> | <Delete Key>

specifies that registry expression is equivalent to either Add Key or Delete Key.

<Key Name> ::= '<AlphaNumeric>+'

specifies that Key Name is equivalent to one or more AlphaNumerics.

<Add Key> ::= [ForceRemove | NoRemove | val]<Key Name>

specifies that Add Key is equivalent to Key Name, and that the string literals, ForceRemove, NoRemove, and val, are optional.

<AlphaNumeric> ::= any character not NULL, that is, ASCII 0

specifies that AlphaNumeric is equivalent to any non-NULL character.

val 'testmulti' = m 'String 1\0String 2\0'

specifies that the key name testmulti is a multistring value composed of String 1 and String 2.

val 'testhex' = d '&H55'

specifies that the key name testhex is a DWORD value set to hexadecimal 55 (decimal 85). Note this format adheres to the &H notation as found in the Visual Basic specification.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.