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

Create README.md #3370

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Create README.md #3370

wants to merge 1 commit into from

Conversation

kevinlano
Copy link
Contributor

Copy link
Member

@KvanTTT KvanTTT left a comment

Choose a reason for hiding this comment

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

Hi. Could you exlain why this file is required? It contains obvious description and other examples directories don't have such file.

@kaby76
Copy link
Contributor

kaby76 commented May 4, 2023

This file will interfere with testing because all files, except those with .tree or .errors extension, are input files to be parsed. The .md is not input! The readme.md file should be in the root dirctory for the grammar. This change must be collected with all the other files in the several other PRs (#3356 #3357) with single file additions and/or single commits for the new grammar in one PR. Please collect all files into one git commit. To test, copy a basic desc.xml to the new grammar directory.

@kaby76
Copy link
Contributor

kaby76 commented May 5, 2023

@kevinlano Your fork of https://github.com/antlr/grammars-v4 is 800+ commits behind the current state of the repo, about a year old.

Maybe you can just update to the latest?? Here is a bash script that I've tested that brings everything up to date, merges the three PRs into one, and leaves it in a state on your machine where you can push master and add-cgtl (the branch with the merge set of files changed) back to origin.

#
set -x
set -e
mkdir kevin
cd kevin
git clone https://github.com/kevinlano/grammars-v4 merged
git clone https://github.com/kevinlano/grammars-v4 oldstuff
cd merged
git remote add upstream https://github.com/antlr/grammars-v4.git
git pull upstream master
# git push origin master
cd ../oldstuff
git checkout patch-17
cp -r cgtl/ ../merged/
git checkout patch-18
cp -r cgtl/CGTLLexer.g4 ../merged/cgtl/
# ignore example/readme.md since it adds no value.
cd ../merged/cgtl
mkdir examples
cd examples/
wget https://github.com/antlr/grammars-v4/files/11398935/cgtlexample1.txt
wget https://github.com/antlr/grammars-v4/files/11398938/cgtlexample2.txt
wget https://github.com/antlr/grammars-v4/files/11398937/cgtlexample3.txt
wget https://github.com/antlr/grammars-v4/files/11398936/cgtlexample4.txt
cd ..
cp ../abb/desc.xml .
git branch add-cgtl
git checkout add-cgtl
git status
git add CGTLLexer.g4
git add CGTLParser.g4
git add desc.xml
git add examples/*.txt
git commit -m "Adding cgtl grammar."
# git push origin add-cgtl
cd ..
cd ..
rm -rf oldstuff

There's some "symbol conflicts" for some of the platforms (Dart, Go, PHP, Python3), so you might want to remove those from the desc.xml.

Nice to see another template engine for Antlr.

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

3 participants