quytelda / babel Goto Github PK
View Code? Open in Web Editor NEWRandom sequence generator written in Haskell.
License: GNU General Public License v3.0
Random sequence generator written in Haskell.
License: GNU General Public License v3.0
The program checks too early whether or not the user has provided a grammar file, which is not relevant or expected when asking the program for help or version information. This causes the --version and --help options to exit with an error status.
quytelda@kahja % babel --version
You must provide a grammar file.
Usage: babel [OPTION...] GRAMMAR_FILE
-h --help Display help and usage information.
-n N Generate N different sequences.
-o FILE --output=FILE Redirect output to FILE.
-s SYMBOL --start=SYMBOL Use SYMBOL as the starting symbol ("S" is the default.).
-v --version Display version information.
Babel fails to build using cabal configure && cabal build1
with the error:
src/Main.hs:104:30: Not in scope: ‘<$>’
Issue: when a config file contains multiple lines with the same left hand side (LHS), then the last defined LHS will overwrite all previously defined rules.
How to Replicate: Create a config file with two rules for the same symbol on the LHS, then run babel with that config file. Only the second rule will be seen.
Why this is an issue: For clarity sake on long rules, or for style preference, users may wish to define rules for one symbol across multiple lines.
Problem: When a semicolon is used in a config file, the rest of the config file is not read.
How to replicate: Create a config file with a semicolon somewhere in the middle, run babel with the config file. You will see that all the rules before the semi colon are used, and all the rules afterwards are not.
Why this is a problem: After the first change semi-colons are no longer a syntactically significant, so they should be available as symbols. Especially if a CFG is being constructed for say a language like structure.
Issue:
If a CFG file ends with a new line character, babel will fail with the error:
(line x, column 1):
unexpected end of input
expecting space
where x is 1 + the number of lines in the CFG file.
Steps to replicate:
Reasons this is an issue:
Many common text editors automatically append a new line to text files when they are done being edited.
Potential Solutions:
Check if a line consists of just a newline character and if so skip the parsing step
Strip the newline character off the end of the file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.