0
votes

I am trying to built a grammar but I really do not understand why ANTLR gives this error. Here is the my trivial rule :

trivial_grammar

prefixDef : PREFIX prefixname COLON url NEWLINE ; trivialexer PREFIX : 'PREFIX' | 'prefix';

What is the matter with ANTLR? and when triying this example "PREFIX dbpedia-owl: http://dbpedia.org/ontology/\n" why I get this error I really do not know:

line 0:mismatched 'PREFIX' input PREFIX

1

1 Answers

0
votes

are those rules in same file? if not, you need tokenVocab option in parser.