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

new Grammer #4379

Open
HanzoDev1375 opened this issue Jan 10, 2025 · 7 comments
Open

new Grammer #4379

HanzoDev1375 opened this issue Jan 10, 2025 · 7 comments

Comments

@HanzoDev1375
Copy link

hi can you adding javacc grammer?

@kaby76
Copy link
Contributor

kaby76 commented Jan 10, 2025

I think I have an implementation (https://github.com/kaby76/Trash/blob/27ba68edb3722c284061cc2dca5c5a68410ae0f3/src/grammars/javacc/Generated-CSharp/Javacc.g4) but it's been awhile since I checked it.

@HanzoDev1375
Copy link
Author

فکر می‌کنم یک پیاده‌سازی دارم ( https://github.com/kaby76/Trash/blob/27ba68edb3722c284061cc2dca5c5a68410ae0f3/src/grammars/javacc/Generated-CSharp/Javacc.g4 ) اما آن را بررسی کردم.
image

Yes, I use it, but it doesn't have good analytics.

@kaby76
Copy link
Contributor

kaby76 commented Jan 10, 2025

If you attach the file PHP.jj I can check how it is parsed. I can't work with pictures. I need text files.

@HanzoDev1375
Copy link
Author

If you attach the file PHP.jj I can check how it is parsed. I can't work with pictures. I need text files.

PHP.jj.txt
@kaby76 using

@kaby76
Copy link
Contributor

kaby76 commented Jan 12, 2025

PHP.jj parses fine. So, I am not sure what you mean by "Yes, I use it, but it doesn't have good analytics." If PHP.jj parses fine, what is the problem?

I can't remember exactly the source of the javacc grammar in Antlr, but I thought that I translated directly by hand from the javacc grammar in javacc (https://github.com/javacc/javacc/blob/50a95965a86f59e7d843587b1ce55b5647d00f4e/src/main/javacc/JavaCC.jj). So, all the terminology for the grammar are in javacc nonterminals and terminals in the formal grammar vocubulary.

@HanzoDev1375
Copy link
Author

PHP.jj parses fine. So, I am not sure what you mean by "Yes, I use it, but it doesn't have good analytics." If PHP.jj parses fine, what is the problem?

I can't remember exactly the source of the javacc grammar in Antlr, but I thought that I translated directly by hand from the javacc grammar in javacc (https://github.com/javacc/javacc/blob/50a95965a86f59e7d843587b1ce55b5647d00f4e/src/main/javacc/JavaCC.jj). So, all the terminology for the grammar are in javacc nonterminals and terminals in the formal grammar vocubulary.

I think javacc is the same as Java but with a new set of rules, so I'm waiting for you to redesign the Java grammar.

@kaby76
Copy link
Contributor

kaby76 commented Jan 12, 2025

I think javacc is the same as Java but with a new set of rules...

Javacc is a meta-programming language. Examples of meta-programming languages are BNF, Antlr, ABNF, Yacc/Bison, Lark, Pest, Pegen, etc. These are languages used to specify a formal grammar, a four tuple of terminals, nonterminals, rules (with left hand side symbol(s)) and right-hand side regular expressions, and start symbol(s). Java is a general-purpose programming language, not a meta-programming language. It does not specify formal grammars. We already have various versions of the java grammar, e.g., optimized, non-optimized from the Java Language Spec.

The javacc grammar parses PHP.jj. So, I am not sure what you are getting at.

kaby76 added a commit to kaby76/grammars-v4 that referenced this issue Jan 12, 2025
teverett pushed a commit that referenced this issue Jan 17, 2025
* Remove dotnet install.

Assume dotnet exists and is on path in all VMs. This is because setup-dotnet does not work.

* Fix for #4379 -- javacc.

* Fix Go target build.

* Remove PHP target. I just does not work (in this case, memory overflow).

* Create readme.md

* Update pom.xml's to support old-style testing.
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

No branches or pull requests

2 participants