Hello

I'm trying to parse the examplary lines:
example1: "//@author Ben Corne"
example2: "//@ this is an example docstring"

However, when running this in the interpreter window on example 1 or 2, it
always seems to cut off the last last part of the letters in the resulting
tree:
http://igor.rave.org/annotation.png

here's my attempt so far:
-------------------------------
grammar Annotation;

options {
  language  = Java;
  output    = AST;
}

@header{
  package edu.vub.at.parser;
}
@lexer::header{
  package edu.vub.at.parser;
}

annotation
  : '//@'  rule
  ;

rule
  : ('\t'|'\n'|' '|'\r')* author
  | docstring
  ;

// Documentation rules
author
  : 'author'!
    (( '\t' | ' ' )+)!
    .*
    EOF
  ;

docstring
  : (( '\t' | ' ')+)!
    .*
    EOF
  ;
-------------------------------

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to