diff --git a/core/src/main/java/org/lflang/LinguaFranca.xtext b/core/src/main/java/org/lflang/LinguaFranca.xtext index 09401074a6..103224e23c 100644 --- a/core/src/main/java/org/lflang/LinguaFranca.xtext +++ b/core/src/main/java/org/lflang/LinguaFranca.xtext @@ -393,11 +393,11 @@ SignedInt: ; Forever: - 'forever' | 'FOREVER' + 'forever' ; Never: - 'never' | 'NEVER' + 'never' ; Literal: @@ -529,7 +529,7 @@ Token: 'startup' | 'shutdown' | 'after' | 'deadline' | 'mutation' | 'preamble' | 'new' | 'federated' | 'at' | 'as' | 'from' | 'widthof' | 'const' | 'method' | 'interleaved' | 'mode' | 'initial' | 'reset' | 'history' | 'watchdog' | - 'extends' | 'forever' | 'FOREVER' | 'never' | 'NEVER' | + 'extends' | 'forever' | 'never' | // Other terminals NEGINT | TRUE | FALSE | diff --git a/core/src/main/java/org/lflang/ast/ASTUtils.java b/core/src/main/java/org/lflang/ast/ASTUtils.java index 5cd0be1129..7e55e3cabc 100644 --- a/core/src/main/java/org/lflang/ast/ASTUtils.java +++ b/core/src/main/java/org/lflang/ast/ASTUtils.java @@ -948,22 +948,20 @@ public static boolean isZero(String literal) { * Report whether the given literal is forever or not. * * @param literal AST node to inspect. - * @return True if the given literal denotes the constant {@code forever} or {@code FOREVER}, - * false otherwise. + * @return True if the given literal denotes the constant {@code forever}, false otherwise. */ public static boolean isForever(String literal) { - return literal != null && (literal.equals("forever") || literal.equals("FOREVER")); + return literal != null && literal.equals("forever"); } /** * Report whether the given literal is never or not. * * @param literal AST node to inspect. - * @return True if the given literal denotes the constant {@code never} or {@code NEVER}, false - * otherwise. + * @return True if the given literal denotes the constant {@code never}, false otherwise. */ public static boolean isNever(String literal) { - return literal != null && (literal.equals("never") || literal.equals("NEVER")); + return literal != null && literal.equals("never"); } /**