The following grammar file>
`grammar Colloid;
identifier: Identifier;
// lexer
TERMINATOR : '\n';
TAB : '\t';
WS : [ \r\u000C]+ -> skip;
COMMENT : '/' .? '/' -> skip;
LINE_COMMENT : '//' ~[\r\n] -> skip;
//Identifier :
// 'a' .. 'z';
Identifier
: JavaLetter JavaLetterOrDigit*
;
fragment
JavaLetter
: [a-zA-Z$_] // these are the "java letters" below 0x7F
| // covers all characters above 0x7F which are not a surrogate
~[\u0000-\u007F\uD800-\uDBFF]
{Character.isJavaIdentifierStart(_input.LA(-1))}?
| // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
[\uD800-\uDBFF] [\uDC00-\uDFFF]
{Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}?
;
fragment
JavaLetterOrDigit
: [a-zA-Z0-9$_] // these are the "java letters or digits" below 0x7F
| // covers all characters above 0x7F which are not a surrogate
~[\u0000-\u007F\uD800-\uDBFF]
{Character.isJavaIdentifierPart(_input.LA(-1))}?
| // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
[\uD800-\uDBFF] [\uDC00-\uDFFF]
{Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}?
;`
Produces this Rust lexer:
`
// Generated from Colloid.g4 by ANTLR 4.8
#![allow(dead_code)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(unused_imports)]
use antlr_rust::atn::ATN;
use antlr_rust::char_stream::CharStream;
use antlr_rust::lexer::{BaseLexer, Lexer, LexerRecog};
use antlr_rust::atn_deserializer::ATNDeserializer;
use antlr_rust::dfa::DFA;
use antlr_rust::lexer_atn_simulator::{LexerATNSimulator, ILexerATNSimulator};
use antlr_rust::PredictionContextCache;
use antlr_rust::recognizer::{Recognizer,Actions};
use antlr_rust::error_listener::ErrorListener;
use antlr_rust::token_source::TokenSource;
use antlr_rust::common_token_factory::TokenFactory;
use antlr_rust::token::*;
use antlr_rust::rule_context::BaseRuleContext;
use antlr_rust::parser_rule_context::{ParserRuleContext,LexerContext,cast};
use antlr_rust::vocabulary::{Vocabulary,VocabularyImpl};
use std::sync::Arc;
use std::cell::RefCell;
use std::rc::Rc;
use std::ops::{Deref, DerefMut};
pub const TERMINATOR:isize=1;
pub const TAB:isize=2;
pub const WS:isize=3;
pub const COMMENT:isize=4;
pub const LINE_COMMENT:isize=5;
pub const Identifier:isize=6;
pub const channelNames: [&'static str;0+2] = [
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
];
pub const modeNames: [&'static str;1] = [
"DEFAULT_MODE"
];
pub const ruleNames: [&'static str;8] = [
"TERMINATOR", "TAB", "WS", "COMMENT", "LINE_COMMENT", "Identifier", "JavaLetter",
"JavaLetterOrDigit"
];
pub const _LITERAL_NAMES: [Option<&'static str>;3] = [
None, Some("'\n'"), Some("'\t'")
];
pub const _SYMBOLIC_NAMES: [Option<&'static str>;7] = [
None, Some("TERMINATOR"), Some("TAB"), Some("WS"), Some("COMMENT"), Some("LINE_COMMENT"),
Some("Identifier")
];
lazy_static!{
static ref _shared_context_cache: Arc<PredictionContextCache> = Arc::new(PredictionContextCache::new());
static ref VOCABULARY: Box<dyn Vocabulary> = Box::new(VocabularyImpl::new(_LITERAL_NAMES.iter(), _SYMBOLIC_NAMES.iter(), None));
}
pub struct ColloidLexer {
base: BaseLexer,
// static { RuntimeMetaData.checkVersion("4.8", RuntimeMetaData.VERSION); }
}
impl Deref for ColloidLexer{
type Target = BaseLexer;
fn deref(&self) -> &Self::Target {
&self.base
}
}
impl DerefMut for ColloidLexer{
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.base
}
}
impl ColloidLexer {
fn get_rule_names(&self) -> &'static [&'static str] {
&ruleNames
}
fn get_literal_names(&self) -> &[Option<&str>] {
&_LITERAL_NAMES
}
fn get_symbolic_names(&self) -> &[Option<&str>] {
&_SYMBOLIC_NAMES
}
fn add_error_listener(&mut self, _listener: Box<dyn ErrorListener>) {
self.base.add_error_listener(_listener);
}
fn remove_error_listeners(&mut self) {
self.base.remove_error_listeners()
}
fn get_grammar_file_name(&self) -> &'static str {
"ColloidLexer.g4"
}
pub fn new (input: Box<dyn CharStream>) -> Self {
antlr_rust::recognizer::check_version("0","1");
Self {
base: BaseLexer::new_base_lexer(
input,
LexerATNSimulator::new_lexer_atnsimulator(
_ATN.clone(),
_decision_to_DFA.clone(),
_shared_context_cache.clone(),
),
Box::new(ColloidLexerActions{})
)
}
}
}
pub struct ColloidLexerActions {
}
impl ColloidLexerActions{
}
impl LexerRecog for ColloidLexerActions{
}
impl Recognizer for ColloidLexerActions {}
impl Actions for ColloidLexerActions{
type Recog = BaseLexer;
fn sempred(localctx: &dyn ParserRuleContext, rule_index: isize, pred_index: isize,
recog:&mut ::Recog
) -> bool {
match rule_index {
6 =>
Self::JavaLetter_sempred(cast::<,LexerContext >(localctx), pred_index, recog),
7 =>
Self::JavaLetterOrDigit_sempred(cast::<,LexerContext >(_localctx), pred_index, recog),
_ => true
}
}
}
impl ColloidLexerActions{
fn JavaLetter_sempred(_localctx: &LexerContext, pred_index:isize,
recog:&mut <Self as Actions>::Recog
) -> bool {
match pred_index {
0=>{
Character.isJavaIdentifierStart(_input.LA(-1))
}
1=>{
Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
}
_ => true
}
}
fn JavaLetterOrDigit_sempred(_localctx: &LexerContext, pred_index:isize,
recog:&mut <Self as Actions>::Recog
) -> bool {
match pred_index {
2=>{
Character.isJavaIdentifierPart(_input.LA(-1))
}
3=>{
Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
}
_ => true
}
}
}
impl TokenSource for ColloidLexer {
fn next_token(&mut self) -> Box {
self.base.next_token()
}
fn get_line(&self) -> isize {
self.base.get_line()
}
fn get_char_position_in_line(&self) -> isize {
self.base.get_char_position_in_line()
}
fn get_input_stream(&mut self) -> &mut dyn CharStream {
self.base.get_input_stream()
}
fn get_source_name(&self) -> String {
self.base.get_source_name()
}
fn get_token_factory(&self) -> &dyn TokenFactory {
self.base.get_token_factory()
}
}
lazy_static! {
static ref _ATN: Arc<ATN> =
Arc::new(ATNDeserializer::new(None).deserialize(_serializedATN.chars()));
static ref _decision_to_DFA: Arc<Vec<DFA>> = {
let mut dfa = Vec::new();
let size = _ATN.decision_to_state.len();
for i in 0..size {
dfa.push(DFA::new(
_ATN.clone(),
_ATN.get_decision_state(i),
i as isize,
))
}
Arc::new(dfa)
};
}
const _serializedATN:&'static str =
"\x03\u{608b}\u{a72a}\u{8133}\u{b9ed}\u{417c}\u{3be7}\u{7786}\u{5964}\x02\
\x08\x4e\x08\x01\x04\x02\x09\x02\x04\x03\x09\x03\x04\x04\x09\x04\x04\x05\
\x09\x05\x04\x06\x09\x06\x04\x07\x09\x07\x04\x08\x09\x08\x04\x09\x09\x09\
\x03\x02\x03\x02\x03\x03\x03\x03\x03\x04\x06\x04\x19\x0a\x04\x0d\x04\x0e\
\x04\x1a\x03\x04\x03\x04\x03\x05\x03\x05\x03\x05\x03\x05\x07\x05\x23\x0a\
\x05\x0c\x05\x0e\x05\x26\x0b\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\
\x03\x06\x03\x06\x03\x06\x03\x06\x07\x06\x31\x0a\x06\x0c\x06\x0e\x06\x34\
\x0b\x06\x03\x06\x03\x06\x03\x07\x03\x07\x07\x07\x3a\x0a\x07\x0c\x07\x0e\
\x07\x3d\x0b\x07\x03\x08\x03\x08\x03\x08\x03\x08\x03\x08\x03\x08\x05\x08\
\x45\x0a\x08\x03\x09\x03\x09\x03\x09\x03\x09\x03\x09\x03\x09\x05\x09\x4d\
\x0a\x09\x03\x24\x02\x0a\x03\x03\x05\x04\x07\x05\x09\x06\x0b\x07\x0d\x08\
\x0f\x02\x11\x02\x03\x02\x09\x04\x02\x0e\x0f\x22\x22\x04\x02\x0c\x0c\x0f\
\x0f\x06\x02\x26\x26\x43\x5c\x61\x61\x63\x7c\x04\x02\x02\u{81}\u{10802}\
\u{10c01}\x03\x02\u{10802}\u{10c01}\x03\x02\u{10c02}\u{e001}\x07\x02\x26\
\x26\x32\x3b\x43\x5c\x61\x61\x63\x7c\x02\x53\x02\x03\x03\x02\x02\x02\x02\
\x05\x03\x02\x02\x02\x02\x07\x03\x02\x02\x02\x02\x09\x03\x02\x02\x02\x02\
\x0b\x03\x02\x02\x02\x02\x0d\x03\x02\x02\x02\x03\x13\x03\x02\x02\x02\x05\
\x15\x03\x02\x02\x02\x07\x18\x03\x02\x02\x02\x09\x1e\x03\x02\x02\x02\x0b\
\x2c\x03\x02\x02\x02\x0d\x37\x03\x02\x02\x02\x0f\x44\x03\x02\x02\x02\x11\
\x4c\x03\x02\x02\x02\x13\x14\x07\x0c\x02\x02\x14\x04\x03\x02\x02\x02\x15\
\x16\x07\x0b\x02\x02\x16\x06\x03\x02\x02\x02\x17\x19\x09\x02\x02\x02\x18\
\x17\x03\x02\x02\x02\x19\x1a\x03\x02\x02\x02\x1a\x18\x03\x02\x02\x02\x1a\
\x1b\x03\x02\x02\x02\x1b\x1c\x03\x02\x02\x02\x1c\x1d\x08\x04\x02\x02\x1d\
\x08\x03\x02\x02\x02\x1e\x1f\x07\x31\x02\x02\x1f\x20\x07\x2c\x02\x02\x20\
\x24\x03\x02\x02\x02\x21\x23\x0b\x02\x02\x02\x22\x21\x03\x02\x02\x02\x23\
\x26\x03\x02\x02\x02\x24\x25\x03\x02\x02\x02\x24\x22\x03\x02\x02\x02\x25\
\x27\x03\x02\x02\x02\x26\x24\x03\x02\x02\x02\x27\x28\x07\x2c\x02\x02\x28\
\x29\x07\x31\x02\x02\x29\x2a\x03\x02\x02\x02\x2a\x2b\x08\x05\x02\x02\x2b\
\x0a\x03\x02\x02\x02\x2c\x2d\x07\x31\x02\x02\x2d\x2e\x07\x31\x02\x02\x2e\
\x32\x03\x02\x02\x02\x2f\x31\x0a\x03\x02\x02\x30\x2f\x03\x02\x02\x02\x31\
\x34\x03\x02\x02\x02\x32\x30\x03\x02\x02\x02\x32\x33\x03\x02\x02\x02\x33\
\x35\x03\x02\x02\x02\x34\x32\x03\x02\x02\x02\x35\x36\x08\x06\x02\x02\x36\
\x0c\x03\x02\x02\x02\x37\x3b\x05\x0f\x08\x02\x38\x3a\x05\x11\x09\x02\x39\
\x38\x03\x02\x02\x02\x3a\x3d\x03\x02\x02\x02\x3b\x39\x03\x02\x02\x02\x3b\
\x3c\x03\x02\x02\x02\x3c\x0e\x03\x02\x02\x02\x3d\x3b\x03\x02\x02\x02\x3e\
\x45\x09\x04\x02\x02\x3f\x40\x0a\x05\x02\x02\x40\x45\x06\x08\x02\x02\x41\
\x42\x09\x06\x02\x02\x42\x43\x09\x07\x02\x02\x43\x45\x06\x08\x03\x02\x44\
\x3e\x03\x02\x02\x02\x44\x3f\x03\x02\x02\x02\x44\x41\x03\x02\x02\x02\x45\
\x10\x03\x02\x02\x02\x46\x4d\x09\x08\x02\x02\x47\x48\x0a\x05\x02\x02\x48\
\x4d\x06\x09\x04\x02\x49\x4a\x09\x06\x02\x02\x4a\x4b\x09\x07\x02\x02\x4b\
\x4d\x06\x09\x05\x02\x4c\x46\x03\x02\x02\x02\x4c\x47\x03\x02\x02\x02\x4c\
\x49\x03\x02\x02\x02\x4d\x12\x03\x02\x02\x02\x09\x02\x1a\x24\x32\x3b\x44\
\x4c\x03\x08\x02\x02";
`
The compilation of which produces the following errors:
error: expected one of )
, ,
, .
, ?
, or an operator, found _input
--> colloid-parser/src/parser/colloidlexer.rs:158:67
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| -^^^^^
| |
| expected one of )
, ,
, .
, ?
, or an operator
| help: missing ,
error: expected one of )
, ,
, .
, ?
, or an operator, found _input
--> colloid-parser/src/parser/colloidlexer.rs:158:88
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| -^^^^^
| |
| expected one of )
, ,
, .
, ?
, or an operator
| help: missing ,
error: expected one of )
, ,
, .
, ?
, or an operator, found _input
--> colloid-parser/src/parser/colloidlexer.rs:172:66
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| -^^^^^
| |
| expected one of )
, ,
, .
, ?
, or an operator
| help: missing ,
error: expected one of )
, ,
, .
, ?
, or an operator, found _input
--> colloid-parser/src/parser/colloidlexer.rs:172:87
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| -^^^^^
| |
| expected one of )
, ,
, .
, ?
, or an operator
| help: missing ,
error: cannot find macro lazy_static
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:55:2
|
55 | lazy_static!{
| ^^^^^^^^^^^
error: cannot find macro lazy_static
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:209:2
|
209 | lazy_static! {
| ^^^^^^^^^^^
error: cannot find macro lazy_static
in this scope
--> colloid-parser/src/parser/colloidparser.rs:54:2
|
54 | lazy_static!{
| ^^^^^^^^^^^
error: cannot find macro lazy_static
in this scope
--> colloid-parser/src/parser/colloidparser.rs:212:1
|
212 | lazy_static! {
| ^^^^^^^^^^^
error[E0425]: cannot find value _ATN
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:111:6
|
111 | _ATN.clone(),
| ^^^^ not found in this scope
error[E0425]: cannot find value _decision_to_DFA
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:112:6
|
112 | _decision_to_DFA.clone(),
| ^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find value _shared_context_cache
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:113:6
|
113 | _shared_context_cache.clone(),
| ^^^^^^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find value Character
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:155:7
|
155 | Character.isJavaIdentifierStart(_input.LA(-1))
| ^^^^^^^^^ not found in this scope
error[E0425]: cannot find value _input
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:155:39
|
155 | Character.isJavaIdentifierStart(_input.LA(-1))
| ^^^^^^ not found in this scope
error[E0425]: cannot find value Character
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:158:7
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^^^^ not found in this scope
error[E0425]: cannot find value Character
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:158:39
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^^^^ not found in this scope
error[E0423]: expected value, found builtin type char
--> colloid-parser/src/parser/colloidlexer.rs:158:62
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^ not a value
error[E0425]: cannot find value _input
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:158:67
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^ not found in this scope
error[E0423]: expected value, found builtin type char
--> colloid-parser/src/parser/colloidlexer.rs:158:83
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^ not a value
error[E0425]: cannot find value _input
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:158:88
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^ not found in this scope
error[E0425]: cannot find value Character
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:169:7
|
169 | Character.isJavaIdentifierPart(_input.LA(-1))
| ^^^^^^^^^ not found in this scope
error[E0425]: cannot find value _input
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:169:38
|
169 | Character.isJavaIdentifierPart(_input.LA(-1))
| ^^^^^^ not found in this scope
error[E0425]: cannot find value Character
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:172:7
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^^^^ not found in this scope
error[E0425]: cannot find value Character
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:172:38
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^^^^ not found in this scope
error[E0423]: expected value, found builtin type char
--> colloid-parser/src/parser/colloidlexer.rs:172:61
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^ not a value
error[E0425]: cannot find value _input
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:172:66
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^ not found in this scope
error[E0423]: expected value, found builtin type char
--> colloid-parser/src/parser/colloidlexer.rs:172:82
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^ not a value
error[E0425]: cannot find value _input
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:172:87
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^ not found in this scope
error[E0425]: cannot find value _ATN
in this scope
--> colloid-parser/src/parser/colloidparser.rs:79:4
|
79 | _ATN.clone(),
| ^^^^ not found in this scope
error[E0425]: cannot find value _decision_to_DFA
in this scope
--> colloid-parser/src/parser/colloidparser.rs:80:4
|
80 | _decision_to_DFA.clone(),
| ^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find value _shared_context_cache
in this scope
--> colloid-parser/src/parser/colloidparser.rs:81:4
|
81 | _shared_context_cache.clone(),
| ^^^^^^^^^^^^^^^^^^^^^ a field by this name exists in Self
error[E0425]: cannot find value VOCABULARY
in this scope
--> colloid-parser/src/parser/colloidparser.rs:125:51
|
125 | fn get_vocabulary(&self) -> &dyn Vocabulary { &**VOCABULARY }
| ^^^^^^^^^^ not found in this scope
warning: unnecessary parentheses around method argument
--> colloid-parser/src/parser/colloidlexer.rs:158:61
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^ help: remove these parentheses
|
= note: #[warn(unused_parens)]
on by default
warning: unnecessary parentheses around method argument
--> colloid-parser/src/parser/colloidlexer.rs:158:82
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^ help: remove these parentheses
warning: unnecessary parentheses around method argument
--> colloid-parser/src/parser/colloidlexer.rs:172:60
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^ help: remove these parentheses
warning: unnecessary parentheses around method argument
--> colloid-parser/src/parser/colloidlexer.rs:172:81
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^ help: remove these parentheses
warning: unused import: std::any::Any
--> colloid-parser/src/parser/colloidlistener.rs:6:5
|
6 | use std::any::Any;
| ^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)]
on by default
error: aborting due to 31 previous errors
Some errors have detailed explanations: E0423, E0425.
For more information about an error, try rustc --explain E0423
.
error: could not compile colloid-parser
.
To learn more, run the command again with --verbose.
matijak@Matijas-MBP colloid-llvm % clear
matijak@Matijas-MBP colloid-llvm % cargo build
Compiling colloid-parser v0.1.0 (/Users/matijak/ClionProjects/colloid-llvm/colloid-parser)
error: expected one of )
, ,
, .
, ?
, or an operator, found _input
--> colloid-parser/src/parser/colloidlexer.rs:158:67
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| -^^^^^
| |
| expected one of )
, ,
, .
, ?
, or an operator
| help: missing ,
error: expected one of )
, ,
, .
, ?
, or an operator, found _input
--> colloid-parser/src/parser/colloidlexer.rs:158:88
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| -^^^^^
| |
| expected one of )
, ,
, .
, ?
, or an operator
| help: missing ,
error: expected one of )
, ,
, .
, ?
, or an operator, found _input
--> colloid-parser/src/parser/colloidlexer.rs:172:66
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| -^^^^^
| |
| expected one of )
, ,
, .
, ?
, or an operator
| help: missing ,
error: expected one of )
, ,
, .
, ?
, or an operator, found _input
--> colloid-parser/src/parser/colloidlexer.rs:172:87
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| -^^^^^
| |
| expected one of )
, ,
, .
, ?
, or an operator
| help: missing ,
error: cannot find macro lazy_static
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:55:2
|
55 | lazy_static!{
| ^^^^^^^^^^^
error: cannot find macro lazy_static
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:209:2
|
209 | lazy_static! {
| ^^^^^^^^^^^
error: cannot find macro lazy_static
in this scope
--> colloid-parser/src/parser/colloidparser.rs:54:2
|
54 | lazy_static!{
| ^^^^^^^^^^^
error: cannot find macro lazy_static
in this scope
--> colloid-parser/src/parser/colloidparser.rs:212:1
|
212 | lazy_static! {
| ^^^^^^^^^^^
error[E0425]: cannot find value _ATN
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:111:6
|
111 | _ATN.clone(),
| ^^^^ not found in this scope
error[E0425]: cannot find value _decision_to_DFA
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:112:6
|
112 | _decision_to_DFA.clone(),
| ^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find value _shared_context_cache
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:113:6
|
113 | _shared_context_cache.clone(),
| ^^^^^^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find value Character
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:155:7
|
155 | Character.isJavaIdentifierStart(_input.LA(-1))
| ^^^^^^^^^ not found in this scope
error[E0425]: cannot find value _input
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:155:39
|
155 | Character.isJavaIdentifierStart(_input.LA(-1))
| ^^^^^^ not found in this scope
error[E0425]: cannot find value Character
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:158:7
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^^^^ not found in this scope
error[E0425]: cannot find value Character
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:158:39
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^^^^ not found in this scope
error[E0423]: expected value, found builtin type char
--> colloid-parser/src/parser/colloidlexer.rs:158:62
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^ not a value
error[E0425]: cannot find value _input
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:158:67
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^ not found in this scope
error[E0423]: expected value, found builtin type char
--> colloid-parser/src/parser/colloidlexer.rs:158:83
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^ not a value
error[E0425]: cannot find value _input
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:158:88
|
158 | Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^ not found in this scope
error[E0425]: cannot find value Character
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:169:7
|
169 | Character.isJavaIdentifierPart(_input.LA(-1))
| ^^^^^^^^^ not found in this scope
error[E0425]: cannot find value _input
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:169:38
|
169 | Character.isJavaIdentifierPart(_input.LA(-1))
| ^^^^^^ not found in this scope
error[E0425]: cannot find value Character
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:172:7
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^^^^ not found in this scope
error[E0425]: cannot find value Character
in this scope
--> colloid-parser/src/parser/colloidlexer.rs:172:38
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
| ^^^^^^^^^ not found in this scope
error[E0423]: expected value, found builtin type char
--> colloid-parser/src/parser/colloidlexer.rs:172:61
|
172 | Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))
|
...
Sorry for the poor formatting, doesn't seem I can get it to work properly.