Antlr4 boolean operations
-
Hey, i have some problems with my Antlr Project. I want to type in some Boolean expressions like (2and1)or0 (true and false) or true ..or similar stuff. And as a result i would like to have a single True or False With the bool expressions True/False the code works fine. So here is my problem:
public override bool VisitInt(Combined2Parser.IntContext context)
{
return bool.Parse(context.INT().GetText());
}i want to convert the Integer numbers of my string into boolean expressions and i dont understand why this is not working with this method. I have to say i am very new with Antlr and it would also be a great help if someone can tell me how to write the grammar for Antlr4.Till now i did some Tutorials with some mathematical operands, but i dont really know how to transfrom this Knowledge on Logial operands.
-
Hey, i have some problems with my Antlr Project. I want to type in some Boolean expressions like (2and1)or0 (true and false) or true ..or similar stuff. And as a result i would like to have a single True or False With the bool expressions True/False the code works fine. So here is my problem:
public override bool VisitInt(Combined2Parser.IntContext context)
{
return bool.Parse(context.INT().GetText());
}i want to convert the Integer numbers of my string into boolean expressions and i dont understand why this is not working with this method. I have to say i am very new with Antlr and it would also be a great help if someone can tell me how to write the grammar for Antlr4.Till now i did some Tutorials with some mathematical operands, but i dont really know how to transfrom this Knowledge on Logial operands.
As I haven't heard of that library before I could only suggest that you have a look at the following link http://www.antlr.org/support.html[^] they state in there that they use StackOverflow as a medium for support based questions.
Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON