Leading underscores in identifiers in .fbs

33 views
Skip to first unread message

Stephen Schwink

unread,
Jun 8, 2015, 9:31:35 PM6/8/15
to flatb...@googlegroups.com
In the FBS formal grammar, what does "ident" mean?

I would like to parse JSON in which field names may begin with a leading underscore, like {"_foo": true}.

To do this, I have a .fbs containing a declaration like this:

table FooTable {

  _foo:bool;

}


Unfortunately, the parser complains when I load this schema via flatbuffers::LoadFile:

error: illegal character: _


Any guidance on what identifiers are supported in the schema?


Thanks

Wouter van Oortmerssen

unread,
Jun 10, 2015, 1:17:20 PM6/10/15
to Stephen Schwink, flatb...@googlegroups.com
That is an oversight, will fix. Underscores are currently supported anywhere but at the start.


--
You received this message because you are subscribed to the Google Groups "FlatBuffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flatbuffers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stephen Schwink

unread,
Jun 10, 2015, 4:53:02 PM6/10/15
to flatb...@googlegroups.com, stephen...@gmail.com
Awesome, thank you!

Wouter van Oortmerssen

unread,
Jun 15, 2015, 4:10:31 PM6/15/15
to Stephen Schwink, flatb...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages