Earlier quoted context omitted.
It's pretty cool. I built a lexer/parser for the p4 language in Lua, with the intention of then building a "runtime" for it out of the Snabb networking toolkit (amusingly, I also finished most of a p4 lexer/parser in Elixir before switching to Lua). I don't think be able to build a full p4 implementation with Snabb running as a substrate (although it's been 6 months since I last worked on it, and am blanking at the m…
Cool stuff! Any reason why you switched to Lua from Elixir and any links to github with the code?
That said, Elixir is an awesome language, and lovely to write lexer/parsers in. I took me only a few hours to build a functioning parser in Elixir, compared to several days to build one in Lua.
The p4 parser/lexer in Lua is here: https://github.com/esbullington/snabbp4
Next step would be to generate the parse graph.