Skip to content

Commit

Permalink
Merge pull request #4092 from masatake/gperf--skip-comments
Browse files Browse the repository at this point in the history
GPerf: skip comment lines started from '#'
  • Loading branch information
masatake authored Oct 2, 2024
2 parents 44bbb7c + a180e8a commit e8496cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Units/parser-gperf.r/simple.d/input.perf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ USR1, 10
SEGV, 11
USR2, 12
PIPE, 13
#IGNOREME
ALRM, 14
TERM, 15
STKFLT, 16
Expand Down
3 changes: 3 additions & 0 deletions optlib/gperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ static void initializeGPerfParser (const langType language)
addLanguageTagMultiTableRegex (language, "keywordsec",
"^%%",
"", "", "{tjump=functions}{_guest=C,0end,}", NULL);
addLanguageTagMultiTableRegex (language, "keywordsec",
"^#[^\n]*\n?",
"", "", "", NULL);
addLanguageTagMultiTableRegex (language, "keywordsec",
"^([^\n,]+)[^\n]*\n?",
"\\1", "k", "", NULL);
Expand Down
1 change: 1 addition & 0 deletions optlib/gperf.ctags
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
# - extrac keywords defined in %% ... %%
#
--_mtable-regex-GPerf=keywordsec/%%//{tjump=functions}{_guest=C,0end,}
--_mtable-regex-GPerf=keywordsec/^#[^\n]*\n?//
--_mtable-regex-GPerf=keywordsec/([^\n,]+)[^\n]*\n?/\1/k/
--_mtable-regex-GPerf=keywordsec/[^\n]*\n//

Expand Down

0 comments on commit e8496cc

Please sign in to comment.