C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Lex--/Yacc--]

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (French)
View previous topic :: View next topic  
Author Message
Erwann
Guest





PostPosted: Thu Jan 22, 2004 4:19 pm    Post subject: [Lex--/Yacc--] Reply with quote



Bonjour,

Je souhaite utiliser Lex & Yacc pour generer directement du C++.
Je suis tombe sur la page de Chrisitan Cholm (http://cholm.home.cern.ch/cholm)
qui propose Lex-- et Yacc--. On peut donc utiliser les include
fournis pour creer des classes C++.

MAlgre la documentation, je n'ai pas trouve d'exemple simple
permettant de creer un petit parser. Les exemples fournis ne
compilent pas (ce sont les tokens NUM et NEWLINE qui ne sont pas
reconnus par le compilateur. Les definitions ont du etre oubliees
qq part).

Si quelqu'un a deja utilise ces outils, j'aimerais bien avoir vos
commentaires.

--
Erwann
Back to top
Jean-Sebastien Mouret
Guest





PostPosted: Thu Jan 22, 2004 8:15 pm    Post subject: Re: [Lex--/Yacc--] Reply with quote



Erwann <ethorava.no.spam (AT) nospam (DOT) enssat.fr> writes:

Quote:
Bonjour,

Je souhaite utiliser Lex & Yacc pour generer directement du C++.
Je suis tombe sur la page de Chrisitan Cholm (http://cholm.home.cern.ch/cholm)
qui propose Lex-- et Yacc--. On peut donc utiliser les include
fournis pour creer des classes C++.

ce que tu demandes est ambigu. s'il s'agit d'avoir une interface c++
aux outils lex et yacc, mieux vaut utiliser flex et bison qui
proposent ceci [1] [2]. si tu veux parser du c++, je te conseille
d'aller faire un tour du cote d'openc++ [3].


[1] http://www.gnu.org/software/flex/manual/html_mono/flex.html#SEC19
[2] http://www.gnu.org/software/bison/manual/html_mono/bison.html#Invocation
[3] http://www.csg.is.titech.ac.jp/~chiba/openc++.html

--
[email]js (AT) mouret (DOT) org[/email]
"creating the future" (c) framfab

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (French) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.