Replies: 1 comment
-
I already know how to do it |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, everyone, I need to parse out the corresponding keywords in the text, Chinese is not need to be separated by Spaces, so I define the grammar can not parse out the corresponding token from a Chinese sentence, the following is a syntax file example I wrote:
Parse the following sentences using the above syntax:
The Parse Tree is shown in the following figure
The Parse Tree is incorrect because it is not delimited by Spaces。
However, since Chinese grammar does not need to use Spaces to separate characters, the above sentence is legal, but Antlr seems to be unable to deal with it, please see if there is any other way to define Antlr syntax, so that it can parse the above sentence 。
Beta Was this translation helpful? Give feedback.
All reactions