@@ -522,7 +522,7 @@ where
522522 /// the return type of the `%start` rule;
523523 /// * or, if the `yacckind` was set to
524524 /// `YaccKind::Original(YaccOriginalActionKind::GenericParseTree)`, it
525- /// is [`crate ::Node<StorageT>`].
525+ /// is [`modname ::Node<StorageT>`].
526526 ///
527527 /// # Panics
528528 ///
@@ -897,7 +897,6 @@ where
897897 since = "0.11.0" ,
898898 note = "Please use grammar_path(), output_path(), build(), and token_map() instead"
899899 ) ]
900- #[ allow( deprecated) ]
901900 pub fn process_file < P , Q > (
902901 & mut self ,
903902 inp : P ,
@@ -958,6 +957,21 @@ where
958957 | YaccKind :: Original ( YaccOriginalActionKind :: GenericParseTree ) => None ,
959958 _ => unreachable ! ( ) ,
960959 } ;
960+
961+ let additional_decls =
962+ if let Some ( YaccKind :: Original ( YaccOriginalActionKind :: GenericParseTree ) ) =
963+ self . yacckind
964+ {
965+ // `lrpar::Node`` is deprecated within the lrpar crate, but not from within this module,
966+ // Once it is removed from `lrpar`, we should move the declaration here entirely.
967+ Some ( quote ! {
968+ #[ allow( unused_imports) ]
969+ pub use :: lrpar:: parser:: _deprecated_moved_:: Node ;
970+ } )
971+ } else {
972+ None
973+ } ;
974+
961975 let mod_name = format_ident ! ( "{}" , mod_name) ;
962976 let out_tokens = quote ! {
963977 #visibility mod #mod_name {
@@ -969,6 +983,7 @@ where
969983 #![ deny( unsafe_code) ]
970984 #[ allow( unused_imports) ]
971985 use super :: * ;
986+ #additional_decls
972987 #parse_function
973988 #rule_consts
974989 #token_epp
@@ -1069,14 +1084,18 @@ where
10691084 quote ! {
10701085 :: lrpar:: RTParserBuilder :: new( & grm, & stable)
10711086 . recoverer( #recoverer)
1072- . parse_generictree( lexer)
1087+ . parse_map(
1088+ lexer,
1089+ & |lexeme| Node :: Term { lexeme} ,
1090+ & |ridx, nodes| Node :: Nonterm { ridx, nodes}
1091+ )
10731092 }
10741093 }
10751094 YaccKind :: Original ( YaccOriginalActionKind :: NoAction ) => {
10761095 quote ! {
10771096 :: lrpar:: RTParserBuilder :: new( & grm, & stable)
10781097 . recoverer( #recoverer)
1079- . parse_noaction ( lexer)
1098+ . parse_map ( lexer, & |_| ( ) , & |_ , _| ( ) ) . 1
10801099 }
10811100 }
10821101 YaccKind :: Original ( YaccOriginalActionKind :: UserAction ) | YaccKind :: Grmtools => {
@@ -1160,7 +1179,7 @@ where
11601179 }
11611180 }
11621181 YaccKind :: Original ( YaccOriginalActionKind :: GenericParseTree ) => quote ! {
1163- ( :: std:: option:: Option <:: lrpar :: Node <<#lexertypest as :: lrpar:: LexerTypes >:: LexemeT , #storaget>>,
1182+ ( :: std:: option:: Option <crate :: Node <<#lexertypest as :: lrpar:: LexerTypes >:: LexemeT , #storaget>>,
11641183 :: std:: vec:: Vec <:: lrpar:: LexParseError <#storaget, #lexertypest>>)
11651184 } ,
11661185 YaccKind :: Original ( YaccOriginalActionKind :: NoAction ) => quote ! {
0 commit comments