Comments (4)
I have slightly reworded some parts of that section, but I don't think that's what you mean.
Background: When using special separator characters, you need a way to "protect" verbatim parts of your input string. For example, when a separator appears inside a quoted string, you want to keep the quoted string as a verbatim string, and do not want to mess with separation. Same with parentheses: Imagine a fictional programming language function call: function_name(arg1, another_function(foo, bar), arg3)
. When comma-splitting the content of the outer parens, you would not want to let your parser split foo
and bar
, as they are inside a "protected" scope.
As separating parts of a rule is done from the outside to the inside, the parser must be aware of (nested) parens and keep their content together, so that the rule is split correctly.
For KiVar: If the parser would not do this, the spaces inside a choice definition would be used to split the rule definition into its sections. E.g. asp ch1(value -!)
would be separated into asp
, ch1(value
and -!)
.
To answer your question: The outcome of how you have used the parens is a side-effect without a use-case.
Hope this explains it.
Anyway, if you find the documentation misleading, please point me to the exact part which confuses you.
There will be so much to be updated in the documentation once I got all my current plans implemented. 😄
from kivar.
Ah, I think I know what you mean. Yes, you are right, it may be misleading. Special characters are only protected inside inner unresolved parens. It's more an implementation detail, and expected by the user anyway. I'll change this into a less prominent side-note (when reworking the docs).
I'll keep this issue to remind me. 😄
from kivar.
Nevermind. Just removed the stuff about the parens.
They do not belong into the list anyways. Because the difference between quoting/escaping and the parens is: The quoting and escaping is virtual (it gets removed by the parser and is not part of the result), whereas parens are kept, they just protect their content as a side-effect.
So, this must have been the part that confused you. Sorry.
Is this issue resolved for you?
from kivar.
Thanks for explanation. Outcome for me is, that parentheses are not intended for any other use than choice(value)
. Because documentation of KiVar is one of the best I have seen on github, I was curious, if it is mistake or intention with some feature behind.
from kivar.
Related Issues (20)
- Add deep rule ambiguity check
- Allthough identical rules are formulated, one Component does not react as the others HOT 3
- footprint visibility when populating/unpopulating HOT 5
- Enable/disable solder paste per footprint HOT 2
- KiVar 0.1.2: No rule definitions found - kivar-demo HOT 1
- New plugin icon
- kivar-cli: Script does not read KiVar.Rule HOT 4
- Add rules migration hint to plugin
- Add a release series maintenance branch for v0.2.x HOT 1
- Create own PCM repo for pre-releases HOT 1
- How to install KiVar from actual repository state HOT 6
- link to migrate does not work + migrate part of the docs not present HOT 1
- Can I have multiple attribute change by a selected variant? HOT 4
- KiVar warn about legacy rules only if there are no rules in new format HOT 4
- Add colored output support for CLI application
- Add output file option to avoid overwriting original board HOT 1
- Update documentation for 0.3.0
- Allow creating new choice definitions with aux rules, too HOT 1
- RFC: Introduce reserved "?" Choice name, which only applies to undefined Choices HOT 1
- Action Plugin doesn't work on macOS (13.6.9) HOT 11
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.
from kivar.