Function tagua_parser::parse [] [src]

pub fn parse(input: &[u8]) -> Expression

Complete parsing of a datum starting by the sentence symbol of the grammar.

The grammar is a set of rules. By definition, it has a sentence symbol, also called the root rule. The parse function will lex, parse and produce the associated AST of the input datum.

Examples

use tagua_parser as parser;

let expression = b"1+2";
parser::parse(&expression[..]);Run