1
// This file is part of PyANTLR. See LICENSE.txt for license
2
// details..........Copyright (C) Wolfgang Haefelinger, 2004.
10
class javadoc_l extends Lexer;
14
exportVocab = JavaDoc;
27
ID : ('a'..'z'|'A'..'Z')+
30
/** This rule simply prevents JAVADOC_CLOSE from being
31
* called for every '*' in a comment. Calling JAVADOC_CLOSE
32
* will fail for simple '*' and cause an exception, which
33
* is slow. In other words, the grammar will work without
34
* this rule, but is slower.
36
STAR: '*' {$setType(Token.SKIP);}
40
: "*/" { import multilex; multilex.selector.pop();}
43
/** Ignore whitespace inside JavaDoc comments */
45
: ( "\r\n" // Evil DOS
47
| '\n' // Unix (the right way)
49
{ self.newline(); $setType(Token.SKIP); }