PCL (Parser Configuration Language)
Introduction
PCL is a language designed to extract data from a line of text by describing its structure. The language aims to use a concise and intuitive syntax to help visualize the structure of a line of text.
PCL expressions are used to configure the Parser Action.
Syntax basics
A valid PCL expression must be composed of one or more fields, as long as there are separators between them. That is, it must follow this rule:
delimiter? fixedLength* field(delimiter fixedLength* field)* delimiter?Where a delimiter could be a literal or an operator. This last one could optionally have surrounding literals.
When using groups, the PCL behaviour can change, as groups are a special type of field that can be written next to other fields without a delimiter. Check the Group section below to learn more about this.
At the moment, the only possible fixed-length field is a string.
Valid example
{myFieldOne:string} {myFieldTwo:int}<while(value=" ")>{myCsv:csv(fields=[0,2],separator=",")} Invalid example (no delimiters)
{myFieldOne:string}{myFieldTwo:int}The grammar supports any kind of name that is written with the set of characters A-Z, a-z, 0-9 and the symbol underscore (_). It supports field aliases with any name written with the set of characters A-Z, a-z, 0-9, _, -, # and . (given that the first character is not _).
Syntax fields
In PCL, we can write any sequence of fields. The type of fields can be the following:
Syntax literals
A literal is a special type of element. This is a string that must exist between two fields. Unlike other fields, the literals are just a string that may contain one or more characters except <, >, {, or }, unless they are escaped with \
This is an example of a literal (whitespace ):
Syntax operators
There are two types of operators:
Field options
Examples
Last updated
Was this helpful?

