Open ramooon1 opened 3 hours ago
@ramooon1 It sounds like the IF rule should get fixed, not removed. Can you provide a copy/pastable code sample for testing? I do not use this language and I have no interested transcribing the example from a photo.
@facelessuser I just removed IF from non-capturing group of close member and added ENDIF to the end of regex because of END_.
Here is a code for this language (with IF):
//M(WsW_or_WsRaus/"Move Z-Axis to Softlimit"/ /30,10///)
DEF info =(S///"","Werkstück wechseln oder Werkstück raus ?"," "/WR1,FS2/ /""/20,50,500/,,/)
DEF infoJa =(S///"","Wechseln: Werkstück gegebenenfalls entladen und aus Beladestation beladen"," "/WR1/ /""/80,180,500/,,/)
DEF infoNein=(S///"","Entladen: Werkstück aus der Maschine zur Beladestation" ," ",/WR1/ /""/80,220,500/,,/)
vs7=("wechseln",,Se1)
vs8=("entladen",,Se1)
LOAD
END_LOAD
PRESS(VS7)
IF true
DLGL("asdf")
ENDIF
wnp("$R[7]",1)
exit
END_PRESS
PRESS(VS8)
wnp("$R[7]",2)
exit
END_PRESS
//END
If you already have a solution, you can issue a pull request.
It's not a solution, with this regex I'm able to find every ENDIF e.g. python. But it doesn't work with BH.--Mit freundlichen Grüßen / Best regardsRoman Bondarenko Von: Isaac Muse @.>Gesendet: Donnerstag, Oktober 24, 2024 6:28:23 PMAn: facelessuser/BracketHighlighter @.>Cc: ramooon1 @.>; Mention @.>Betreff: Re: [facelessuser/BracketHighlighter] Failing on IF...ENDIF in SINUMERIK 840D SL RunMyHmi
scope (Issue #637)
If you already have a solution, you can issue a pull request.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
Alright, I'll take a look sometime soon.
Description
For
SINUMERIK 840D SL RunMyHmi
scope BH is unable to match end tag ifIF
-condition is used in a code.Working if it is out its scope.
Without
IF
it is working fine:Proposal
Regex for open/close for
SINUMERIK 840D SL RunMyHmi
: There is noEND_IF
in this syntax. Therefore, the first thing I tried to do was to change that - unfortunately, no success. I also added some minor improvements.Support Info