Skip to content

Commit f1a60e1

Browse files
Merge pull request RustPython#769 from RustPython/coolreader18/lalrpop-process-out_dir
Process lalrpop in cargo's target directory
2 parents cb0b6a8 + 60ad548 commit f1a60e1

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

parser/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

parser/build.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
use lalrpop;
22

33
fn main() {
4-
lalrpop::Configuration::new()
5-
.generate_in_source_tree()
6-
.process()
7-
.unwrap();
4+
lalrpop::process_root().unwrap()
85
}

parser/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#[macro_use]
22
extern crate log;
3+
use lalrpop_util::lalrpop_mod;
34

45
pub mod ast;
56
pub mod error;
67
mod fstring;
78
pub mod lexer;
89
pub mod parser;
9-
#[cfg_attr(rustfmt, rustfmt_skip)]
10-
mod python;
10+
lalrpop_mod!(
11+
#[allow(clippy::all)]
12+
python
13+
);
1114
pub mod token;

parser/src/python.lalrpop

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// See also: https://github.com/antlr/grammars-v4/blob/master/python3/Python3.g4
33
// See also: file:///usr/share/doc/python/html/reference/compound_stmts.html#function-definitions
44
// See also: https://greentreesnakes.readthedocs.io/en/latest/nodes.html#keyword
5-
#![allow(unknown_lints,clippy)]
65

76
use std::iter::FromIterator;
87

0 commit comments

Comments
 (0)