groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Martín Sotuyo Dodero (JIRA) <>
Subject [jira] [Created] (GROOVY-7928) Groovy antlr syntax does not parse GStrings with variables
Date Fri, 02 Sep 2016 19:45:20 GMT
Juan Martín Sotuyo Dodero created GROOVY-7928:

             Summary: Groovy antlr syntax does not parse GStrings with variables
                 Key: GROOVY-7928
             Project: Groovy
          Issue Type: Bug
    Affects Versions: 2.4.7
            Reporter: Juan Martín Sotuyo Dodero

I'm trying to add Groovy support to PMD's CPD (copy paste detector, see
To do so, I'm attempting to use the GroovyTokenizer shipped in org.codehaus.groovy:groovy:2.4.7,
which is generated from the groovy.g ANTLR syntax file.

When parsing this simple snippet:

class BTree<K, V> extends BTreeNode<K> {

	def add(K key, V value) {

			throw new Exception("$key")

I get:

Lexical error at line 11, column 34.  Expecting anything but ''\n''; got it anyway

Changing *$key* for any constant string works just fine, the problem is with GStrings actually
interpolating variables.

Thanks in advance

This message was sent by Atlassian JIRA

View raw message