Closed yunhailuo closed 8 months ago
For #1 I think you are right, it should be changed to string literal.
For #2 look at https://github.com/dnanexus/wdlTools/tree/develop/src/main/antlr4. There are some fixes there I need to commit back to the openwdl repo.
Hi @jdidion , thank you very much for the quick reply. For int literal, I'm not sure if I missed the branch but I still see IntLiteral
-> Digits
-> Digit
-> [0-9]
I'd like thank you again for this great work and ANTLR4 resource. Overall, I just want to kindly check if this is still some supported resource in the WDL community or are there some other plans for standardizing WDL spec/grammar.
For #1 I think you are right, it should be changed to string literal.
For #2 look at https://github.com/dnanexus/wdlTools/tree/develop/src/main/antlr4. There are some fixes there I need to commit back to the openwdl repo.
Ah, you are right. I'll add that as an issue.
Ah, you are right. I'll add that as an issue.
Sounds great. Looking forward to your fix.
One more thing, I'm wondering if you have come across errors like the following when generating antlr4 parser @jdidion :
error(134): WdlV1_1Parser.g4:326:4: symbol struct conflicts with generated code in target language or runtime
error(134): WdlV1_1Parser.g4:50:18: symbol string conflicts with generated code in target language or runtime
In your upcoming fix, is it reasonable to change string
to wdl_string
and struct
to wdl_struct
?
I think that's reasonable. We should probably collect all the reserved words across all the antlr runtimes and make sure there are no other collisions. Do you know of such a list?
I think that's reasonable. We should probably collect all the reserved words across all the antlr runtimes and make sure there are no other collisions. Do you know of such a list?
Good question but I don't really have a good list. Sorry. But practically speaking, I did try generate parser using antlr4 v4.9.3 against all available targets described here for all versions with antlr4 grammar which are 1.0, 1.1, development and draft-2. string
and struct
are the only two conflicts I found.
Migrated to wdl-parsers
repository: https://github.com/openwdl/wdl-parsers/issues/2
I have two confusions about import and integer when comparing language spec v1.1 and its ANTLR4 grammar:
string
which supports expression placeholder and string interpolation. My reading on language spec is import URI should be just string literal Am I misunderstanding something here?I think @jdidion is an expert on this. Can you help me here a little? Thank you in advance.