Next: , Previous: Syntactic classes, Up: Symbols

6.2 Symbol aliases

Yet another use for the --symbol option is to define symbol aliases. An alias is a token that behaves exactly as the symbol it refers to. Alias is declared using the following construct:

     --symbol newsym:=oldsym

As a result of this option, the symbol newsym is declared to be the equivalent of oldsym.

Symbol aliasing can be regarded as defining the symbol class by example of another symbol. It is useful for some special keywords, such as ‘__restrict’:

     --symbol __restrict:=restrict