Stropping
From Wikipedia, the free encyclopedia
When applied to computer languages, stropping refers to the method used to categorise letter sequences as having a special property (most often being a keyword). For instance, some implementations of Algol 68 treat letter sequences prefixed by a single quote, ', as being keywords (e.g., 'BEGIN
), whereas Algol 60 commonly used quotes around the word (e.g. 'BEGIN'
or ‘BEGIN’
). In fact it was often the case that several stropping conventions might be in use within the one language, and sometimes even within the one compiler. The Atlas Autocode compiler had the choice of three: keywords could be underlined
using backspace and overstrike on a Flexowriter keyboard, or they could be introduced by a %percent %symbol
, or they could be typed in UPPER CASE
with no delimiting character (in which case all variables had to be in lower case).
The use of stropping allows the same letter sequence to be used both as a keyword and as an identifier. Many programming languages reserve some letter sequences to be exclusively used as keywords (e.g., Pascal, C) and thus have no use for stropping. As well as increasing the set of identifiers available, stropping allowed for a much more efficient lexical pre-pass (commonly called 'line reconstruction') before compiling, virtually eliminating the need for a complex lexer such as Lex.