This repository found at https://github.com/yaml/yaml contains information and pointers to all things YAML.
yaml-grammar's Introduction
yaml-grammar's People
Forkers
martinlocklear joventuraz zkry graycarl stayyule william3johnson inferno-inc kimyknowsbest80 wengerchan seanpm2001 hpcmtintyaml-grammar's Issues
Names for Rules Variables are difficult to understand in context
The spec describes 4 rule variables, n
, m
, c
, and t
.
yaml-grammar/yaml-spec-1.2.yaml
Line 91 in 1504782
yaml-grammar/yaml-spec-1.2.yaml
Line 93 in 1504782
yaml-grammar/yaml-spec-1.2.yaml
Line 95 in 1504782
yaml-grammar/yaml-spec-1.2.yaml
Line 103 in 1504782
I find a terse, single letter, variable in the spec difficult for two reasons:
- When looking at the rules, it is difficult to remember what each letter means. If the variables were named with a brief summary of the actual value, it would be easier to remember the actual meaning.
- The short names make searching for usages impossible. If the names were distinct, then it would be possible to quickly find usages and the definition.
I would find the spec easier to understand if the names were more descriptive. For example:
n
—currentIndent
m
—additionalIndent
c
—currentContext
t
—whitespaceTrim
Rule prefix length - 1 or 2 characters, or more?
The spec says each rule name has a "1 or 2 character prefix".
yaml-grammar/yaml-spec-1.2.yaml
Line 57 in 1504782
However, some rules have more than 2 characters. For example, rule 062 c-ns-esc-char
has 4 chars: c-ns
.
Rule 201 seq-spaces
appears to have no prefix.
Updating the rule names seems difficult. Perhaps the description should be updated to describe the possible prefixes?
Description for rule prefixes mentions, but does not define, `n`
The description for some of the rule prefixes mention an n
variable.
yaml-grammar/yaml-spec-1.2.yaml
Lines 78 to 82 in 1504782
However, it is not clear what n
is.
Is n
supposed to be the current indentation level? So the rule could be read as "where indentation is greater than the current indentation level"? In which case, isn't this always false?
It would be helpful if n
was explicitly defined, with an example (or a link to an example).
Dangling rules
Hi,
Thank you for this effort. Having this extracted grammar is much more convenient for processing.
Would you please clarify why are there "dangling rules" in the grammar - the rules that are defined but not referred from anywhere.
For example rule [008] "c-sequence-start" is never used.
Thank you,
Serge
README links broken
Multiple README links are broken.
Duplicated description for `<` and `<=` comparator rule functions
The rules for both <
and <=
both say First argument is less than the second.
yaml-grammar/yaml-spec-1.2.yaml
Lines 257 to 261 in 1504782
I presume this is a mistake, and it should be:
# * (<)
# First argument is less than the second.
#
# * (<=)
- # First argument is less than the second.
+ # First argument is less than or equal to the second.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.