grammars-v4
grammars-v4 copied to clipboard
[various grammars] Missing and misplaced grammar input tests
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.