Group Attributes

Overview

Group Attributes
Attribute Valid Values
Nesting All / None / Self / { ... }
Advance Token / Character
Ending Open / Closed

Details

Nesting

Any group can allow groups to be nested with it.

This sets what groups can be nested within it. The user can also specify a set of group names using a braced-list.  This defaults to None.

Advance

This sets whether the lexical group will advance on each token or character. The default is Character.

Ending

This attribute determines if the group is open-ended or closed. If the group is closed, the end token is consumed when the group is complete. Otherwise, it is left in the queue. Block groups default to 'closed'. Line groups default to 'open' to leave the newline for languages that need it as part of their syntax.

Examples

Example 1

The following example declares Comment Start and Comment End. The group is set to Unnested and Character.

Comment Start   = '*/'
Comment End     = '/*'

Comment Block @= { Nesting = All, Advance = Character }