forked from phoedos/pmd
[plsql] remove BOM token, skip BOM in parser
This commit is contained in:
@ -227,8 +227,6 @@ PARSER_END(PLSQLParserImpl)
|
||||
*/
|
||||
ASTInput Input() : {}
|
||||
{
|
||||
[<BOM>] // Unicode BOM
|
||||
|
||||
// SRT 2011-04-17 This syntax breaks the parser when fields of record.attach* are referenced (attachLibrary())*
|
||||
(
|
||||
(LOOKAHEAD(7) PackageSpecification()
|
||||
@ -4505,7 +4503,6 @@ void AlterTrigger() :
|
||||
// Copyright (C) 2002 Albert Tumanov
|
||||
|
||||
/* WHITE SPACE */
|
||||
TOKEN : { <BOM: "\ufeff" > }
|
||||
|
||||
SKIP :
|
||||
{
|
||||
|
@ -30,6 +30,11 @@ public class PLSQLParser extends JjtreeParserAdapter<ASTInput> {
|
||||
return new JavaccTokenDocument(fullText);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ASTInput parse(String fileName, Reader source) throws ParseException {
|
||||
return super.parse(fileName, IOUtil.skipBOM(source));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ASTInput parseImpl(CharStream cs, ParserOptions options) throws ParseException {
|
||||
return new PLSQLParserImpl(cs).Input();
|
||||
|
Reference in New Issue
Block a user