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

[various grammars] Missing and misplaced grammar input tests #4247

Open
kaby76 opened this issue Sep 18, 2024 · 0 comments
Open

[various grammars] Missing and misplaced grammar input tests #4247

kaby76 opened this issue Sep 18, 2024 · 0 comments

Comments

@kaby76
Copy link
Contributor

kaby76 commented Sep 18, 2024

After noticing the http grammar not placing some test inputs in a directory called example/, I wrote a script to go through all the grammars and find missing examples/ directories.

09/18-04:23:13 ~/issues/g4-current
$ for desc in `find . -name desc.xml | grep -v Generated`; do dir=`dirname $desc`; if [ ! -d $dir/examples ]; then echo $dir; ls $dir; fi; done
./apt
apt.g4  desc.xml  pom.xml
./argus
argus.g4  argus-manual.pdf  desc.xml  pom.xml  README.md
./asm/masm
desc.xml  MASM.g4  pom.xml  README.md
./atl
ATL.g4  desc.xml  pom.xml
./bcl
bcl.g4  desc.xml  pom.xml  README.md
./cayenne
cayenne.g4  desc.xml  pom.xml  README.md
./dcm
DCM_2_0_grammar.g4  desc.xml  pom.xml  README.md
./esolang/dgol
desc.xml  dgol.g4  pom.xml  README.md
./fusion-tables
desc.xml  FusionTablesSql.g4  pom.xml  README.md
./graphql
desc.xml  GraphQL.g4  pom.xml
./http
desc.xml  http.g4  pom.xml  target/  test.http  testHeader.http
./hypertalk
desc.xml  example-scriptlets/  example-scripts/  HyperTalk.g4  pom.xml  README.md
./infosapient
desc.xml  infosapient.g4  pom.xml  README.md
./joss
desc.xml  joss.g4  pom.xml  README.md
./kirikiri-tjs
CSharp/   example/  Java/        LICENSE        pom.xml        README.md    TJSParser.g4
desc.xml  Go/       JavaScript/  non-standard/  preprocess.js  TJSLexer.g4  TypeScript/
./lisp
desc.xml  lisp.g4  pom.xml  README.md
./pddl
desc.xml  Pddl.g4  pom.xml  README.md
./plucid
desc.xml  plucid.g4  pom.xml  README.md
./pmmn
desc.xml  PMMN.g4  pom.xml  README.md
./powerbuilderdw
desc.xml  example/  pom.xml  PowerBuilderDWLexer.g4  PowerBuilderDWParser.g4  README.md
./powerquery
desc.xml  example/  pom.xml  PowerQueryLexer.g4  PowerQueryParser.g4  README.md
./python/python2
desc.xml  pom.xml  Python2.g4
./python/python2-js
desc.xml  pom.xml  Python2.g4  readme.md  test.js
./python/python3
Cpp/     Dart/     Go/    JavaScript/  pom.xml   Python3Lexer.g4   README.md  test-parser.sh
CSharp/  desc.xml  Java/  large/       Python3/  Python3Parser.g4  small/     TypeScript/
./rcs
desc.xml  pom.xml  RCS.g4  README.md
./restructuredtext
desc.xml  pom.xml  README.md  ReStructuredText.g4
./rfc3080
beep.g4  desc.xml  pom.xml  README.md
./sharc
desc.xml  pom.xml  README.md  SHARCLexer.g4  SHARCParser.g4
./solidity
desc.xml  pom.xml  Solidity.g4  test.sol
./sql/mysql/Oracle
desc.xml  MySQLLexer.g4  MySQLParser.g4  pom.xml  README.md  TypeScript/
./stacktrace
desc.xml  pom.xml  StackTrace.g4
./stl
desc.xml  pom.xml  STL.g4
./tl
desc.xml  pom.xml  README.md  tl.g4
./turtle-doc
desc.xml  pom.xml  turtle.g4
./unicode/unicode16
classify.g4  desc.xml  pom.xml
09/18-04:23:35 ~/issues/g4-current

Scanning the output quickly, I notice some misplaced tests for these grammars.

  • http -- tests *.http not in examples/
  • kirikiri-tjs -- directory called "example" not "examples"
  • powerbuilder -- directory called "example" not "examples"
  • powerquery -- directory called "example" not "examples"
  • python/python2-js -- test.js not in examples/. In fact, the readme notes that test.js does not parse. Why in the world does this grammar exist when we have one that works?
  • solidity -- test.sol not in examples/

Two recently added grammars, which are for popular programming languages, are sql/mysql/Oracle and graphql (not to be confused with GQL). Neither of these grammar have test inputs!

graphql has no readme.md.

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

1 participant