String matching not working #370
-
We use textX in LibreOffice for creating UI tests out of logged actions. I ran into an issue while trying to adjust a grammar file. This is the file: https://git.libreoffice.org/core/+/refs/heads/master/uitest/ui_logger_dsl/UI_Object_commands.tx It has TabControlUIObject with tab_page_number=INT. It turns out some of our tab control items have a string as ID instead of a number. I changed the type to STRING and ran into a matching problem. This is the log file that is being parsed, Choose Tab number internet i 8000 n 'tabcontrol' from is the relevant line:
In the dsl_core.py, I turned debugging on with
In the debug output, I see this:
What gives? Why is it not grabbing 'internet' as the string? I am using textX 2.3.0 on Arch Linux. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Built-in |
Beta Was this translation helpful? Give feedback.
Built-in
STRING
rule matches quoted strings.internet
would be matched by theID
rule. But number won't be matched byID
. So, probably the best would be to make a new rule that matches eitherID
orINT
and use that fortab_page_number
.