# Path: spdx/document.py
# class ExternalDocumentRef(object):
# class License(object):
# class LicenseConjunction(License):
# class LicenseDisjunction(License):
# class ExtractedLicense(License):
# class Document(object):
#     def __init__(
#         self, external_document_id=None, spdx_document_uri=None, check_sum=None
#     ):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def validate(self, messages):
#     def validate_ext_doc_id(self, messages):
#     def validate_spdx_doc_uri(self, messages):
#     def validate_checksum(self, messages):
# def _add_parens(required, text):
#     def __init__(self, full_name, identifier):
#     def from_identifier(cls, identifier):
#     def from_full_name(cls, full_name):
#     def url(self):
#     def full_name(self):
#     def full_name(self, value):
#     def set_full_name(self, value):
#     def identifier(self):
#     def identifier(self, value):
#     def set_identifier(self, value):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def __str__(self):
#     def __hash__(self):
#     def __init__(self, license_1, license_2):
#     def full_name(self):
#     def identifier(self):
#     def __init__(self, license_1, license_2):
#     def full_name(self):
#     def identifier(self):
#     def __init__(self, identifier):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def add_xref(self, ref):
#     def validate(self, messages):
#     def __init__(
#         self,
#         version=None,
#         data_license=None,
#         name=None,
#         spdx_id=None,
#         namespace=None,
#         comment=None,
#         package=None,
#         license_list_version=None,
#     ):
#     def add_review(self, review):
#     def add_annotation(self, annotation):
#     def add_relationships(self, relationship):
#     def add_extr_lic(self, lic):
#     def add_ext_document_reference(self, ext_doc_ref):
#     def add_snippet(self, snip):
#     def add_package(self, package):
#     def package(self):
#     def package(self, value):
#     def files(self):
#     def files(self, value):
#     def has_comment(self):
#     def validate(self, messages=None):
#     def validate_version(self, messages):
#     def validate_data_lics(self, messages):
#     def validate_name(self, messages):
#     def validate_namespace(self, messages):
#     def validate_spdx_id(self, messages):
#     def validate_ext_document_references(self, messages):
#     def validate_reviews(self, messages):
#     def validate_annotations(self, messages):
#     def validate_relationships(self, messages):
#     def validate_snippet(self, messages=None):
#     def validate_creation_info(self, messages):
#     def validate_packages(self, messages):
#     def validate_package(self, messages):
#     def validate_extracted_licenses(self, messages):


import datetime
import re
from ply import lex
from ply import yacc
from spdx import document
    def token(self):
        """Get the next token or None if exhausted input."""
        return self.lexer.token()

    def build(self, **kwargs):
        """Build lexer, must be called before input or token methods.
        Only need to build once.
        """
        self.lexer = lex.lex(module=self, **kwargs)


class LicenseListParser(object):
    def __init__(self):
        self.lex = LicenseListLexer()
        self.lex.build(reflags=re.UNICODE)
        self.tokens = self.lex.tokens

    def p_disjunction_1(self, p):
        """disjunction : disjunction OR conjunction
        """
        p[0] = document.LicenseDisjunction(p[1], p[3])

    def p_disjunction_2(self, p):
        """disjunction : conjunction
        """
        p[0] = p[1]

    def p_conjunction_1(self, p):
        """conjunction : conjunction AND license_atom
        """

# Path: spdx/document.py
# class ExternalDocumentRef(object):
# class License(object):
# class LicenseConjunction(License):
# class LicenseDisjunction(License):
# class ExtractedLicense(License):
# class Document(object):
#     def __init__(
#         self, external_document_id=None, spdx_document_uri=None, check_sum=None
#     ):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def validate(self, messages):
#     def validate_ext_doc_id(self, messages):
#     def validate_spdx_doc_uri(self, messages):
#     def validate_checksum(self, messages):
# def _add_parens(required, text):
#     def __init__(self, full_name, identifier):
#     def from_identifier(cls, identifier):
#     def from_full_name(cls, full_name):
#     def url(self):
#     def full_name(self):
#     def full_name(self, value):
#     def set_full_name(self, value):
#     def identifier(self):
#     def identifier(self, value):
#     def set_identifier(self, value):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def __str__(self):
#     def __hash__(self):
#     def __init__(self, license_1, license_2):
#     def full_name(self):
#     def identifier(self):
#     def __init__(self, license_1, license_2):
#     def full_name(self):
#     def identifier(self):
#     def __init__(self, identifier):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def add_xref(self, ref):
#     def validate(self, messages):
#     def __init__(
#         self,
#         version=None,
#         data_license=None,
#         name=None,
#         spdx_id=None,
#         namespace=None,
#         comment=None,
#         package=None,
#         license_list_version=None,
#     ):
#     def add_review(self, review):
#     def add_annotation(self, annotation):
#     def add_relationships(self, relationship):
#     def add_extr_lic(self, lic):
#     def add_ext_document_reference(self, ext_doc_ref):
#     def add_snippet(self, snip):
#     def add_package(self, package):
#     def package(self):
#     def package(self, value):
#     def files(self):
#     def files(self, value):
#     def has_comment(self):
#     def validate(self, messages=None):
#     def validate_version(self, messages):
#     def validate_data_lics(self, messages):
#     def validate_name(self, messages):
#     def validate_namespace(self, messages):
#     def validate_spdx_id(self, messages):
#     def validate_ext_document_references(self, messages):
#     def validate_reviews(self, messages):
#     def validate_annotations(self, messages):
#     def validate_relationships(self, messages):
#     def validate_snippet(self, messages=None):
#     def validate_creation_info(self, messages):
#     def validate_packages(self, messages):
#     def validate_package(self, messages):
#     def validate_extracted_licenses(self, messages):


# Path: spdx/utils.py
import datetime
import re
from ply import lex
from ply import yacc
from spdx import document

    def token(self):
        """Get the next token or None if exhausted input."""
        return self.lexer.token()

    def build(self, **kwargs):
        """Build lexer, must be called before input or token methods.
        Only need to build once.
        """
        self.lexer = lex.lex(module=self, **kwargs)


class LicenseListParser(object):
    def __init__(self):
        self.lex = LicenseListLexer()
        self.lex.build(reflags=re.UNICODE)
        self.tokens = self.lex.tokens

    def p_disjunction_1(self, p):
        """disjunction : disjunction OR conjunction
        """
        p[0] = document.LicenseDisjunction(p[1], p[3])

    def p_disjunction_2(self, p):
        """disjunction : conjunction
        """
        p[0] = p[1]

    def p_conjunction_1(self, p):
        """conjunction : conjunction AND license_atom
        """

        p[0] = document.LicenseConjunction(p[1], p[3])