From: "Mido" <[email protected]> >> Date: October 14, 2009 2:57:49 PM PDT >> To: <[email protected]> >> Subject: [Tinyos-help] NesC Parser or Grammar >> >> Dear All, >> >> >> I need a NesC parser. >> Is there a grammar or a parser for TinyOS 2.1 nesC 1.3.0-1?
The obvious way to get one is to extract the one from the nesC compiler source code, at http://sf.net/projects/nescc. The grammar itself (written with bison) is at http://nescc.cvs.sourceforge.net/viewvc/nescc/nesc/src/c-parse.y?revision=1.64&view=markup You probably would want to look at other stuff too (e.g. the lexer, c-lex.c) so it's probably best to get the whole source distribution from http://sourceforge.net/projects/nescc/develop (CVS) or http://sourceforge.net/projects/nescc/files/ (tarballs) David Gay PS: The reference manual includes a grammar for nesC as changes from the regular C grammar, so you could in theory use that. However, actual TinyOS programs use some gcc extensions, and the C header files on most TinyOS programs use more gcc extensions, so using the grammar in the nesC implementation is a better place to start... _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
