Use pub in rustpeg code

pull/10/head
Tpt 6 years ago
parent da78cf5dff
commit f924821c79
  1. 3
      src/rio/ntriples/ntriples_grammar.rustpeg
  2. 3
      src/rio/turtle/turtle_grammar.rustpeg
  3. 3
      src/sparql/sparql_grammar.rustpeg

@ -9,8 +9,7 @@ use std::collections::BTreeMap;
#![arguments(bnodes_map: &mut BTreeMap<String, BlankNode>)] #![arguments(bnodes_map: &mut BTreeMap<String, BlankNode>)]
//[2] //[2]
#[pub] pub triple -> Option<Triple> =
triple -> Option<Triple> =
_ s:subject _ p:predicate _ o:object _ "." _ comment? EOL? { Some(Triple::new(s, p, o)) } / _ s:subject _ p:predicate _ o:object _ "." _ comment? EOL? { Some(Triple::new(s, p, o)) } /
_ comment? EOL? { None } _ comment? EOL? { None }

@ -8,8 +8,7 @@ use std::iter;
#![arguments(state: &mut ParserState, buffer: &mut Vec<Triple>)] #![arguments(state: &mut ParserState, buffer: &mut Vec<Triple>)]
//[1] //[1]
#[pub] pub turtleDoc -> () = _ (statement _)*
turtleDoc -> () = _ (statement _)*
//[2] //[2]
statement -> () = directive / triples "." statement -> () = directive / triples "."

@ -10,8 +10,7 @@ use std::str::FromStr;
//[1] //[1]
#[pub] pub QueryUnit -> Query = Query
QueryUnit -> Query = Query
//[2] //[2]
Query -> Query = _ Prologue _ q:(SelectQuery / ConstructQuery / DescribeQuery / AskQuery) _ { //TODO: ValuesClause Query -> Query = _ Prologue _ q:(SelectQuery / ConstructQuery / DescribeQuery / AskQuery) _ { //TODO: ValuesClause

Loading…
Cancel
Save