" JavaCC syntax file
" Language:	JavaCC, a Java Compiler Compiler written by JavaSoft
" Maintainer:	Claudio Fleiner <fleiner@acm.org>
" Last change:	1997 May 14

" Uses java.vim, and adds a few special things for JavaCC Parser files.
" Those files usually have the extension  *.jj

source $VIM/syntax/java.vim

syntax keyword javaccPackages options DEBUG_PARSER DEBUG_LOOKAHED DEBUG_TOKEN_MANAGER
syntax keyword javaccPackages COMMON_TOKEN_ACTION IGNORE_CASE CHOICE_AMBIGUITY_CHECK
syntax keyword javaccPackages OTHER_AMBIGUITY_CHECK STATIC LOOKAHEAD ERROR_REPORTING 
syntax keyword javaccPackages USER_TOKEN_MANAGER  USER_CHAR_STREAM JAVA_UNICODE_ESCAPE
syntax keyword javaccPackages UNICODE_INPUT
syntax match javaccPackages "PARSER_END([^)]*)"
syntax match javaccPackages "PARSER_BEGIN([^)]*)"
syntax match javaccSpecToken "<EOF>"
" the dot is necessary as otherwise it will be matched as a keyword.
syntax match javaccSpecToken ".LOOKAHEAD("s+1e-1
syntax match javaccToken "<[^> 	]*>"
syntax keyword javaccActionToken TOKEN SKIP MORE SPECIAL_TOKEN
syntax keyword javaccError DEBUG IGNORE_IN_BNF

highlight link javaccSpecToken Statement
highlight link javaccActionToken Type
highlight link javaccPackages javaScopeDecl
highlight link javaccToken String
highlight link javaccError Error
