Jiangtang's profile技止于此BlogListsNetwork Tools Help

Blog


    11/23/2007

    BNF标记法:简介

    Backus-Naur Form,巴克斯-诺尔形式

    你经常看到类似下面的语法说明:

    PROC FREQ < options > ;
    BY variables ;
    EXACT statistic-options < / computation-options > ;
    OUTPUT < OUT=SAS-data-set > options ;
    TABLES requests < / options > ;
    TEST options ;
    WEIGHT variable < / option > ;

    这些类似的标记就称作Fackus-Naur Form,简称BNF,是John Backus和Peter Naur为每一种编程语言设计的语法规则标记符号。 这套标记法非常复杂,一般掌握下面的一个超级简化版本就可以了:

     

    符号 含义
    <> 包含术语,必选项
    | 分隔可选项(互斥OR)
    [] 可选项
    {} 指出至少需要一个必须项
    ,... 指出可以可选地被重复多次的项目

     

    Technorati Tags: , ,

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://johnthu.spaces.live.com/blog/cns!2053CD511E6D5B1E!339.trak
    Weblogs that reference this entry
    • None