-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not building anymore on new versions #46
Comments
I'm pretty new to rust, but from what I can tell the syntax |
You should use branch v0.3 https://github.com/rrevenantt/antlr4rust/tree/v0.3 with rust stable toolchain. |
ooh that's really good to know! I didn't even realize that branch existed, maybe it'd be good to put a notice in the README |
I agree but the main maintainer is unfortunatly unresponsive but has done a tremondous job to get that far. Branch v0.3 is in a very good shape (https://github.com/newca12/the-definitive-antlr4-reference-rs) and would deserve to be released as is. This branch also solve all the complaints about visitor not returning data (https://github.com/newca12/playground-rs/tree/main/antlr-calc). This mean that more than half of the issues could be closed. antlr4rust is probably one of the most underrated Rust project because of this. Great thanks to the maintainer for what has been done anyway. |
Absolutely agreed, this is fantastic work! And I hope it does get merged at some point, tho if @rrevenantt is actually gone that seems unlikely to happen. It's a real shame too, since in the meantime the README could really use a few pointers on how to get this to work. I hope it's ok if I write down the steps I took migrating my project to use v0.3:
Just putting that here in case someone even less knowledgeable than me stumbles over this issue. If you got more experience, feel free to roast my workflow. |
A more straightforward way (but require at least git 2..22) : |
Hi, sorry for the delay with v0.3, recent world events seriously baffled me so i needed some time to adapt to the situation. I will be able get back to working on this project during upcoming weekend. |
Repo needs an update
Compiling antlr-rust v0.2.2 (/home/raja/work/rust/antlr4rust)
error[E0557]: feature has been removed
--> src/lib.rs:11:12
|
11 | #![feature(crate_visibility_modifier)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^ feature has been removed
|
= note: removed in favor of
pub(crate)
error: expected one of
!
or::
, found keywordfn
--> src/atn.rs:58:11
|
57 | impl ATN {
| - while parsing this item list starting here
58 | crate fn new_atn(grammar_type: ATNType, max_token_type: isize) -> ATN {
| ^^ expected one of
!
or::
...
175 | }
| - the item list ends here
error: expected one of
!
or::
, found keywordstruct
--> src/lexer.rs:113:7
|
113 | crate struct LexerPosition {
| ^^^^^^ expected one of
!
or::
error[E0432]: unresolved imports
lexer::BaseLexer
,lexer::Lexer
--> src/lib.rs:104:17
|
104 | pub use lexer::{BaseLexer, Lexer};
| ^^^^^^^^^ ^^^^^ no
Lexer
inlexer
| |
| no
BaseLexer
inlexer
error[E0432]: unresolved import
crate::lexer::Lexer
--> src/lexer_action.rs:3:5
|
3 | use crate::lexer::Lexer;
| ^^^^^^^^^^^^^^^^^^^ no
Lexer
inlexer
error[E0432]: unresolved imports
crate::lexer::LEXER_MAX_CHAR_VALUE
,crate::lexer::LEXER_MIN_CHAR_VALUE
--> src/transition.rs:7:20
|
7 | use crate::lexer::{LEXER_MAX_CHAR_VALUE, LEXER_MIN_CHAR_VALUE};
| ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ no
LEXER_MIN_CHAR_VALUE
inlexer
| |
| no
LEXER_MAX_CHAR_VALUE
inlexer
error[E0432]: unresolved import
crate::lexer::Lexer
--> src/lexer_action_executor.rs:6:5
|
6 | use crate::lexer::Lexer;
| ^^^^^^^^^^^^^^^^^^^ no
Lexer
inlexer
error[E0432]: unresolved imports
crate::lexer::Lexer
,crate::lexer::LexerPosition
,crate::lexer::LEXER_MAX_CHAR_VALUE
,crate::lexer::LEXER_MIN_CHAR_VALUE
--> src/lexer_atn_simulator.rs:21:20
|
21 | use crate::lexer::{Lexer, LexerPosition, LEXER_MAX_CHAR_VALUE, LEXER_MIN_CHAR_VALUE};
| ^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ no
LEXER_MIN_CHAR_VALUE
inlexer
| | | |
| | | no
LEXER_MAX_CHAR_VALUE
inlexer
| | no
LexerPosition
inlexer
| no
Lexer
inlexer
warning: unused attribute
allow
--> src/token_factory.rs:17:1
|
17 | #[allow(non_upper_case_globals)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note:
#[warn(unused_attributes)]
on by defaultnote: the built-in attribute
allow
will be ignored, since it's applied to the macro invocationlazy_static
--> src/token_factory.rs:18:1
|
18 | lazy_static! {
| ^^^^^^^^^^^
warning: unused import:
crate::dfa::ScopeExt
--> src/atn.rs:6:5
|
6 | use crate::dfa::ScopeExt;
| ^^^^^^^^^^^^^^^^^^^^
|
= note:
#[warn(unused_imports)]
on by defaultwarning: unused import:
crate::interval_set::IntervalSet
--> src/atn.rs:7:5
|
7 | use crate::interval_set::IntervalSet;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import:
crate::ll1_analyzer::LL1Analyzer
--> src/atn.rs:9:5
|
9 | use crate::ll1_analyzer::LL1Analyzer;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import:
crate::parser::ParserNodeType
--> src/atn.rs:10:5
|
10 | use crate::parser::ParserNodeType;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import:
crate::rule_context::EmptyContextType
--> src/atn.rs:11:5
|
11 | use crate::rule_context::EmptyContextType;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused imports:
TOKEN_EOF
,TOKEN_EPSILON
--> src/atn.rs:12:20
|
12 | use crate::token::{TOKEN_EOF, TOKEN_EPSILON};
| ^^^^^^^^^ ^^^^^^^^^^^^^
warning: unused import:
crate::token_factory::CommonTokenFactory
--> src/atn.rs:13:5
|
13 | use crate::token_factory::CommonTokenFactory;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import:
crate::transition::RuleTransition
--> src/atn.rs:14:5
|
14 | use crate::transition::RuleTransition;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Some errors have detailed explanations: E0432, E0557.
For more information about an error, try
rustc --explain E0432
.warning:
antlr-rust
(lib) generated 9 warningserror: could not compile
antlr-rust
due to 8 previous errors; 9 warnings emittedThe text was updated successfully, but these errors were encountered: