Chinaunix首页 | 论坛 | 博客
  • 博客访问: 916559
  • 博文数量: 380
  • 博客积分: 3495
  • 博客等级: 中校
  • 技术积分: 3996
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-02 09:35
文章分类

全部博文(380)

文章存档

2015年(2)

2014年(5)

2013年(9)

2012年(9)

2011年(67)

2010年(103)

2009年(182)

2008年(3)

我的朋友

分类: Java

2009-06-09 20:09:43

JAVACC的语法树定义如下:
::=


"PARSER_BEGIN" "(" ")"


java_compilation_unit


"PARSER_END" "(" ")"


( )*



::= [ "" "{" ( )* "}" ]

::= "LOOKAHEAD" "=" java_integer_literal ";"

| "CHOICE_AMBIGUITY_CHECK" "=" java_integer_literal ";"

| "OTHER_AMBIGUITY_CHECK" "=" java_integer_literal ";"

| "STATIC" "=" java_boolean_literal ";"

| "DEBUG_PARSER" "=" java_boolean_literal ";"

| "DEBUG_LOOKAHEAD" "=" java_boolean_literal ";"

| "DEBUG_TOKEN_MANAGER" "=" java_boolean_literal ";"

| "ERROR_REPORTING" "=" java_boolean_literal ";"

| "JAVA_UNICODE_ESCAPE" "=" java_boolean_literal ";"

| "UNICODE_INPUT" "=" java_boolean_literal ";"

| "IGNORE_CASE" "=" java_boolean_literal ";"

| "USER_TOKEN_MANAGER" "=" java_boolean_literal ";"

| "USER_CHAR_STREAM" "=" java_boolean_literal ";"

| "BUILD_PARSER" "=" java_boolean_literal ";"

| "BUILD_TOKEN_MANAGER" "=" java_boolean_literal ";"

| "TOKEN_EXTENDS" "=" java_string_literal ";"

| "TOKEN_FACTORY" "=" java_string_literal ";"

| "TOKEN_MANAGER_USES_PARSER" "=" java_boolean_literal ";"

| "SANITY_CHECK" "=" java_boolean_literal ";"

| "FORCE_LA_CHECK" "=" java_boolean_literal ";"

| "COMMON_TOKEN_ACTION" "=" java_boolean_literal ";"

| "CACHE_TOKENS" "=" java_boolean_literal ";"

| "OUTPUT_DIRECTORY" "=" java_string_literal ";"


::=

|

|

|
::= ""


java_access_modifier java_return_type java_identifier "(" java_parameter_list ")"


java_block
::= [ ]


[ "[" "IGNORE_CASE" "]" ] ":"


"{" ( "|" )* "}"

::= java_access_modifier java_return_type java_identifier "(" java_parameter_list ")" ":"


java_block


"{" "}"

::= "" ":" java_block




阅读(692) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~