Skip to main content

parse

Function parse 

Source
pub fn parse(text: &str) -> Result<ScGraph, ParseError>
Expand description

Parse an SC IR text file into a graph.

This parser handles the subset of the text format needed for round-trip testing: sc.input, sc.output, sc.constant, sc.encode, sc.and, sc.popcount, and sc.dense_forward.

Complex ops (LifStep, Scale, Offset, DivConst) are parsed by recognizing the op name and extracting key-value parameters.