write me some antlr4 g4. it should have: strings (with ") chars (with ') ints, floats,…
- User
write me some antlr4 g4. it should have:
strings (with ") chars (with ') ints, floats, etc, e.g: 15.2f, 5, 0b12, 0o2, 0x532 (u8)15 booleans: true false
here are examples of the functions i want: print statement: print EXPRESSION e.g: print "Hello, World!" let statement: let NAME = EXPRESSION e.g: let x = 5 e.g 2: let x, y = 5, 10
and thats really it. for example the code:
let x = 5 let y = 10
print x + y
would be valid :D
- Assistant
Certainly! Here's the ANTLR4 grammar (
myLanguage.g4) based on your specifications:antlr