alibaba / alibaba/QLExpress

表达式语法检查错误,"OR(1<2, 2>3)" 语法检查正确,"or(1<2, 2>3)" 语法检查错误。

Open
#323 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.6k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

表达式语法检查错误,"OR(1<2, 2>3)" 语法检查正确,"or(1<2, 2>3)" 语法检查错误。

```java

private boolean syntaxCheck(String express){
try {
ExpressRunner runner = new ExpressRunner(false, true);
DefaultContext context = new DefaultContext<>();
InstructionSet set = runner.parseInstructionSet(express);
} catch (Exception e) {
return false;
}
return true;
}
```

```json
[{
"value_of_expectation": true,
"formula":"OR(1<2, 2>3)"
},
{
"value_of_expectation": true,
"formula":"or(1<2, 2>3)",
"remark": "小写的or会存在误判"
}]
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the two expressions with the shown ExpressRunner.parseInstructionSet call and compare the parser results for uppercase and lowercase OR. Trace the syntax-check path from ExpressRunner, then confirm that both expressions are accepted without changing the behavior of the reported Java entry point.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.