bazel/rules/lexyacc.bzl
def genyacc(
        name,
        src,
        header_out,
        source_out,
        extra_outs = [],
        visibility = []):
    """Generate a C++ parser from a Yacc file using Bison.
    Args:
      name: The name of the rule.
      src: The input grammar file.
      header_out: The generated header file.
      source_out: The generated source file.
      extra_outs: Additional generated outputs.
    """
    cmd = ("bison --defines=$(location %s) -o $(@D)/%s $(location %s)" %
           (header_out, source_out, src))
    native.genrule(
        name = name,
        outs = [source_out, header_out] + extra_outs,
        srcs = [src],
        cmd = cmd,
        visibility = visibility,
    )
Generate a C++ parser from a Yacc file using Bison.
    Args:
      name: The name of the rule.
      src: The input grammar file.
      header_out: The generated header file.
      source_out: The generated source file.
      extra_outs: Additional generated outputs.
    
Generate a C++ parser from a Yacc file using Bison.
Generate a C ++ parser from a Yacc file using Bison .
def genyacc(
        name,
        src,
        header_out,
        source_out,
        extra_outs = [],
        visibility = []):
    cmd = ("bison --defines=$(location %s) -o $(@D)/%s $(location %s)" %
           (header_out, source_out, src))
    native.genrule(
        name = name,
        outs = [source_out, header_out] + extra_outs,
        srcs = [src],
        cmd = cmd,
        visibility = visibility,
    )
def genyacc ( name , src , header_out , source_out , extra_outs = [ ] , visibility = [ ] ) : cmd = ( "bison --defines=$(location %s) -o $(@D)/%s $(location %s)" % ( header_out , source_out , src ) ) native . genrule ( name = name , outs = [ source_out , header_out ] + extra_outs , srcs = [ src ] , cmd = cmd , visibility = visibility , )
Generate a C++ parser from a Yacc file using Bison.
Generate a C ++ parser from a Yacc file using Bison .
"""Generate a C++ parser from a Yacc file using Bison.
    Args:
      name: The name of the rule.
      src: The input grammar file.
      header_out: The generated header file.
      source_out: The generated source file.
      extra_outs: Additional generated outputs.
    """
name
The name of the rule.
The name of the rule .
src
The input grammar file.
The input grammar file .
header_out
The generated header file.
The generated header file .
source_out
The generated source file.
The generated source file .
extra_outs
Additional generated outputs.
Additional generated outputs .
visibility