Boost logo

Boost Users :

Subject: [Boost-users] Roughed in Proto2 Spirit parser
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2018-10-31 19:05:42


Hello,

I'm working on a Proto2 Spirit parser. Right now it's really roughed
in. There is no AST at the moment. That's TBD; right now I am focused
on just getting the build to work.

https://gcc.godbolt.org/z/_nBsKi

The code is there, but the compiler driving the web site is choking on Spirit.

I put the rules in up front; probably ambitious on my part, and am
finding an error on:

_range %= _int_lit >> -(lit("to") >> (_int_lit | lit("max"));

Severity Code Description Project File Line Suppression State
Error C1075 '{': no matching token found
Kingdom.OrTools.Sat.Params.Generator g:\source\kingdom
software\kingdom.ortools\standard\src\kingdom.ortools.sat.params.generator\proto_parser.cpp
205

The Proto2 grammar states:

range = intLit [ "to" ( intLit | "max" ) ]

I'm considering pairing it back significantly and building the grammar
up gradually to make sure it all builds. That's probably a sounder
approach anyway.

Eventually I want to build up the AST in such a way as to facilitate
generating some boilerplate adapter code in my target language (C#).

Thoughts?

Best regards,

Michael Powell

https://developers.google.com/protocol-buffers/docs/reference/proto2-spec


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net