Generates BNF documentation from a grammar.
47 | 48 | 49 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/jjtree/ASTBNFDeclaration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.jjtree; 35 | 36 | public class ASTBNFDeclaration extends JJTreeNode 37 | { 38 | NodeScope m_node_scope; 39 | 40 | ASTBNFDeclaration (final int nID) 41 | { 42 | super (nID); 43 | } 44 | 45 | /** Accept the visitor. **/ 46 | @Override 47 | public Object jjtAccept (final JJTreeParserVisitor visitor, final Object data) 48 | { 49 | return visitor.visit (this, data); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/jjtree/ASTBNFNodeScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.jjtree; 35 | 36 | public class ASTBNFNodeScope extends JJTreeNode 37 | { 38 | NodeScope m_node_scope; 39 | JJTreeNode m_expansion_unit; 40 | 41 | ASTBNFNodeScope (final int nID) 42 | { 43 | super (nID); 44 | } 45 | 46 | /** Accept the visitor. **/ 47 | @Override 48 | public Object jjtAccept (final JJTreeParserVisitor visitor, final Object data) 49 | { 50 | return visitor.visit (this, data); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/jjtree/ASTCompilationUnit.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.jjtree; 35 | 36 | public class ASTCompilationUnit extends JJTreeNode 37 | { 38 | ASTCompilationUnit (final int nID) 39 | { 40 | super (nID); 41 | } 42 | 43 | @Override 44 | public Object jjtAccept (final JJTreeParserVisitor visitor, final Object data) 45 | { 46 | return visitor.visit (this, data); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/jjtree/ASTExpansionNodeScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.jjtree; 35 | 36 | public class ASTExpansionNodeScope extends JJTreeNode 37 | { 38 | NodeScope m_node_scope; 39 | JJTreeNode m_expansion_unit; 40 | 41 | ASTExpansionNodeScope (final int nID) 42 | { 43 | super (nID); 44 | } 45 | 46 | /** Accept the visitor. **/ 47 | @Override 48 | public Object jjtAccept (final JJTreeParserVisitor visitor, final Object data) 49 | { 50 | return visitor.visit (this, data); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/jjtree/ASTJavacode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.jjtree; 35 | 36 | public class ASTJavacode extends ASTProduction 37 | { 38 | Token stmBeginLoc; 39 | 40 | ASTJavacode (final int nID) 41 | { 42 | super (nID); 43 | } 44 | 45 | /** Accept the visitor. **/ 46 | @Override 47 | public Object jjtAccept (final JJTreeParserVisitor visitor, final Object data) 48 | { 49 | return visitor.visit (this, data); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/jjtree/ASTJavacodeBody.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.jjtree; 35 | 36 | public class ASTJavacodeBody extends JJTreeNode 37 | { 38 | NodeScope m_node_scope; 39 | 40 | ASTJavacodeBody (final int nID) 41 | { 42 | super (nID); 43 | } 44 | 45 | /** Accept the visitor. **/ 46 | @Override 47 | public Object jjtAccept (final JJTreeParserVisitor visitor, final Object data) 48 | { 49 | return visitor.visit (this, data); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/jjtree/ASTLHS.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.jjtree; 35 | 36 | public class ASTLHS extends JJTreeNode 37 | { 38 | ASTLHS (final int nID) 39 | { 40 | super (nID); 41 | } 42 | 43 | @Override 44 | public Object jjtAccept (final JJTreeParserVisitor visitor, final Object data) 45 | { 46 | return visitor.visit (this, data); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/jjtree/ASTNodeDescriptorExpression.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.jjtree; 35 | 36 | public class ASTNodeDescriptorExpression extends JJTreeNode 37 | { 38 | ASTNodeDescriptorExpression (final int nID) 39 | { 40 | super (nID); 41 | } 42 | 43 | @Override 44 | String translateImage (final Token t) 45 | { 46 | return whiteOut (t); 47 | } 48 | 49 | /** Accept the visitor. **/ 50 | @Override 51 | public Object jjtAccept (final JJTreeParserVisitor visitor, final Object data) 52 | { 53 | return visitor.visit (this, data); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/jjtree/ASTOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.jjtree; 35 | 36 | public class ASTOptions extends JJTreeNode 37 | { 38 | public ASTOptions (final int nID) 39 | { 40 | super (nID); 41 | } 42 | 43 | /** Accept the visitor. **/ 44 | @Override 45 | public Object jjtAccept (final JJTreeParserVisitor visitor, final Object data) 46 | { 47 | return visitor.visit (this, data); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/jjtree/Main.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.jjtree; 35 | 36 | import com.helger.base.state.ESuccess; 37 | 38 | /** 39 | * Entry point. 40 | */ 41 | public final class Main 42 | { 43 | private Main () 44 | {} 45 | 46 | public static void main (final String args[]) 47 | { 48 | final JJTree jjtree = new JJTree (); 49 | final ESuccess eSuccess = jjtree.main (args); 50 | System.exit (eSuccess.isFailure () ? 1 : 0); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/jjtree/package.html: -------------------------------------------------------------------------------- 1 | 2 | 37 | 39 | 40 | 41 | 43 |A tree generator.
47 | 48 | 49 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/output/UnsupportedOutputLanguageException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.output; 35 | 36 | import jakarta.annotation.Nonnull; 37 | 38 | public class UnsupportedOutputLanguageException extends RuntimeException 39 | { 40 | public UnsupportedOutputLanguageException (@Nonnull final EOutputLanguage eOutputLanguage) 41 | { 42 | super ("Unsupported output language: " + eOutputLanguage); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/package.html: -------------------------------------------------------------------------------- 1 | 2 | 37 | 39 | 40 | 41 | 43 |A tree, grammar and lexer generator and a documentation generator.
47 | 48 | 49 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/parser/CodeProductionCpp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.parser; 35 | 36 | /** 37 | * Describes CPPCODE productions. 38 | */ 39 | public class CodeProductionCpp extends AbstractCodeProduction 40 | {} 41 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/parser/CodeProductionJava.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.parser; 35 | 36 | /** 37 | * Describes JAVACODE productions. 38 | */ 39 | public class CodeProductionJava extends AbstractCodeProduction 40 | {} 41 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/parser/Container.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.parser; 35 | 36 | /** 37 | * An object container. Used to pass references to objects as parameter. 38 | */ 39 | 40 | public final class Container 41 | { 42 | public Object member; 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/parser/ETokenKind.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.parser; 35 | 36 | /** 37 | * Definitions of constants that identify the kind of regular expression 38 | * production this is. 39 | * 40 | * @author Philip Helger 41 | * @since 1.1.0 42 | */ 43 | public enum ETokenKind 44 | { 45 | TOKEN, 46 | SKIP, 47 | MORE, 48 | SPECIAL; 49 | 50 | public String getImage () 51 | { 52 | return name (); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/parser/MatchInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.parser; 35 | 36 | /** 37 | * Describes a match, within a given lookahead. 38 | */ 39 | public class MatchInfo 40 | { 41 | public static int s_laLimit; 42 | 43 | int [] m_match = new int [s_laLimit]; 44 | int m_firstFreeLoc; 45 | 46 | public static void reInitStatic () 47 | { 48 | s_laLimit = 0; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/parser/MetaParseException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.parser; 35 | 36 | /** 37 | * Thrown when there is a mis-configuration or a bug. 38 | */ 39 | public class MetaParseException extends ParseException 40 | { 41 | public MetaParseException (final String sMsg) 42 | { 43 | super (sMsg); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/parser/ParserData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.parser; 35 | 36 | import java.util.List; 37 | import java.util.Map; 38 | 39 | public class ParserData 40 | { 41 | public enum LookaheadType 42 | { 43 | TOKEN, 44 | PRODUCTION, 45 | SEQUENCE, 46 | CHOICE, 47 | ZERORORMORE 48 | } 49 | 50 | public static class LookaheadInfo 51 | { 52 | public LookaheadType lokaheadType; 53 | public ListA grammar and lexer generator.
47 | 48 | 49 | -------------------------------------------------------------------------------- /src/main/java/com/helger/pgcc/utils/EOptionType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | * 4 | * Copyright 2011 Google Inc. All Rights Reserved. 5 | * Author: sreeni@google.com (Sreeni Viswanadha) 6 | * 7 | * Copyright (c) 2006, Sun Microsystems, Inc. 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * 13 | * * Redistributions of source code must retain the above copyright notice, 14 | * this list of conditions and the following disclaimer. 15 | * * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | * contributors may be used to endorse or promote products derived from 20 | * this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | * THE POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | package com.helger.pgcc.utils; 35 | 36 | /** 37 | * @author Chris Ainsley 38 | */ 39 | public enum EOptionType 40 | { 41 | BOOLEAN, 42 | INTEGER, 43 | STRING, 44 | OTHER; 45 | } 46 | -------------------------------------------------------------------------------- /src/main/resources/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017-2018 Philip Helger, pgcc@helger.com 2 | 3 | Copyright 2011 Google Inc. All Rights Reserved. 4 | Author: sreeni@google.com (Sreeni Viswanadha) 5 | 6 | Copyright (c) 2006, Sun Microsystems, Inc. 7 | All rights reserved. 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, 13 | this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | * Neither the name of the Sun Microsystems, Inc. nor the names of its 18 | contributors may be used to endorse or promote products derived from 19 | this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 25 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 | THE POSSIBILITY OF SUCH DAMAGE. 32 | -------------------------------------------------------------------------------- /src/main/resources/NOTICE: -------------------------------------------------------------------------------- 1 | ============================================================================= 2 | = NOTICE file corresponding to section 4d of the Apache License Version 2.0 = 3 | ============================================================================= 4 | This product includes Open Source Software developed by 5 | Philip Helger - https://www.helger.com/ 6 | -------------------------------------------------------------------------------- /src/main/resources/pgcc-version.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017-2025 Philip Helger, pgcc@helger.com 3 | # 4 | # Copyright 2011 Google Inc. All Rights Reserved. 5 | # Author: sreeni@google.com (Sreeni Viswanadha) 6 | # 7 | # Copyright (c) 2006, Sun Microsystems, Inc. 8 | # All rights reserved. 9 | # 10 | # Redistribution and use in source and binary forms, with or without 11 | # modification, are permitted provided that the following conditions are met: 12 | # 13 | # * Redistributions of source code must retain the above copyright notice, 14 | # this list of conditions and the following disclaimer. 15 | # * Redistributions in binary form must reproduce the above copyright 16 | # notice, this list of conditions and the following disclaimer in the 17 | # documentation and/or other materials provided with the distribution. 18 | # * Neither the name of the Sun Microsystems, Inc. nor the names of its 19 | # contributors may be used to endorse or promote products derived from 20 | # this software without specific prior written permission. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 | # THE POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | 35 | # Project version number - this is generated automatically 36 | version=${project.version} 37 | -------------------------------------------------------------------------------- /src/main/resources/templates/DumpDebugMethods.template: -------------------------------------------------------------------------------- 1 | int kindCnt = 0; 2 | protected final String jjKindsForBitVector(int i, long vec) 3 | { 4 | String retVal = ""; 5 | if (i == 0) 6 | kindCnt = 0; 7 | for (int j = 0; j < 64; j++) 8 | { 9 | if ((vec & (1L << j)) != 0L) 10 | { 11 | if (kindCnt++ > 0) 12 | retVal += ", "; 13 | if (kindCnt % 5 == 0) 14 | retVal += "\n "; 15 | retVal += tokenImage[i * 64 + j]; 16 | } 17 | } 18 | return retVal; 19 | } 20 | 21 | 22 | protected final String jjKindsForStateVector(int lexState, int[] vec, int start, int end) 23 | { 24 | boolean[] kindDone = new boolean[${maxOrdinal}]; 25 | String retVal = ""; 26 | int cnt = 0; 27 | for (int i = start; i < end; i++) 28 | { 29 | if (vec[i] == -1) 30 | continue; 31 | int[] stateSet = States.statesForState[curLexState][vec[i]]; 32 | for (int j = 0; j < stateSet.length; j++) 33 | { 34 | int state = stateSet[j]; 35 | if (!kindDone[Kinds.kindForState[lexState][state]]) 36 | { 37 | kindDone[Kinds.kindForState[lexState][state]] = true; 38 | if (cnt++ > 0) 39 | retVal += ", "; 40 | if (cnt % 5 == 0) 41 | retVal += "\n "; 42 | retVal += tokenImage[Kinds.kindForState[lexState][state]]; 43 | } 44 | } 45 | } 46 | if (cnt == 0) 47 | return "{ }"; 48 | else 49 | return "{ " + retVal + " }"; 50 | } 51 | -------------------------------------------------------------------------------- /src/main/resources/templates/DumpStaticVarDeclarations.template: -------------------------------------------------------------------------------- 1 | protected ${charStreamName} input_stream; 2 | 3 | #if !TABLE_DRIVEN 4 | private final int[] jjrounds = new int[${stateSetSize}]; 5 | private final int[] jjstateSet = new int[2 * ${stateSetSize}]; 6 | #fi 7 | private final StringBuilder jjimage = new StringBuilder(); 8 | private StringBuilder image = jjimage; 9 | private int jjimageLen; 10 | private int lengthOfMatch; 11 | protected int curChar; 12 | -------------------------------------------------------------------------------- /src/main/resources/templates/TokenManager.template: -------------------------------------------------------------------------------- 1 | /** 2 | * An implementation for this interface is generated by 3 | * JavaCCParser. The user is free to use any implementation 4 | * of their choice. 5 | */ 6 | ${SUPPORT_CLASS_VISIBILITY_PUBLIC?public :}interface TokenManager { 7 | /** This gets the next token from the input stream. 8 | * A token of kind 0 (<EOF>) should be returned on EOF. 9 | * @return the next Token. Should not benull.
10 | */
11 | Token getNextToken();
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/resources/templates/cpp/DumpDebugMethods.template:
--------------------------------------------------------------------------------
1 | const JJSimpleString ${tokMgrClassName}::jjKindsForBitVector(int i, unsigned long long vec)
2 | {
3 | int kindCnt = 0;
4 | JJSimpleString retVal;
5 | if (i == 0)
6 | kindCnt = 0;
7 | for (int j = 0; j < 64; j++)
8 | {
9 | if ((vec & (1L << j)) != 0L)
10 | {
11 | if (kindCnt++ > 0)
12 | retVal += ", ";
13 | if (kindCnt % 5 == 0)
14 | retVal += "\n ";
15 | retVal += addUnicodeEscapes(tokenImage[i * 64 + j]);
16 | }
17 | }
18 |
19 | return retVal;
20 | }
21 |
22 | const JJSimpleString ${tokMgrClassName}::jjKindsForStateVector(int lexState, int vec[], int start, int end)
23 | {
24 | bool kindDone[${maxOrdinal}];
25 | JJSimpleString retVal;
26 | int cnt = 0;
27 | for (int i = start; i < end; i++)
28 | {
29 | if (vec[i] == -1)
30 | continue;
31 | const int *stateSet = statesForState[curLexState][vec[i]];
32 | for (int j = 0; j < ${stateSetSize}; j++)
33 | {
34 | int state = stateSet[j];
35 | if (!kindDone[kindForState[lexState][state]])
36 | {
37 | kindDone[kindForState[lexState][state]] = true;
38 | if (cnt++ > 0)
39 | retVal += ", ";
40 | if (cnt % 5 == 0)
41 | retVal += "\n ";
42 | retVal += addUnicodeEscapes(tokenImage[kindForState[lexState][state]]);
43 | }
44 | }
45 | }
46 | if (cnt == 0)
47 | return "{ }";
48 | else
49 | return "{ " + retVal + " }";
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/src/main/resources/templates/cpp/DumpVarDeclarations.template:
--------------------------------------------------------------------------------
1 | JAVACC_CHARSTREAM* input_stream;
2 | int jjrounds[${stateSetSize}];
3 | int jjstateSet[2 * ${stateSetSize}];
4 | JJString jjimage;
5 | JJString image;
6 | int jjimageLen;
7 | int lengthOfMatch;
8 | JJChar curChar;
9 | TokenManagerErrorHandler* errorHandler = nullptr;
10 |
11 | public:
12 | void setErrorHandler(TokenManagerErrorHandler *eh) {
13 | if (errorHandler) delete errorHandler, errorHandler = nullptr;
14 | errorHandler = eh;
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/resources/templates/cpp/JavaCC.h.template:
--------------------------------------------------------------------------------
1 | \#ifndef JAVACC_JAVACC_H_
2 | \#define JAVACC_JAVACC_H_
3 |
4 | \#include null.
13 | * @param nOfs Offset at which to start storing characters. Must be ≥ 0.
14 | * @param nLen The maximum possible number of characters to read. Must be ≥ 0.
15 | * @return The number of characters read, or -1 at the end of the stream
16 | * @exception IOException if reading fails
17 | */
18 | int read (char [] aDest, int nOfs, int nLen) throws IOException;
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/resources/templates/stream/java/modern/SimpleCharStream.template:
--------------------------------------------------------------------------------
1 | /**
2 | * An implementation of interface CharStream, where the stream is assumed to
3 | * contain only ASCII characters (without unicode processing).
4 | */
5 | #if SUPPORT_CLASS_VISIBILITY_PUBLIC
6 | public
7 | #fi
8 | class SimpleCharStream extends AbstractCharStream
9 | {
10 | private Provider inputStream;
11 |
12 | @Override
13 | protected int streamRead (final char[] aBuf, final int nOfs, final int nLen) throws java.io.IOException
14 | {
15 | return inputStream.read (aBuf, nOfs, nLen);
16 | }
17 |
18 | @Override
19 | protected void streamClose() throws java.io.IOException
20 | {
21 | inputStream.close ();
22 | }
23 |
24 | /** Constructor. */
25 | public SimpleCharStream(final Provider dstream,
26 | final int startline,
27 | final int startcolumn,
28 | final int buffersize)
29 | {
30 | super (startline, startcolumn, buffersize);
31 | inputStream = dstream;
32 | }
33 |
34 | /** Constructor. */
35 | public SimpleCharStream(final Provider dstream,
36 | final int startline,
37 | final int startcolumn)
38 | {
39 | this(dstream, startline, startcolumn, DEFAULT_BUF_SIZE);
40 | }
41 |
42 | /** Constructor. */
43 | public SimpleCharStream(final Provider dstream)
44 | {
45 | this(dstream, 1, 1, DEFAULT_BUF_SIZE);
46 | }
47 |
48 | /** Reinitialise. */
49 | public void reInit(final Provider dstream,
50 | final int startline,
51 | final int startcolumn,
52 | final int buffersize)
53 | {
54 | inputStream = dstream;
55 | super.reInit (startline, startcolumn, buffersize);
56 | }
57 |
58 | /** Reinitialise. */
59 | public void reInit(final Provider dstream,
60 | final int startline,
61 | final int startcolumn)
62 | {
63 | reInit(dstream, startline, startcolumn, DEFAULT_BUF_SIZE);
64 | }
65 |
66 | /** Reinitialise. */
67 | public void reInit(final Provider dstream)
68 | {
69 | reInit(dstream, 1, 1, DEFAULT_BUF_SIZE);
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/src/main/resources/templates/stream/java/modern/StreamProvider.template:
--------------------------------------------------------------------------------
1 |
2 | import java.io.BufferedReader;
3 | import java.io.IOException;
4 | import java.io.InputStream;
5 | import java.io.InputStreamReader;
6 | import java.io.Reader;
7 |
8 | /**
9 | * NOTE : This generated class can be safely deleted if installing in a GWT installation (use StringProvider instead)
10 | */
11 | public class StreamProvider implements Provider
12 | {
13 | private Reader m_aReader;
14 |
15 | #if AT_LEAST_JDK6
16 | @Deprecated
17 | #fi
18 | public StreamProvider(final InputStream stream, final String charsetName) throws IOException
19 | {
20 | this (new BufferedReader (new InputStreamReader (stream, charsetName)));
21 | }
22 |
23 | public StreamProvider(final InputStream stream, final java.nio.charset.Charset charset)
24 | {
25 | this (new BufferedReader (new InputStreamReader (stream, charset)));
26 | }
27 |
28 | public StreamProvider (final Reader reader)
29 | {
30 | m_aReader = reader;
31 | }
32 |
33 | public int read (final char[] aDest, final int nOfs, final int nLen) throws IOException
34 | {
35 | int result = m_aReader.read(aDest, nOfs, nLen);
36 |
37 | /* CBA -- Added 2014/03/29 --
38 | This logic allows the generated Java code to be easily translated to C# (via sharpen) -
39 | as in C# 0 represents end of file, and in Java, -1 represents end of file
40 | See : http://msdn.microsoft.com/en-us/library/9kstw824(v=vs.110).aspx
41 | ** Technically, this is not required for java but the overhead is extremely low compared to the code generation benefits.
42 | */
43 | if (result == 0)
44 | if (nOfs < aDest.length && nLen > 0)
45 | result = -1;
46 |
47 | return result;
48 | }
49 |
50 | public void close () throws IOException
51 | {
52 | if (m_aReader != null)
53 | m_aReader.close();
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/resources/templates/stream/java/modern/StringProvider.template:
--------------------------------------------------------------------------------
1 |
2 | import java.io.IOException;
3 |
4 | public class StringProvider implements Provider
5 | {
6 | private String m_sStr;
7 | private int m_nPos = 0;
8 | private final int m_nLen;
9 |
10 | public StringProvider(final String sStr)
11 | {
12 | m_sStr = sStr;
13 | m_nLen = sStr.length();
14 | }
15 |
16 | public int read (final char[] aDest, final int nOfs, final int nLen) throws IOException
17 | {
18 | final int nLeft = m_nLen - m_nPos;
19 | if (nLeft <= 0)
20 | return -1;
21 |
22 | int nCharsRead = aDest.length - nOfs;
23 | if (nLen < nCharsRead)
24 | nCharsRead = nLen;
25 | if (nLeft < nCharsRead)
26 | nCharsRead = nLeft;
27 |
28 | m_sStr.getChars(m_nPos, m_nPos + nCharsRead, aDest, nOfs);
29 | m_nPos += nCharsRead;
30 |
31 | return nCharsRead;
32 | }
33 |
34 | public void close()
35 | {
36 | m_sStr = null;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/test/resources/issues/20/grammar.jj:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017-2023 Philip Helger, pgcc@helger.com
3 | *
4 | * Copyright 2011 Google Inc. All Rights Reserved.
5 | * Author: sreeni@google.com (Sreeni Viswanadha)
6 | *
7 | * Copyright (c) 2006, Sun Microsystems, Inc.
8 | * All rights reserved.
9 | *
10 | * Redistribution and use in source and binary forms, with or without
11 | * modification, are permitted provided that the following conditions are met:
12 | *
13 | * * Redistributions of source code must retain the above copyright notice,
14 | * this list of conditions and the following disclaimer.
15 | * * Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * * Neither the name of the Sun Microsystems, Inc. nor the names of its
19 | * contributors may be used to endorse or promote products derived from
20 | * this software without specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
32 | * THE POSSIBILITY OF SUCH DAMAGE.
33 | */
34 | PARSER_BEGIN(IssueParser)
35 | public class IssueParser {
36 | }
37 | PARSER_END(IssueParser)
38 |
39 |