Comments (3)
That is correct. We found that ANTLR grammars are not worth it. They typically don't include relevant Whitespaces as they assume prior tokenization. If for some reason you need to use ANTLR grammars, you can use the importer from the old version (https://github.com/RUB-SysSec/nautilus/blob/master/antlr_parser/src/bin.rs), which turns the ANTL grammar in a .json grammar. The .json grammar can still be loaded.
from nautilus.
Along with this question, when I try to parse the grammar provided by ANTLR (https://github.com/antlr/grammars-v4/blob/master/smtlibv2/SMTLIBv2.g4),
I find that the antlr_parser provides error during translation,
thread 'main' panicked at 'u32 could not be converted to char', src/libcore/option.rs:1190:5
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/libunwind.rs:88
1: backtrace::backtrace::trace_unsynchronized
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:76
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:60
4: core::fmt::write
at src/libcore/fmt/mod.rs:1030
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1412
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:64
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:49
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:196
9: std::panicking::default_hook
at src/libstd/panicking.rs:210
10: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:473
11: std::panicking::continue_panic_fmt
at src/libstd/panicking.rs:380
12: rust_begin_unwind
at src/libstd/panicking.rs:307
13: core::panicking::panic_fmt
at src/libcore/panicking.rs:85
14: core::option::expect_failed
at src/libcore/option.rs:1190
15: core::option::Option<T>::expect
at /rustc/66bf391c3aabfc77f5f7139fc9e6944f995d574e/src/libcore/option.rs:345
16: antrl_parser::lib::AntlrParser::parse_regex
at antlr_parser/src/lib.rs:751
17: antrl_parser::lib::AntlrParser::parse_definition
at antlr_parser/src/lib.rs:430
18: antrl_parser::lib::AntlrParser::parse_antlr_grammar
at antlr_parser/src/lib.rs:108
19: antrl_parser::main
at antlr_parser/src/bin.rs:15
20: std::rt::lang_start::{{closure}}
at /rustc/66bf391c3aabfc77f5f7139fc9e6944f995d574e/src/libstd/rt.rs:64
21: std::rt::lang_start_internal::{{closure}}
at src/libstd/rt.rs:49
22: std::panicking::try::do_call
at src/libstd/panicking.rs:292
23: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:80
24: std::panicking::try
at src/libstd/panicking.rs:271
25: std::panic::catch_unwind
at src/libstd/panic.rs:394
26: std::rt::lang_start_internal
at src/libstd/rt.rs:48
27: std::rt::lang_start
at /rustc/66bf391c3aabfc77f5f7139fc9e6944f995d574e/src/libstd/rt.rs:64
28: main
29: __libc_start_main
30: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Is there any idea about this issue?
from nautilus.
I would guess that the problem is antlr_parser/src/lib.rs:751
. It seems like some regex in the ANTLR grammar file is not compatible with rusts regexes... You can probably ad line number information to the error manually to help you debug. I'm not really interested in supporting ANTLR parsing as it has many issues with tokens that get removed in the tokenization phase (e.g. whitespaces). I would recommend to create a similar grammar by hand.
from nautilus.
Related Issues (20)
- Large path gap in ChakraCore fuzz HOT 1
- Hangup in php fuzz HOT 4
- Cannot generate grammar caused by panic HOT 1
- shmem error when fuzzing solidity HOT 1
- Bug in regex_mutator unicode generation
- Error while compile and run test demo HOT 1
- `#![feature]` may not be used on the stable release channel
- regex_mutator always outputting empty strings HOT 2
- thread 'fuzzer_1' panicked at 'couldn't read child hello HOT 2
- does not compile with latest rust toolchains. HOT 12
- Cannot Compile Generator HOT 1
- Error while running the generator
- some errors while fuzzing HOT 5
- share memory config error HOT 1
- `regex_mutator::generate()` panics
- No path while fuzzing ChakraCore HOT 12
- Panicked while fuzzing HOT 7
- Regex mutator panics when producing u32 values above char::MAX
- Support for specifying binary protocols/formats
- Add weights to grammar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nautilus.