Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rrevenantt/antlr4rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: dyn-tracing/antlr4rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Jul 12, 2021

  1. Copy the full SHA
    ae30211 View commit details
Showing with 4 additions and 9 deletions.
  1. +2 −7 build.rs
  2. +1 −0 src/atn_config_set.rs
  3. +1 −2 src/lib.rs
9 changes: 2 additions & 7 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
use std::convert::TryInto;
use std::env;
use std::env::VarError;
use std::error::Error;
use std::fs::{read_dir, DirEntry, File};
use std::io::Write;
use std::path::Path;
use std::process::Command;

fn main() {
@@ -33,14 +28,14 @@ fn gen_for_grammar(
grammar_file_name: &str,
antlr_path: &str,
additional_arg: Option<&str>,
) -> Result<(), Box<Error>> {
) -> Result<(), Box<dyn Error>> {
// let out_dir = env::var("OUT_DIR").unwrap();
// let dest_path = Path::new(&out_dir);

let input = env::current_dir().unwrap().join("grammars");
let file_name = grammar_file_name.to_owned() + ".g4";

let c = Command::new("java")
let _c = Command::new("java")
.current_dir(input)
.arg("-cp")
.arg(antlr_path)
1 change: 1 addition & 0 deletions src/atn_config_set.rs
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ use crate::parser_atn_simulator::MergeCache;
use crate::prediction_context::{MurmurHasherBuilder, PredictionContext};
use crate::semantic_context::SemanticContext;

#[allow(dead_code)]
pub struct ATNConfigSet {
cached_hash: u64,

3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![crate_type = "lib"]
#![feature(try_blocks)]
//#![feature(nll)]
#![feature(raw)]
#![feature(is_sorted)]
#![feature(cell_update)]
#![feature(get_mut_unchecked)]
@@ -13,7 +12,7 @@
// #![feature(generic_associated_types)]
#![warn(rust_2018_idioms)]
#![warn(missing_docs)] // warn if there is missing docs
#![warn(missing_debug_implementations)]
//#![warn(missing_debug_implementations)] there are missing debugs
#![warn(trivial_numeric_casts)]
#![allow(incomplete_features)]