AnyOrder

AnyOrder[p1,p2,]

is a grammar rules pattern object that represents a sequence of elements matching p1, p2, in any order.

Details

Examples

open allclose all

Basic Examples  (2)

Extract elements of a string, which may appear in any order:

Deploy a grammar that allows phrases to appear in any order:

Apply the grammar:

Applications  (1)

Deploy a simple calculator that supports infix, Polish, and reverse Polish notation:

This calculator is not programmed to apply precedence to different operators:

Properties & Relations  (1)

In a grammar, FixedOrder requires a specific order and AnyOrder supports arbitrary order:

Here the input matches the order in the FixedOrder:

The input does not match the order in the FixedOrder:

Introduced in 2015
 (10.1)