freeDiameter中的extensions配置都采用YACC and lex方式。
以下记录两个入门介绍网址:
IBM的tutorial:
http://www.ibm.com/developerworks/cn/linux/sdk/lex/index.html
Lex and YACC primer: written by a man named bert hubert
http://www.360doc.com/content/09/0303/11/28217_2695975.shtml
编译命令:
lex example1.l
cc lex.yy.c -o example1 -ll
lex example4.l
yacc -d example 4.y
cc lex.yy.c y.tab.c -o example4