Hi!
I need help for the following problem: I think the best way to describe it, is to show you what I tried. This produces a bunch of errors. expression : conditional_expression | numerical_expression | alphanumerical_expression | function | data_field ; conditional_expression : 'IF' arguments 'THEN' value ('ELSE' (conditional_expression | value))? ; arguments : argument (('OR' | 'AND') argument)* | '(' arguments ')' ; Argument : value relational_operator value | (NOT? value IN) ('(' (SingleStringLiteral | NumericLiteral) (COMMA (SingleStringLiteral | NumericLiteral))* ')' | FILE OBJNAME) ; relational_operator : RelOp | alphanumerical_relational_op | numerical_relational_op ; alphanumerical_relational_op : ARelOp ; numerical_relational_op : NRelOp numerical_expression 'TO' ; value : numerical_expression | alphanumerical_expression | function | data_field; function : FUNCTION function_argument ')'; function_argument : (numerical_expression | alphanumerical_expression | function | data_field) (COLON numerical_expression | alphanumerical_expression | function | data_field)*; alphanumerical_expression : (SingleStringLiteral) (chrOp (SingleStringLiteral))+; numerical_expression : (numExprA) (NumOp (numExprA))+ | '('numerical_expression ')' ; numExprA : NumericLiteral; data_field : PREOP? PREFIX? OBJNAME PREOP : ('AVE'|'MAX'|'MIN'|'FST'|'TOT'|'CNT'|'SUM'|'ALL'|'ST'|'CT'|'ASQ'|'PCT'|'RPCT '|'SEG'|'DST')'.'; PREFIX : OBJNAME '.'; FUNCTION : OBJNAME '('; OBJNAME : ('A'..'Z') ('A'..'Z'|'0'..'9'|'_')*; NumOp : '**' | '*' | '+' | '-' | '/' | 'AND' | 'OR'; ChrOp : '|' | '||' ; RelOp : 'EQ'|'IS'|'ISNOT'|'ISFROM'|'EXCEEDS'|'NE'|'GE'|'GT'|'LT'|'LE'|'IS MISSING'|'ISNOT MISSING' ; NRelOp : 'FROM'|'ISFROM'|'NOTFROM'; ARelOp : 'CONTAINS'|'OMITS'|'INCLUDES'|'EXCLUDES'|'NOT LIKE'|'LIKE'; fragment StringLiteral : '"' ~('"')* '"' | SingleStringLiteral ; SingleStringLiteral : '\'' ~('\'')* '\'' ; NumericLiteral : DecimalLiteral | IntegerLiteral ; fragment IntegerLiteral : DecimalDigit+; fragment DecimalLiteral : DecimalDigit+ '.' DecimalDigit* | '.' DecimalDigit+ ; fragment DecimalDigit : ('0'..'9') ; I really don't know how to describe the problem but I urgently need some help. Best regards, Tom --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address