From 6a4797e6c708343218d5a1dd03a120f3c6b77b55 Mon Sep 17 00:00:00 2001 From: Navin P Date: Sat, 17 Aug 2024 11:13:27 +0000 Subject: [PATCH 1/6] Add support for $ in fortran identifiers and clickable .i include files. Implementation according to discussion based on vladak https://github.com/oracle/opengrok/issues/4610 Signed-off-by: Navin P S --- .../analysis/fortran/FortranAnalyzerFactory.java | 4 +++- .../src/main/jflex/analysis/fortran/Fortran.lexh | 2 +- .../jflex/analysis/fortran/FortranSymbolTokenizer.lex | 2 ++ .../src/main/jflex/analysis/fortran/FortranXref.lex | 10 +++++++++- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/fortran/FortranAnalyzerFactory.java b/opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/fortran/FortranAnalyzerFactory.java index 3bc256d38d9..14a8fcf3ca1 100644 --- a/opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/fortran/FortranAnalyzerFactory.java +++ b/opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/fortran/FortranAnalyzerFactory.java @@ -49,7 +49,9 @@ public class FortranAnalyzerFactory extends FileAnalyzerFactory { "F95", "F03", "F08", - "F15"}; + "F15", + "F77", + "I"}; public FortranAnalyzerFactory() { super(null, null, SUFFIXES, null, null, "text/plain", AbstractAnalyzer.Genre.PLAIN, NAME, true); diff --git a/opengrok-indexer/src/main/jflex/analysis/fortran/Fortran.lexh b/opengrok-indexer/src/main/jflex/analysis/fortran/Fortran.lexh index 86994f85da2..7e9577f4588 100644 --- a/opengrok-indexer/src/main/jflex/analysis/fortran/Fortran.lexh +++ b/opengrok-indexer/src/main/jflex/analysis/fortran/Fortran.lexh @@ -22,7 +22,7 @@ * Portions Copyright (c) 2017, Chris Fraire . */ -Identifier = [a-zA-Z_] [a-zA-Z0-9_]* +Identifier = [a-zA-Z_] [a-zA-Z0-9_$]* Label = [0-9]+ Number = ([0-9]+\.[0-9]+|[0-9][0-9]* | [0][xX] [0-9a-fA-F]+ )([uUdDlL]+)? diff --git a/opengrok-indexer/src/main/jflex/analysis/fortran/FortranSymbolTokenizer.lex b/opengrok-indexer/src/main/jflex/analysis/fortran/FortranSymbolTokenizer.lex index c0763088939..8be50e0afeb 100644 --- a/opengrok-indexer/src/main/jflex/analysis/fortran/FortranSymbolTokenizer.lex +++ b/opengrok-indexer/src/main/jflex/analysis/fortran/FortranSymbolTokenizer.lex @@ -52,11 +52,13 @@ import org.opengrok.indexer.analysis.JFlexSymbolMatcher; return yystate(); } } +{WhspChar}* "include" {WhspChar}* (\'[^\'\n\r]+\'| \"[^\"\n\r]+\") {} {Number} {} \" { yybegin(STRING); } \' { yybegin(QSTRING); } \! { yybegin(SCOMMENT); } + "C" { yybegin(SCOMMENT); } } { diff --git a/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex b/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex index 685bfb5bc1d..a2f2bced51f 100644 --- a/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex +++ b/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex @@ -59,7 +59,7 @@ import org.opengrok.indexer.web.HtmlConsts; } %} -File = [a-zA-Z]{FNameChar}* ".inc" +File = [a-zA-Z]{FNameChar}* "." ("i"|"inc") %state STRING SCOMMENT QSTRING LCOMMENT @@ -95,6 +95,14 @@ File = [a-zA-Z]{FNameChar}* ".inc" onNonSymbolMatched(">", yychar + 1 + file.length()); } +"'" ({File}|{FPath}) "'" { + chkLOC(); + onNonSymbolMatched("'", yychar); + String file = yytext(); + file = file.substring(1, file.length() - 1); + onFilelikeMatched(file, yychar + 1); + onNonSymbolMatched("'", yychar + 1 + file.length()); +} /*{Hier} { onPathlikeMatched(yytext(), '.', false, yychar); } */ From 7e4f3e8d480a04b8d58e574fb253e14c297b11cc Mon Sep 17 00:00:00 2001 From: Navin P <74448943+navinp0304@users.noreply.github.com> Date: Thu, 12 Sep 2024 15:50:19 +0530 Subject: [PATCH 2/6] Update opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/fortran/FortranAnalyzerFactory.java Co-authored-by: Vladimir Kotal --- .../indexer/analysis/fortran/FortranAnalyzerFactory.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/fortran/FortranAnalyzerFactory.java b/opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/fortran/FortranAnalyzerFactory.java index 14a8fcf3ca1..f3ec4b32a53 100644 --- a/opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/fortran/FortranAnalyzerFactory.java +++ b/opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/fortran/FortranAnalyzerFactory.java @@ -50,8 +50,7 @@ public class FortranAnalyzerFactory extends FileAnalyzerFactory { "F03", "F08", "F15", - "F77", - "I"}; + "F77"}; public FortranAnalyzerFactory() { super(null, null, SUFFIXES, null, null, "text/plain", AbstractAnalyzer.Genre.PLAIN, NAME, true); From 65a89a3234c18a9a42250b68c5773c5e0ba0c4bf Mon Sep 17 00:00:00 2001 From: Navin P Date: Tue, 1 Oct 2024 16:19:34 +0000 Subject: [PATCH 3/6] Implement changes suggested by vladk Signed-off-by: Navin P --- .../jflex/analysis/fortran/FortranXref.lex | 17 ++---- .../analysis/fortran/FortranXrefTest.java | 2 +- .../test/resources/analysis/fortran/sample.f | 12 ++++ .../analysis/fortran/sample_xref.html | 56 ++++++++++------- .../analysis/fortran/samplesymbols.txt | 4 ++ .../resources/analysis/fortran/sampletags | 60 +++++++++++++++---- 6 files changed, 104 insertions(+), 47 deletions(-) diff --git a/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex b/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex index a2f2bced51f..b6d145bdb86 100644 --- a/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex +++ b/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex @@ -86,23 +86,16 @@ File = [a-zA-Z]{FNameChar}* "." ("i"|"inc") onFilteredSymbolMatched(yytext(), yychar, Consts.kwd, false); } +"'" ({File}|{FPath}) "'" | "<" ({File}|{FPath}) ">" { chkLOC(); - onNonSymbolMatched("<", yychar); - String file = yytext(); - file = file.substring(1, file.length() - 1); + String cmatch = yytext(); + onNonSymbolMatched(cmatch, yychar); + String file = cmatch.substring(1, cmatch.length() - 1); onFilelikeMatched(file, yychar + 1); - onNonSymbolMatched(">", yychar + 1 + file.length()); + onNonSymbolMatched(cmatch, yychar + 1 + file.length()); } -"'" ({File}|{FPath}) "'" { - chkLOC(); - onNonSymbolMatched("'", yychar); - String file = yytext(); - file = file.substring(1, file.length() - 1); - onFilelikeMatched(file, yychar + 1); - onNonSymbolMatched("'", yychar + 1 + file.length()); -} /*{Hier} { onPathlikeMatched(yytext(), '.', false, yychar); } */ diff --git a/opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/fortran/FortranXrefTest.java b/opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/fortran/FortranXrefTest.java index dd7983a3e4a..e43a5f0140c 100644 --- a/opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/fortran/FortranXrefTest.java +++ b/opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/fortran/FortranXrefTest.java @@ -40,7 +40,7 @@ void sampleTest() throws IOException { writeAndCompare(new FortranAnalyzerFactory(), "analysis/fortran/sample.f", "analysis/fortran/sample_xref.html", - readTagsFromResource("analysis/fortran/sampletags"), 28); + readTagsFromResource("analysis/fortran/sampletags"), 32); } @Test diff --git a/opengrok-indexer/src/test/resources/analysis/fortran/sample.f b/opengrok-indexer/src/test/resources/analysis/fortran/sample.f index 7fd7257c30d..014f3e70443 100644 --- a/opengrok-indexer/src/test/resources/analysis/fortran/sample.f +++ b/opengrok-indexer/src/test/resources/analysis/fortran/sample.f @@ -227,4 +227,16 @@ SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO ) * End of DGESV * END + +* A Fortran 77 subroutine that ends in $ +* ===================================================================== + SUBROUTINE SUBF77$() +* + INTEGER VARF77$ + VARF77$ = 0 +* +* ===================================================================== +* + CALL SUBF77$ + CALL 'http://example.com' diff --git a/opengrok-indexer/src/test/resources/analysis/fortran/sample_xref.html b/opengrok-indexer/src/test/resources/analysis/fortran/sample_xref.html index bde8dc1e5b0..1adb6dc847b 100644 --- a/opengrok-indexer/src/test/resources/analysis/fortran/sample_xref.html +++ b/opengrok-indexer/src/test/resources/analysis/fortran/sample_xref.html @@ -4,7 +4,7 @@ sampleFile - OpenGrok cross reference for /sampleFile 1* Copyright (c) 2013 Samuel Halliday +function get_sym_list(){return [];} /* ]]> */1* Copyright (c) 2013 Samuel Halliday 2* Copyright (c) 1992-2011 The University of Tennessee and The University 3* of Tennessee Research Foundation. All rights 4* reserved. @@ -176,7 +176,7 @@ 170*> \ingroup doubleGEsolve 171* 172* ===================================================================== -173 SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO ) +173 SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO ) 174* 175* -- LAPACK driver routine (version 3.4.0) -- 176* -- LAPACK is a software package provided by Univ. of Tennessee, -- @@ -184,11 +184,11 @@ 178* November 2011 179* 180* .. Scalar Arguments .. -181 INTEGER INFO, LDA, LDB, N, NRHS +181 INTEGER INFO, LDA, LDB, N, NRHS 182* .. 183* .. Array Arguments .. -184 INTEGER IPIV( * ) -185 DOUBLE PRECISION A( LDA, * ), B( LDB, * ) +184 INTEGER IPIV( * ) +185 DOUBLE PRECISION A( LDA, * ), B( LDB, * ) 186* .. 187* 188* ===================================================================== @@ -203,36 +203,48 @@ 197* 198* Test the input parameters. 199* -200 INFO = 0 + 0xFFFF - 0XFF - 0xFF00 -201 IF( N.LT.0 ) THEN -202 INFO = -1 -203 ELSE IF( NRHS.LT.0 ) THEN -204 INFO = -2 -205 ELSE IF( LDA.LT.MAX( 1, N ) ) THEN -206 INFO = -4 -207 ELSE IF( LDB.LT.MAX( 1, N ) ) THEN -208 INFO = -7 +200 INFO = 0 + 0xFFFF - 0XFF - 0xFF00 +201 IF( N.LT.0 ) THEN +202 INFO = -1 +203 ELSE IF( NRHS.LT.0 ) THEN +204 INFO = -2 +205 ELSE IF( LDA.LT.MAX( 1, N ) ) THEN +206 INFO = -4 +207 ELSE IF( LDB.LT.MAX( 1, N ) ) THEN +208 INFO = -7 209 END IF -210 IF( INFO.NE.0 ) THEN -211 CALL XERBLA( 'DGESV ', -INFO ) +210 IF( INFO.NE.0 ) THEN +211 CALL XERBLA( 'DGESV ', -INFO ) 212 RETURN 213 END IF 214* 215* Compute the LU factorization of A. 216* -217 CALL DGETRF( N, N, A, LDA, IPIV, INFO ) -218 IF( INFO.EQ.0 ) THEN +217 CALL DGETRF( N, N, A, LDA, IPIV, INFO ) +218 IF( INFO.EQ.0 ) THEN 219* 220* Solve the system A*X = B, overwriting B with X. 221* -222 CALL DGETRS( 'No transpose', N, NRHS, A, LDA, IPIV, B, LDB, -223 $ INFO ) +222 CALL DGETRS( 'No transpose', N, NRHS, A, LDA, IPIV, B, LDB, +223 $ INFO ) 224 END IF 225 RETURN 226* 227* End of DGESV 228* 229 END -230 CALL 'http://example.com' -231 +230 +231* A Fortran 77 subroutine that ends in $ +232* ===================================================================== +233 SUBROUTINE SUBF77$() +234* +235 INTEGER VARF77$ +236 VARF77$ = 0 +237* +238* ===================================================================== +239* +240 CALL SUBF77$ +241 +242 CALL 'http://example.com' +243 diff --git a/opengrok-indexer/src/test/resources/analysis/fortran/samplesymbols.txt b/opengrok-indexer/src/test/resources/analysis/fortran/samplesymbols.txt index a41cfb276bb..5e80e84474b 100644 --- a/opengrok-indexer/src/test/resources/analysis/fortran/samplesymbols.txt +++ b/opengrok-indexer/src/test/resources/analysis/fortran/samplesymbols.txt @@ -52,3 +52,7 @@ IPIV B LDB INFO +SUBF77$ +VARF77$ +VARF77$ +SUBF77$ diff --git a/opengrok-indexer/src/test/resources/analysis/fortran/sampletags b/opengrok-indexer/src/test/resources/analysis/fortran/sampletags index 4c3bfc07496..ce971b069f4 100644 --- a/opengrok-indexer/src/test/resources/analysis/fortran/sampletags +++ b/opengrok-indexer/src/test/resources/analysis/fortran/sampletags @@ -1,16 +1,52 @@ +!_TAG_EXTRA_DESCRIPTION anonymous /Include tags for non-named objects like lambda/ +!_TAG_EXTRA_DESCRIPTION fileScope /Include tags of file scope/ +!_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ +!_TAG_EXTRA_DESCRIPTION subparser /Include tags generated by subparsers/ +!_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/ +!_TAG_FIELD_DESCRIPTION file /File-restricted scoping/ +!_TAG_FIELD_DESCRIPTION input /input file/ +!_TAG_FIELD_DESCRIPTION name /tag name/ +!_TAG_FIELD_DESCRIPTION pattern /pattern/ +!_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ -!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_KIND_DESCRIPTION!Fortran E,enum /enumerations/ +!_TAG_KIND_DESCRIPTION!Fortran L,local /local, common block, and namelist variables/ +!_TAG_KIND_DESCRIPTION!Fortran M,method /type bound procedures/ +!_TAG_KIND_DESCRIPTION!Fortran N,enumerator /enumeration values/ +!_TAG_KIND_DESCRIPTION!Fortran S,submodule /submodules/ +!_TAG_KIND_DESCRIPTION!Fortran b,blockData /block data/ +!_TAG_KIND_DESCRIPTION!Fortran c,common /common blocks/ +!_TAG_KIND_DESCRIPTION!Fortran e,entry /entry points/ +!_TAG_KIND_DESCRIPTION!Fortran f,function /functions/ +!_TAG_KIND_DESCRIPTION!Fortran i,interface /interface contents, generic names, and operators/ +!_TAG_KIND_DESCRIPTION!Fortran k,component /type and structure components/ +!_TAG_KIND_DESCRIPTION!Fortran l,label /labels/ +!_TAG_KIND_DESCRIPTION!Fortran m,module /modules/ +!_TAG_KIND_DESCRIPTION!Fortran n,namelist /namelists/ +!_TAG_KIND_DESCRIPTION!Fortran p,program /programs/ +!_TAG_KIND_DESCRIPTION!Fortran s,subroutine /subroutines/ +!_TAG_KIND_DESCRIPTION!Fortran t,type /derived types and structures/ +!_TAG_KIND_DESCRIPTION!Fortran v,variable /program (global) and module variables/ +!_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ +!_TAG_OUTPUT_FILESEP slash /slash or backslash/ +!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ +!_TAG_OUTPUT_VERSION 0.0 /current.age/ +!_TAG_PARSER_VERSION!Fortran 1.1 /current.age/ +!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ +!_TAG_PROC_CWD /home/navin.parakkal/OpenGrok/opengrok-indexer/src/test/resources/analysis/fortran/ // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ -!_TAG_PROGRAM_VERSION 0.0.0 /b13cb551/ -!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ -DGESV grok.f /^ SUBROUTINE DGESV(/;" subroutine line:173 signature:(N, NRHS, A, LDA, IPIV, B, LDB, INFO) -INFO grok.f /^ INTEGER INFO,/;" local line:181 subroutine:DGESV -LDA grok.f /^ INTEGER INFO, LDA,/;" local line:181 subroutine:DGESV -LDB grok.f /^ INTEGER INFO, LDA, LDB,/;" local line:181 subroutine:DGESV -N grok.f /^ INT/;" local line:181 subroutine:DGESV -NRHS grok.f /^ INTEGER INFO, LDA, LDB, N, NRHS$/;" local line:181 subroutine:DGESV -IPIV grok.f /^ INTEGER IPIV(/;" local line:184 subroutine:DGESV -A grok.f /^ DOUBLE PRECISION A(/;" local line:185 subroutine:DGESV -B grok.f /^ DOUBL/;" local line:185 subroutine:DGESV +!_TAG_PROGRAM_VERSION 6.1.0 /p6.1.20240714.0/ +A sample.f /^ DOUBLE PRECISION A( LDA,/;" L subroutine:DGESV file: +B sample.f /^ DOUBLE PRECISION A( LDA, * ), B( LDB,/;" L subroutine:DGESV file: +DGESV sample.f /^ SUBROUTINE DGESV(/;" s +INFO sample.f /^ INTEGER INFO,/;" L subroutine:DGESV file: +IPIV sample.f /^ INTEGER IPIV(/;" L subroutine:DGESV file: +LDA sample.f /^ INTEGER INFO, LDA,/;" L subroutine:DGESV file: +LDB sample.f /^ INTEGER INFO, LDA, LDB,/;" L subroutine:DGESV file: +N sample.f /^ INTEGER INFO, LDA, LDB, N, NR/;" L subroutine:DGESV file: +NRHS sample.f /^ INTEGER INFO, LDA, LDB, N, NRHS$/;" L subroutine:DGESV file: +SUBF77$ sample.f /^ SUBROUTINE SUBF77$(/;" s +VARF77$ sample.f /^ INTEGER VARF77\$$/;" L subroutine:SUBF77$ file: From 84c1728e7fd88ffa5d2df17957c54558257b9c7d Mon Sep 17 00:00:00 2001 From: Navin P Date: Thu, 3 Oct 2024 19:11:53 +0530 Subject: [PATCH 4/6] fix the onNonSymbolMatched() arguments based on vladk review comment Signed-off-by: Navin P --- .../src/main/jflex/analysis/fortran/FortranXref.lex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex b/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex index b6d145bdb86..859644e0e0e 100644 --- a/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex +++ b/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex @@ -90,10 +90,10 @@ File = [a-zA-Z]{FNameChar}* "." ("i"|"inc") "<" ({File}|{FPath}) ">" { chkLOC(); String cmatch = yytext(); - onNonSymbolMatched(cmatch, yychar); + onNonSymbolMatched(cmatch.substring(0,1), yychar); String file = cmatch.substring(1, cmatch.length() - 1); onFilelikeMatched(file, yychar + 1); - onNonSymbolMatched(cmatch, yychar + 1 + file.length()); + onNonSymbolMatched(cmatch.substring(cmatch.length()-1,1), yychar + 1 + file.length()); } /*{Hier} From d74a50239f96e342ef6367f9f1085c98d272a32d Mon Sep 17 00:00:00 2001 From: Navin P Date: Fri, 4 Oct 2024 19:30:40 +0530 Subject: [PATCH 5/6] Space around binary operators. Review comment by vladak Signed-off-by: Navin P --- .../src/main/jflex/analysis/fortran/FortranXref.lex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex b/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex index 859644e0e0e..83d3019d0f6 100644 --- a/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex +++ b/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex @@ -93,7 +93,7 @@ File = [a-zA-Z]{FNameChar}* "." ("i"|"inc") onNonSymbolMatched(cmatch.substring(0,1), yychar); String file = cmatch.substring(1, cmatch.length() - 1); onFilelikeMatched(file, yychar + 1); - onNonSymbolMatched(cmatch.substring(cmatch.length()-1,1), yychar + 1 + file.length()); + onNonSymbolMatched(cmatch.substring(cmatch.length() - 1, 1), yychar + 1 + file.length()); } /*{Hier} From 6519dc3908d2f98eb14de2d0ba3d97aaa26acc6f Mon Sep 17 00:00:00 2001 From: Vladimir Kotal Date: Fri, 4 Oct 2024 16:58:51 +0200 Subject: [PATCH 6/6] add space after comma --- .../src/main/jflex/analysis/fortran/FortranXref.lex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex b/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex index 83d3019d0f6..037eafd4973 100644 --- a/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex +++ b/opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex @@ -90,7 +90,7 @@ File = [a-zA-Z]{FNameChar}* "." ("i"|"inc") "<" ({File}|{FPath}) ">" { chkLOC(); String cmatch = yytext(); - onNonSymbolMatched(cmatch.substring(0,1), yychar); + onNonSymbolMatched(cmatch.substring(0, 1), yychar); String file = cmatch.substring(1, cmatch.length() - 1); onFilelikeMatched(file, yychar + 1); onNonSymbolMatched(cmatch.substring(cmatch.length() - 1, 1), yychar + 1 + file.length());