It’s weekend, my country is on lockdown due to covid-19 and I am bored and I want to build a validator.
I am calling it a validator because I dont know the exact terminology for it (parser/linter).
I have a rails app that has a feature that produces a dynamic form by reading a yml file.
- name: Personal Details fields: - name: firstName type: text label: First Name
And it would produce html like
<div> Personal Details </div> <form> <label> First Name </label> <input type="text" name="firstName"> </form>
I want to feed this yml file to my elixir app which will then check if the yml is correct. I mean, let’s say I missed to put
label in the yml file and my elixir app should be able to detect that and warn the user, just like JSON linter.
So, can I use something like nimbel_parsec for this? And what is the right terminology for it(validator/linter/parser)?
The yml file will have to follow proper grammar for it to produce the html, so maybe it’s a parser?
gettext uses yecc