specify: Specify a grammar term including test cases

View source: R/parser-utils.R

specifyR Documentation

Specify a grammar term including test cases

Description

Specify a grammar term including test cases

Usage

specify(query, testcases, success = NULL, leftovers = NULL)

Arguments

query

The Ramble parser to define

testcases

The testcases to run through the parser, a list of strings

leftovers

The expected leftovers, or NULL if the parsing should fail

Value

The parser.

The function exits with an error if a test fails. If you specify any NULL results, leftovers needs to be a list, not vector!


meowcat/SpectraMapping documentation built on May 14, 2024, 6:30 p.m.