You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have to write/maintain formal grammar for fastn. We may not be able to do it by lalrpop. So we have to manually do it. We have to pick the language. BNF and EBNF is the "standard". But I have recently come across dogma, which is:
Dogma is a human-friendly metalanguage for describing data formats (text or binary) in documentation.
Dogma follows the familiar patterns of Backus-Naur Form, with a number of innovations that make it also suitable for describing binary data.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We have to write/maintain formal grammar for fastn. We may not be able to do it by lalrpop. So we have to manually do it. We have to pick the language. BNF and EBNF is the "standard". But I have recently come across dogma, which is:
It allows for more expressive grammar using variables, macros, and function definitions.
Consider this grammar:
Here
dot1q_frame
istag_control_info
followed byether_type
, which is captured by nameetype
, and is referenced later on in the grammar.I do not thing we can do such things with BNF alone. Does it make sense for us?
Beta Was this translation helpful? Give feedback.
All reactions