Next: , Previous: Syntax of an Atom-Selection, Up: Atom Selection


11.7.2 Interpretation of Atom Selection Tokens

The selection parser operates like a Hewlett-Packard calculator, performing its operations using Reverse Polish notation using an internal stack. Tokens are parsed and performed from left to right. Operations that select atoms based on the structure simply turn on the flags for the atoms selected; the stack manipulation operators can combine this flags in arbitrary ways. When the selection string is completed, the top of the stack is returned as the selection.

All of the tokens followed by a * are interpreted using wildcard characters as follows:

*
matches any string of characters (including none)
%
matches any single character
#
matches any string of digits (including none)
+
matches any single digit