ST4.07 upgrade for Obj-C

22 views
Skip to first unread message

ACondit

unread,
Aug 23, 2013, 9:54:48 AM8/23/13
to stringtempla...@googlegroups.com
I am working on bringing the Objective-C version up to 4.07.

I have converted this test to Obj-C and it is failing.

public class TestGroupSyntaxErrors extends BaseTest {
    @Test public void testMissingImportString() throws Exception {
        String templates =
            "import\n" +
            "foo() ::= <<>>\n";
        writeFile(tmpdir, "t.stg", templates);

        STErrorListener errors = new ErrorBuffer();
        STGroup group = new STGroupFile(tmpdir+"/"+"t.stg");
        group.setListener(errors);
        group.load(); // force load
        String expected = "t.stg 2:0: mismatched input 'foo' expecting STRING"+newline+
            "t.stg 2:3: required (...)+ loop did not match anything at input '('"+newline;
        String result = errors.toString();
        assertEquals(expected, result);
    }


I can't find where in the Java source that the following error message is generated: "required (...)+ loop did not match anything at input".
Can anyone help?

Alan

Terence Parr

unread,
Aug 23, 2013, 1:42:15 PM8/23/13
to stringtempla...@googlegroups.com
That's an ANTLR error message related to bad syntax of ST template
Ter


--
You received this message because you are subscribed to the Google Groups "stringtemplate-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stringtemplate-dis...@googlegroups.com.
To post to this group, send email to stringtempla...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/stringtemplate-discussion/0bbbc4a0-e578-47a7-a20b-641b6242b4cc%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Dictation in use. Please excuse homophones, malapropisms, and nonsense. 

Condit Alan

unread,
Aug 23, 2013, 2:26:46 PM8/23/13
to stringtempla...@googlegroups.com
OK, thanks. That should help me track down the failure.

You received this message because you are subscribed to a topic in the Google Groups "stringtemplate-discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stringtemplate-discussion/NoaYNwgbHk0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stringtemplate-dis...@googlegroups.com.

To post to this group, send email to stringtempla...@googlegroups.com.

Terence Parr

unread,
Sep 24, 2015, 7:20:35 PM9/24/15
to stringtempla...@googlegroups.com
Hi Alan, do you have a github repo I can point at? I point now at:


but it’s empty ;)  Should I point at https://github.com/muggins/ST4-ObjC2.0-Runtime instead?

Ter
Reply all
Reply to author
Forward
0 new messages