Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forth: new parser #3812

Merged
merged 1 commit into from
Sep 14, 2023
Merged

Forth: new parser #3812

merged 1 commit into from
Sep 14, 2023

Conversation

farvardin
Copy link
Contributor

see #3810

@masatake
Copy link
Member

Run make -BC win32 at the top of the source dir.
The command line may update win32/ctags_vs2013.vcxproj and win32/ctags_vs2013.vcxproj.filters.
Make a commit for the updated files.

@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Patch coverage: 25.00% and project coverage change: -0.04% ⚠️

Comparison is base (f7e27b4) 85.06% compared to head (99878da) 85.03%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3812      +/-   ##
==========================================
- Coverage   85.06%   85.03%   -0.04%     
==========================================
  Files         226      227       +1     
  Lines       53857    53889      +32     
==========================================
+ Hits        45816    45824       +8     
- Misses       8041     8065      +24     
Files Changed Coverage Δ
optlib/forth.c 0.00% <0.00%> (ø)
main/selectors.c 80.28% <85.71%> (+0.18%) ⬆️
parsers/fortran.c 96.11% <100.00%> (+<0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

docs/news.rst Outdated Show resolved Hide resolved
optlib/forth.ctags Outdated Show resolved Hide resolved
optlib/forth.ctags Outdated Show resolved Hide resolved
optlib/forth.ctags Outdated Show resolved Hide resolved
parsers/forth.c Outdated
@@ -0,0 +1,76 @@
/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this file anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I understand. But couldn't it be possible to skip it anyway? Geany told me they wanted it to be pushed upstream before integrating it into their code, and on the other hand they can't handle the .ctags / optlib tags...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See geany/geany#3557 .

The .ctags is translated to C. So technically, it is possible to integrate the .ctags based Forth parser into Geany.

Let's see how Geany people say.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@farvardin we got a positive answer from Geany developers introducing an optlib-based parser to Geany.

Could you remove parsers/forth.c ?

If we recognize the optlib-based implementation is not enough, you can open a pull request implementing the parser with crafted-C-code in the future. We can re-implement the parser safely because we have the test case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@masatake ok, I've done it. There was a conflict merge, I hope I haven't deleted some of your code, but it seems fine from my side

optlib/forth.ctags Outdated Show resolved Hide resolved
@masatake masatake mentioned this pull request Sep 11, 2023
@masatake masatake changed the title Forth 1 Forth: new parser Sep 11, 2023
optlib/forth.ctags Outdated Show resolved Hide resolved
optlib/forth.ctags Outdated Show resolved Hide resolved
@masatake
Copy link
Member

Do you know any large (open) source code bases written in Forth.

I would like to add them to https://github.com/universal-ctags/codebase.
So we can evaluate the performance of the parser.

@masatake
Copy link
Member

I push two commits to your branch.

@farvardin
Copy link
Contributor Author

Do you know any large (open) source code bases written in Forth.

I would like to add them to https://github.com/universal-ctags/codebase. So we can evaluate the performance of the parser.

good idea.
Most forth systems are written in forth itself. Here are some open source samples and codes:

https://git.savannah.gnu.org/cgit/gforth.git/tree/
https://git.sr.ht/~vdupras/duskos/tree/master/item/fs
https://gitlab.com/b2495/uf/-/blob/master/uf.f?ref_type=heads
https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/demo/
https://github.com/flagxor/ueforth/tree/main/examples
https://github.com/flagxor/ueforth/tree/main/common

some files are quite small, but others might be good candidates

masatake added a commit to universal-ctags/codebase that referenced this pull request Sep 12, 2023
The repositories are suggested by @farvardin in
universal-ctags/ctags#3812 (comment)

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@masatake
Copy link
Member

Added Forth based source trees to the our codebase.
See universal-ctags/codebase@df32215

@masatake
Copy link
Member

You removed .forth from the map. I guess you mistakenly removed it.
So I will add .forth again. If you really want to remove the file extension, please, make a pull request after I merge this one.

@masatake masatake merged commit 6054593 into universal-ctags:master Sep 14, 2023
41 of 43 checks passed
@masatake
Copy link
Member

Thank you.

@farvardin
Copy link
Contributor Author

@masatake thank you for your help and for this inclusion in ctags!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants