-
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
Generated lexer depends on Java function: self.IsNewlineAtPos(-1) #60
Comments
⬆️ Actually, there are more errors in case of successful generation
|
You need to change grammar to use 'recog' instead of 'self' in predicates as mentioned in readme https://github.com/rrevenantt/antlr4rust#differences-with-java |
@rrevenantt Thank you so much! I'll try and report if succesful |
@rrevenantt Your solution does partly solve my problems, however the functions
Are still absent from the methods of The errors are as follows
And such (23 similar errors - method not found) |
I'm trying to add the missing methods via an extension trait: pub trait BaseLexerAdopt {
fn IsNewLineAtPos(&self, pos: isize) -> bool;
}
impl<'input, Input: CharStream<From<'input>>> BaseLexerAdopt for BaseLexer<'input, PlSqlLexerActions, Input, LocalTokenFactory<'input>> {
fn IsNewLineAtPos(&self, pos: isize) -> bool {
let la = self.input.map(|input| input.la(pos));
la.map(|la| la == -1 || la == '\n').unwrap_or(false)
}
} please tell me if that'd suffice a temporary patch |
Hello. I've tried to build the official antlr4 gramamr for
sql/plsql
which gives a successful build but fails on compleI've used the release for 0.3-beta generator tool:
The Rust compiler errors are
The text was updated successfully, but these errors were encountered: