csv-validator icon indicating copy to clipboard operation
csv-validator copied to clipboard

validator get stuck with malformed comment

Open thomas-vincent opened this issue 7 years ago • 6 comments

This schema causes the validator (gui or cmd) to get stuck:

version 1.1
/* === SOME TEXT HERE that is quite long ===
 * 
 */
@noHeader @permitEmpty

The doc indeed says that asterisk cannot be used inside a multi-line comment. But the validator should nicely complain instead of getting stuck ;)

thomas-vincent avatar Apr 16 '18 17:04 thomas-vincent

Looks like we have some ambiguity in the Grammar :-/

adamretter avatar Sep 25 '18 05:09 adamretter

@adamretter as you commented on #61 an asterisk within a multiline comment is not allowed by the EBNF. Thomas can you confirm which version you're using as this issue seemed to have been fixed by something else last time I tried it.

DavidUnderdown avatar Sep 25 '18 09:09 DavidUnderdown

Got bit by that as well with 1.1.5. In my case I was attempting to use a bit of markdown formatting.

afranke avatar Feb 19 '19 14:02 afranke

To retest in current versions

DavidUnderdown avatar Feb 08 '22 15:02 DavidUnderdown

I'm seeing this problem with the current version.

[2.1] failure: Invalid column definition

/* === SOME TEXT HERE that is quite long ===
^,None,None)

@DavidUnderdown - should we accept asterisks in the comments? Or would you prefer a different error message?

luketebbs avatar Mar 27 '22 19:03 luketebbs

As commented above the grammar definition does prohibit asterisks within a multiline comment, so happy for an error to be thrown. It's not really an invalid column definition though, so it would be good to explicitly reference that the additional asterisk in the comment is the problem if possible.

DavidUnderdown avatar Mar 28 '22 08:03 DavidUnderdown