Hi,

javamonn has left the following comment at Create a flex+bison tutorial http://www.google-melange.com/gci/task/view/google/gci2012/7985245:


Some notes:


To avoid confusion, these are the files that are ready for review: Bison_Flex_Tutorial.txt, calculator.lex, and calculator2.yacc. I missed a small formatting issue on the original upload of calculator.yacc so I fixed it and reuploaded.

The tutorial has been edited to include a section on compiling and running the calculator. I also reworked a large portion of the rules section of the lex file, instead of simply returning operators and parenthesis, they are now returned as tokens to better illustrate that concept.

The point of the [ \t] rule is so the calculator can pick up different ways of formatting input. If a user wants to seperate numbers and operators with spaces, the lexer will match the spaces and perform no action when it finds one. Without this rule those spaces and tabs would get echoed back out since Flex sees it as a lack of comprehensive token definitions.

Let me know if there are any other issues or changes you would like me to fix/change.

Thanks,

Daniel


Greetings,
The Google Open Source Programs Team


---
You are receiving this message because you are subscribed to Create a flex+bison tutorial. To stop receiving these messages, go to: http://www.google-melange.com/gci/task/view/google/gci2012/7985245.

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
BRL-CAD Tracker mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-tracker

Reply via email to