Skip to content

Commit

Permalink
Merge pull request #994 from JetBrains/feature/regexp_additions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderpann authored Oct 24, 2024
2 parents 567a7cd + d3e813a commit fda71c1
Show file tree
Hide file tree
Showing 15 changed files with 717 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The format is *loosely* based on [Keep a Changelog](https://keepachangelog.com/e
- *com.mbeddr.mpsutil.editor.querylist*: The expression *queryListNode* was renamed to node and a new expression *index* can now be used to refer to the index of the current queried node.
- *de.itemis.mps.spellcheck*: This new language enhances the MPS spell checker to support custom dictionaries declared in a language and also adds some dictionary-related intentions to a new intention group *Dictionary.*
- *com.mbeddr.mpsutil.blutil.rt*: Provide useful scope class *UniqueElementScope* which ensures that there are no duplicates in the scope.
- *com.mbeddr.mpsutil.blutil*: Extensions to the language *jetbrains.mps.baseLanguage.regexp* are now provided to support most of the missing features of the Java regex language.

### Fixed

Expand Down
9 changes: 8 additions & 1 deletion code/blutil/languages/com.mbeddr.mpsutil.blutil/blutil.mpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
<classes generated="true" path="${module}/classes_gen" />
</facet>
</facets>
<accessoryModels />
<accessoryModels>
<model modelUID="r:1e7c5960-15a6-42cc-930a-1c74551c2ace(com.mbeddr.mpsutil.blutil.accessory)" />
</accessoryModels>
<generators>
<generator alias="" namespace="com.mbeddr.mpsutil.blutil#4354378109086982937" uuid="3a6b9f2f-4402-4ed6-a7cd-12b272b244d5">
<models>
Expand Down Expand Up @@ -72,6 +74,7 @@
<module reference="fd392034-7849-419d-9071-12563d152375(jetbrains.mps.baseLanguage.closures)" version="0" />
<module reference="83888646-71ce-4f1c-9c53-c54016f6ad4f(jetbrains.mps.baseLanguage.collections)" version="0" />
<module reference="5f9babc9-8d5d-4825-8e61-17b241ee6272(jetbrains.mps.baseLanguage.collections#1151699677197)" version="0" />
<module reference="daafa647-f1f7-4b0b-b096-69cd7c8408c0(jetbrains.mps.baseLanguage.regexp)" version="0" />
<module reference="e39e4a59-8cb6-498e-860e-8fa8361c0d90(jetbrains.mps.baseLanguage.scopes)" version="0" />
<module reference="2d3c70e9-aab2-4870-8d8d-6036800e4103(jetbrains.mps.kernel)" version="0" />
<module reference="d936855b-48da-4812-a8a0-2bfddd633ac5(jetbrains.mps.lang.behavior.api)" version="0" />
Expand Down Expand Up @@ -134,6 +137,7 @@
<dependency reexport="false" scope="generate-into">760a0a8c-eabb-4521-8bfd-65db761a9ba3(jetbrains.mps.baseLanguage.logging)</dependency>
<dependency reexport="false">13744753-c81f-424a-9c1b-cf8943bf4e86(jetbrains.mps.lang.sharedConcepts)</dependency>
<dependency reexport="false">f2801650-65d5-424e-bb1b-463a8781b786(jetbrains.mps.baseLanguage.javadoc)</dependency>
<dependency reexport="false">daafa647-f1f7-4b0b-b096-69cd7c8408c0(jetbrains.mps.baseLanguage.regexp)</dependency>
</dependencies>
<languageVersions>
<language slang="l:9d69e719-78c8-4286-90db-fb19c107d049:com.mbeddr.mpsutil.grammarcells" version="2" />
Expand All @@ -148,6 +152,7 @@
<language slang="l:f2801650-65d5-424e-bb1b-463a8781b786:jetbrains.mps.baseLanguage.javadoc" version="2" />
<language slang="l:c7d5b9dd-a05f-4be2-bc73-f2e16994cc67:jetbrains.mps.baseLanguage.lightweightdsl" version="1" />
<language slang="l:760a0a8c-eabb-4521-8bfd-65db761a9ba3:jetbrains.mps.baseLanguage.logging" version="0" />
<language slang="l:daafa647-f1f7-4b0b-b096-69cd7c8408c0:jetbrains.mps.baseLanguage.regexp" version="0" />
<language slang="l:a247e09e-2435-45ba-b8d2-07e93feba96a:jetbrains.mps.baseLanguage.tuples" version="0" />
<language slang="l:aee9cad2-acd4-4608-aef2-0004f6a1cdbd:jetbrains.mps.lang.actions" version="4" />
<language slang="l:af65afd8-f0dd-4942-87d9-63a55f2a9db1:jetbrains.mps.lang.behavior" version="2" />
Expand Down Expand Up @@ -199,6 +204,7 @@
<module reference="83888646-71ce-4f1c-9c53-c54016f6ad4f(jetbrains.mps.baseLanguage.collections)" version="0" />
<module reference="f2801650-65d5-424e-bb1b-463a8781b786(jetbrains.mps.baseLanguage.javadoc)" version="0" />
<module reference="760a0a8c-eabb-4521-8bfd-65db761a9ba3(jetbrains.mps.baseLanguage.logging)" version="0" />
<module reference="daafa647-f1f7-4b0b-b096-69cd7c8408c0(jetbrains.mps.baseLanguage.regexp)" version="0" />
<module reference="e39e4a59-8cb6-498e-860e-8fa8361c0d90(jetbrains.mps.baseLanguage.scopes)" version="0" />
<module reference="2d3c70e9-aab2-4870-8d8d-6036800e4103(jetbrains.mps.kernel)" version="0" />
<module reference="63650c59-16c8-498a-99c8-005c7ee9515d(jetbrains.mps.lang.access)" version="0" />
Expand All @@ -222,6 +228,7 @@
<extendedLanguage>ceab5195-25ea-4f22-9b92-103b95ca8c0c(jetbrains.mps.lang.core)</extendedLanguage>
<extendedLanguage>f3061a53-9226-4cc5-a443-f952ceaf5816(jetbrains.mps.baseLanguage)</extendedLanguage>
<extendedLanguage>7866978e-a0f0-4cc7-81bc-4d213d9375e1(jetbrains.mps.lang.smodel)</extendedLanguage>
<extendedLanguage>daafa647-f1f7-4b0b-b096-69cd7c8408c0(jetbrains.mps.baseLanguage.regexp)</extendedLanguage>
</extendedLanguages>
</language>

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<import index="tp3r" ref="r:00000000-0000-4000-0000-011c8959034b(jetbrains.mps.lang.quotation.structure)" />
<import index="mhfm" ref="3f233e7f-b8a6-46d2-a57f-795d56775243/java:org.jetbrains.annotations(Annotations/)" />
<import index="tpem" ref="r:00000000-0000-4000-0000-011c895902c2(jetbrains.mps.baseLanguage.dataFlow)" />
<import index="tpfs" ref="r:00000000-0000-4000-0000-011c89590514(jetbrains.mps.baseLanguage.regexp.behavior)" />
<import index="tpfo" ref="r:00000000-0000-4000-0000-011c89590518(jetbrains.mps.baseLanguage.regexp.structure)" />
<import index="tpcn" ref="r:00000000-0000-4000-0000-011c8959028b(jetbrains.mps.lang.structure.behavior)" implicit="true" />
<import index="wyt6" ref="6354ebe7-c22a-4a0f-ac54-50b52ab9b065/java:java.lang(JDK/)" implicit="true" />
<import index="c17a" ref="8865b7a8-5271-43d3-884c-6fd1d9cfdd34/java:org.jetbrains.mps.openapi.language(MPS.OpenAPI/)" implicit="true" />
Expand Down Expand Up @@ -2509,5 +2511,270 @@
</node>
</node>
</node>
<node concept="13h7C7" id="58ackBphXow">
<property role="3GE5qa" value="regexp" />
<ref role="13h7C2" to="hba4:58ackBphWSb" resolve="OctalRegex" />
<node concept="13i0hz" id="hMuFYN0" role="13h7CS">
<property role="TrG5h" value="getString" />
<property role="13i0it" value="true" />
<ref role="13i0hy" to="tpfs:hMuDF1A" resolve="getString" />
<node concept="3clFbS" id="hMuFYN3" role="3clF47">
<node concept="3cpWs6" id="hMuG42j" role="3cqZAp">
<node concept="3cpWs3" id="hMuGdHg" role="3cqZAk">
<node concept="2OqwBi" id="hMuGf5d" role="3uHU7w">
<node concept="13iPFW" id="hMuGeUt" role="2Oq$k0" />
<node concept="3TrcHB" id="hMuGfXE" role="2OqNvi">
<ref role="3TsBF5" to="hba4:58ackBphWZx" resolve="value" />
</node>
</node>
<node concept="Xl_RD" id="hMuG6dZ" role="3uHU7B">
<property role="Xl_RC" value="\\0" />
</node>
</node>
</node>
</node>
<node concept="37vLTG" id="hMSxu4_" role="3clF46">
<property role="TrG5h" value="vars" />
<node concept="2I9FWS" id="hMSxu4A" role="1tU5fm">
<ref role="2I9WkF" to="tpfo:h5Tukr7" resolve="MatchParensRegexp" />
</node>
</node>
<node concept="17QB3L" id="4fkVwtho0Pm" role="3clF45" />
<node concept="3Tm1VV" id="hMSW0KV" role="1B3o_S" />
</node>
<node concept="13hLZK" id="58ackBphXox" role="13h7CW">
<node concept="3clFbS" id="58ackBphXoy" role="2VODD2" />
</node>
</node>
<node concept="13h7C7" id="58ackBplh94">
<property role="3GE5qa" value="regexp" />
<ref role="13h7C2" to="hba4:58ackBplgNG" resolve="HexadecimalRegex" />
<node concept="13hLZK" id="58ackBplh95" role="13h7CW">
<node concept="3clFbS" id="58ackBplh96" role="2VODD2" />
</node>
<node concept="13i0hz" id="45$ooctjyiD" role="13h7CS">
<property role="TrG5h" value="getString" />
<ref role="13i0hy" to="tpfs:hMuDF1A" resolve="getString" />
<node concept="3Tm1VV" id="45$ooctjyiG" role="1B3o_S" />
<node concept="3clFbS" id="45$ooctjyiP" role="3clF47">
<node concept="3clFbF" id="7NPLlCCtrxp" role="3cqZAp">
<node concept="3cpWs3" id="58ackBplh9q" role="3clFbG">
<node concept="2OqwBi" id="58ackBplh9r" role="3uHU7w">
<node concept="13iPFW" id="58ackBplh9s" role="2Oq$k0" />
<node concept="3TrcHB" id="58ackBplh9t" role="2OqNvi">
<ref role="3TsBF5" to="hba4:58ackBplgNH" resolve="value" />
</node>
</node>
<node concept="Xl_RD" id="58ackBplh9u" role="3uHU7B">
<property role="Xl_RC" value="\\x" />
</node>
</node>
</node>
</node>
<node concept="37vLTG" id="45$ooctjyiQ" role="3clF46">
<property role="TrG5h" value="vars" />
<node concept="2I9FWS" id="45$ooctjyiR" role="1tU5fm">
<ref role="2I9WkF" to="tpfo:h5Tukr7" resolve="MatchParensRegexp" />
</node>
</node>
<node concept="17QB3L" id="45$ooctjyiS" role="3clF45" />
</node>
</node>
<node concept="13h7C7" id="58ackBpoihL">
<property role="3GE5qa" value="regexp" />
<ref role="13h7C2" to="hba4:58ackBpohUd" resolve="ControlCharacterRegex" />
<node concept="13hLZK" id="58ackBpoihM" role="13h7CW">
<node concept="3clFbS" id="58ackBpoihN" role="2VODD2" />
</node>
<node concept="13i0hz" id="45$ooctjyBq" role="13h7CS">
<property role="TrG5h" value="getString" />
<ref role="13i0hy" to="tpfs:hMuDF1A" resolve="getString" />
<node concept="3Tm1VV" id="45$ooctjyBt" role="1B3o_S" />
<node concept="3clFbS" id="45$ooctjyBA" role="3clF47">
<node concept="3clFbF" id="7NPLlCCtrR5" role="3cqZAp">
<node concept="3cpWs3" id="58ackBpoii7" role="3clFbG">
<node concept="2OqwBi" id="58ackBpoii8" role="3uHU7w">
<node concept="13iPFW" id="58ackBpoii9" role="2Oq$k0" />
<node concept="3TrcHB" id="58ackBpoiia" role="2OqNvi">
<ref role="3TsBF5" to="hba4:58ackBpohUe" resolve="value" />
</node>
</node>
<node concept="Xl_RD" id="58ackBpoiib" role="3uHU7B">
<property role="Xl_RC" value="\\c" />
</node>
</node>
</node>
</node>
<node concept="37vLTG" id="45$ooctjyBB" role="3clF46">
<property role="TrG5h" value="vars" />
<node concept="2I9FWS" id="45$ooctjyBC" role="1tU5fm">
<ref role="2I9WkF" to="tpfo:h5Tukr7" resolve="MatchParensRegexp" />
</node>
</node>
<node concept="17QB3L" id="45$ooctjyBD" role="3clF45" />
</node>
</node>
<node concept="13h7C7" id="7NPLlCCM4uv">
<property role="3GE5qa" value="regexp" />
<ref role="13h7C2" to="hba4:7NPLlCCM4be" resolve="UnicodeByNameRegex" />
<node concept="13hLZK" id="7NPLlCCM4uw" role="13h7CW">
<node concept="3clFbS" id="7NPLlCCM4ux" role="2VODD2" />
</node>
<node concept="13i0hz" id="45$ooctjxbk" role="13h7CS">
<property role="TrG5h" value="getString" />
<ref role="13i0hy" to="tpfs:hMuDF1A" resolve="getString" />
<node concept="3Tm1VV" id="45$ooctjxbn" role="1B3o_S" />
<node concept="3clFbS" id="45$ooctjxbw" role="3clF47">
<node concept="3clFbF" id="7NPLlCCM4uP" role="3cqZAp">
<node concept="3cpWs3" id="7NPLlCCM6Kr" role="3clFbG">
<node concept="Xl_RD" id="7NPLlCCM6Ku" role="3uHU7w">
<property role="Xl_RC" value="}" />
</node>
<node concept="3cpWs3" id="7NPLlCCM4uQ" role="3uHU7B">
<node concept="Xl_RD" id="7NPLlCCM4uU" role="3uHU7B">
<property role="Xl_RC" value="\\N{" />
</node>
<node concept="2OqwBi" id="7NPLlCCM4uR" role="3uHU7w">
<node concept="13iPFW" id="7NPLlCCM4uS" role="2Oq$k0" />
<node concept="3TrcHB" id="7NPLlCCM4uT" role="2OqNvi">
<ref role="3TsBF5" to="hba4:7NPLlCCM4bf" resolve="name" />
</node>
</node>
</node>
</node>
</node>
</node>
<node concept="37vLTG" id="45$ooctjxbx" role="3clF46">
<property role="TrG5h" value="vars" />
<node concept="2I9FWS" id="45$ooctjxby" role="1tU5fm">
<ref role="2I9WkF" to="tpfo:h5Tukr7" resolve="MatchParensRegexp" />
</node>
</node>
<node concept="17QB3L" id="45$ooctjxbz" role="3clF45" />
</node>
</node>
<node concept="13h7C7" id="45$ooctlW7S">
<property role="3GE5qa" value="regexp" />
<ref role="13h7C2" to="hba4:45$ooctlVOQ" resolve="BackReferenceRegexp" />
<node concept="13i0hz" id="45$ooctlW8b" role="13h7CS">
<property role="TrG5h" value="getString" />
<property role="13i0it" value="true" />
<ref role="13i0hy" to="tpfs:hMuDF1A" resolve="getString" />
<node concept="3clFbS" id="45$ooctlW8c" role="3clF47">
<node concept="3cpWs6" id="45$ooctlW8d" role="3cqZAp">
<node concept="3cpWs3" id="45$ooctlW8e" role="3cqZAk">
<node concept="2OqwBi" id="45$ooctlW8f" role="3uHU7w">
<node concept="13iPFW" id="45$ooctlW8g" role="2Oq$k0" />
<node concept="3TrcHB" id="45$ooctlX9K" role="2OqNvi">
<ref role="3TsBF5" to="hba4:45$ooctlVOT" resolve="index" />
</node>
</node>
<node concept="Xl_RD" id="45$ooctlW8i" role="3uHU7B">
<property role="Xl_RC" value="\\" />
</node>
</node>
</node>
</node>
<node concept="37vLTG" id="45$ooctlW8j" role="3clF46">
<property role="TrG5h" value="vars" />
<node concept="2I9FWS" id="45$ooctlW8k" role="1tU5fm">
<ref role="2I9WkF" to="tpfo:h5Tukr7" resolve="MatchParensRegexp" />
</node>
</node>
<node concept="17QB3L" id="45$ooctlW8l" role="3clF45" />
<node concept="3Tm1VV" id="45$ooctlW8m" role="1B3o_S" />
</node>
<node concept="13hLZK" id="45$ooctlW7T" role="13h7CW">
<node concept="3clFbS" id="45$ooctlW7U" role="2VODD2" />
</node>
</node>
<node concept="13h7C7" id="45$ooctqnYC">
<property role="3GE5qa" value="regexp" />
<ref role="13h7C2" to="hba4:h5P8g6K" resolve="GroupRegexp" />
<node concept="13i0hz" id="hMuN2Cf" role="13h7CS">
<property role="TrG5h" value="getString" />
<property role="13i0it" value="true" />
<ref role="13i0hy" to="tpfs:hMuDF1A" resolve="getString" />
<node concept="3clFbS" id="hMuN2Ci" role="3clF47">
<node concept="3cpWs6" id="hMuO18p" role="3cqZAp">
<node concept="3cpWs3" id="hMuIYDg" role="3cqZAk">
<node concept="Xl_RD" id="hMuIZ6A" role="3uHU7w">
<property role="Xl_RC" value=")" />
</node>
<node concept="3cpWs3" id="hMuIXp7" role="3uHU7B">
<node concept="Xl_RD" id="hMuIVID" role="3uHU7B">
<property role="Xl_RC" value="(" />
</node>
<node concept="2OqwBi" id="hMRUu_c" role="3uHU7w">
<node concept="2OqwBi" id="hMRUtXJ" role="2Oq$k0">
<node concept="13iPFW" id="hMRUt$W" role="2Oq$k0" />
<node concept="3TrEf2" id="hMRUupi" role="2OqNvi">
<ref role="3Tt5mk" to="tpfo:h5P8htV" resolve="expr" />
</node>
</node>
<node concept="2qgKlT" id="hMRUv4t" role="2OqNvi">
<ref role="37wK5l" to="tpfs:hMuDF1A" resolve="getString" />
<node concept="37vLTw" id="2BHiRxgmoRj" role="37wK5m">
<ref role="3cqZAo" node="hMSxk58" resolve="vars" />
</node>
</node>
</node>
</node>
</node>
</node>
</node>
<node concept="37vLTG" id="hMSxk58" role="3clF46">
<property role="TrG5h" value="vars" />
<node concept="2I9FWS" id="hMSxk59" role="1tU5fm">
<ref role="2I9WkF" to="tpfo:h5Tukr7" resolve="MatchParensRegexp" />
</node>
</node>
<node concept="17QB3L" id="4fkVwtho0OO" role="3clF45" />
<node concept="3Tm1VV" id="hMSVV4h" role="1B3o_S" />
</node>
<node concept="13hLZK" id="45$ooctqnYD" role="13h7CW">
<node concept="3clFbS" id="45$ooctqnYE" role="2VODD2" />
</node>
</node>
<node concept="13h7C7" id="45$ooctt7jx">
<property role="3GE5qa" value="regexp" />
<ref role="13h7C2" to="hba4:45$ooctt21m" resolve="NamedBackReferenceRegexp" />
<node concept="13i0hz" id="45$ooctt7k8" role="13h7CS">
<property role="TrG5h" value="getString" />
<property role="13i0it" value="true" />
<ref role="13i0hy" to="tpfs:hMuDF1A" resolve="getString" />
<node concept="3clFbS" id="45$ooctt7k9" role="3clF47">
<node concept="3cpWs6" id="45$ooctt7ka" role="3cqZAp">
<node concept="3cpWs3" id="45$ooctt7kb" role="3cqZAk">
<node concept="2OqwBi" id="45$ooctt8ei" role="3uHU7w">
<node concept="2OqwBi" id="45$ooctt7kc" role="2Oq$k0">
<node concept="13iPFW" id="45$ooctt7kd" role="2Oq$k0" />
<node concept="3TrEf2" id="45$ooctt82F" role="2OqNvi">
<ref role="3Tt5mk" to="hba4:45$ooctt21r" resolve="group" />
</node>
</node>
<node concept="2qgKlT" id="45$ooctt8$v" role="2OqNvi">
<ref role="37wK5l" to="tpfs:hNm3Btp" resolve="getIndex" />
</node>
</node>
<node concept="Xl_RD" id="45$ooctt7kf" role="3uHU7B">
<property role="Xl_RC" value="\\" />
</node>
</node>
</node>
</node>
<node concept="37vLTG" id="45$ooctt7kg" role="3clF46">
<property role="TrG5h" value="vars" />
<node concept="2I9FWS" id="45$ooctt7kh" role="1tU5fm">
<ref role="2I9WkF" to="tpfo:h5Tukr7" resolve="MatchParensRegexp" />
</node>
</node>
<node concept="17QB3L" id="45$ooctt7ki" role="3clF45" />
<node concept="3Tm1VV" id="45$ooctt7kj" role="1B3o_S" />
</node>
<node concept="13hLZK" id="45$ooctt7jy" role="13h7CW">
<node concept="3clFbS" id="45$ooctt7jz" role="2VODD2" />
</node>
</node>
</model>

Loading

0 comments on commit fda71c1

Please sign in to comment.