Bug #1243

Mis à jour par Matthieu Decorde il y a plus de 6 ans

To reproduce the bug, use a corpus containing double quotes ("), e.g. GRAAL

Double quotes must be escaped using backslash, but it does not work if the expression contains anoter token with double quotes around the value:

The query *[word="\""] [word=".*"]* fail with the following CQP messages. [word="\""] --> OK
[word="\""] [] --> OK
[word='"'] [word=".*"] --> OK
[word="\""] [word='.*'] --> OK
[word="\""] [word=".*"] -->


<pre>
CL: Regex Compile Error: missing terminating ] for character class oncordance de <[word="\""] [word=".+"]> dans le corpus BFM2014
CQP Error: org.txm.searchengine.cqp.serverException.CqiClErrorRegex
Illegal regular expression: \""][word= at org.txm.searchengine.cqp.MemCqiClient.throwExceptionFromCqi(MemCqiClient.java:144)
at org.txm.searchengine.cqp.MemCqiClient.cqpQuery(MemCqiClient.java:346)
at org.txm.searchengine.cqp.corpus.Corpus.query(Corpus.java:1131)
at org.txm.functions.concordances.Concordance.computeConcordance(Concordance.java:327)
at org.txm.functions.concordances.Concordance.<init>(Concordance.java:293)
at org.txm.rcpapplication.editors.concordances.ConcordancesEditor.compute(ConcordancesEditor.java:1138)
at org.txm.rcpapplication.editors.concordances.ConcordancesEditor$12.widgetSelected(ConcordancesEditor.java:986)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.txm.rcpapplication.Application.run(Application.java:152)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)

** Une erreur est survenue lors du calcul de la concordance Corpus.java: query, l.1138 -> org.txm.searchengine.cqp.clientExceptions.CqiClientException: org.txm.searchengine.cqp.serverException.CqiClErrorRegex
Dernière erreur
CQP Error:
: CQP Syntax Error: syntax error, unexpected $undefined, expecting IMPLIES or '|' or '&' or ']'
Q22 Q8 = [word="\""][word=".* [word="\""] [word=".+ <--
</pre>


Note that the problematic expression is likely to be generated by Index to Concordance hyperlink mechanism.

Retour