1256N/A/*
1256N/A * CDDL HEADER START
1256N/A *
1256N/A * The contents of this file are subject to the terms of the
1256N/A * Common Development and Distribution License (the "License").
1256N/A * You may not use this file except in compliance with the License.
1256N/A *
1256N/A * See LICENSE.txt included in this distribution for the specific
1256N/A * language governing permissions and limitations under the License.
1256N/A *
1256N/A * When distributing Covered Code, include this CDDL HEADER in each
1256N/A * file and include the License file at LICENSE.txt.
1256N/A * If applicable, add the following below this CDDL HEADER, with the
1256N/A * fields enclosed by brackets "[]" replaced with your own identifying
1256N/A * information: Portions Copyright [yyyy] [name of copyright owner]
1256N/A *
1256N/A * CDDL HEADER END
1256N/A */
1256N/A
1256N/A/*
1256N/A * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
1256N/A */
1256N/A
1256N/A/*
1256N/A * Gets Java symbols - ignores comments, strings, keywords
1256N/A */
1256N/A
1256N/Apackage org.opensolaris.opengrok.analysis.vb;
1256N/Aimport java.io.IOException;
1256N/Aimport java.io.Reader;
1256N/Aimport org.opensolaris.opengrok.analysis.JFlexTokenizer;
1256N/A
1256N/A%%
1256N/A%public
1256N/A%class VBSymbolTokenizer
1256N/A%extends JFlexTokenizer
1256N/A%unicode
1425N/A%init{
1425N/Asuper(in);
1425N/A%init}
1256N/A%type boolean
1256N/A%eofval{
1256N/Areturn false;
1256N/A%eofval}
1256N/A%char
1256N/A
1256N/AIdentifier = [a-zA-Z_] [a-zA-Z0-9_]*
1256N/A
1256N/A%state STRING COMMENT
1256N/A
1256N/A%%
1256N/A
1256N/A<YYINITIAL> {
1256N/A{Identifier} {String id = yytext();
1256N/A if(!Consts.getReservedKeywords().contains(id)){
1256N/A setAttribs(id, yychar, yychar + yylength());
1256N/A return true; }
1256N/A }
1256N/A \" { yybegin(STRING); }
1256N/A \' { yybegin(COMMENT); }
1256N/A}
1256N/A
1256N/A<STRING> {
1256N/A \" { yybegin(YYINITIAL); }
1256N/A\\\\ | \\\" {}
1256N/A}
1256N/A
1256N/A<COMMENT> {
1256N/A\n { yybegin(YYINITIAL);}
1256N/A}
1256N/A
1256N/A<YYINITIAL, STRING, COMMENT> {
1256N/A<<EOF>> { return false;}
1256N/A.|\n {}
1256N/A}