bpo-43244: Rename pycore_ast.h functions to _PyAST_xxx() (GH-25252)

Rename AST functions of pycore_ast.h to use the "_PyAST_" prefix.
Remove macros creating aliases without prefix. For example, Module()
becomes _PyAST_Module(). Update Grammar/python.gram to use
_PyAST_xxx() functions.
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index 02be1b3..b71565c 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -264,6 +264,10 @@ def visitProduct(self, product, name, depth):
         self.emit("", depth)
 
 
+def ast_func_name(name):
+    return f"_PyAST_{name}"
+
+
 class PrototypeVisitor(EmitVisitor):
     """Generate function prototypes for the .h file"""
 
@@ -322,16 +326,7 @@ def emit_function(self, name, ctype, args, attrs, union=True):
             argstr += ", PyArena *arena"
         else:
             argstr = "PyArena *arena"
-        margs = "a0"
-        for i in range(1, len(args)+1):
-            margs += ", a%d" % i
-        # bpo-43244: <winbase.h> defines Yield macro. Don't redefine it in
-        # pycore_ast.h: it is not needed outside Python-ast.c which calls
-        # directly _Py_Yield().
-        if name != "Yield":
-            self.emit("#define %s(%s) _Py_%s(%s)" % (name, margs, name, margs), 0,
-                    reflow=False)
-        self.emit("%s _Py_%s(%s);" % (ctype, name, argstr), False)
+        self.emit("%s %s(%s);" % (ctype, ast_func_name(name), argstr), False)
 
     def visitProduct(self, prod, name):
         self.emit_function(name, get_c_type(name),
@@ -340,10 +335,6 @@ def visitProduct(self, prod, name):
                            union=False)
 
 
-def pyfunc_name(name):
-    return f"_Py_{name}"
-
-
 class FunctionVisitor(PrototypeVisitor):
     """Visitor to generate constructor functions for AST."""
 
@@ -357,7 +348,7 @@ def emit(s, depth=0, reflow=True):
         else:
             argstr = "PyArena *arena"
         self.emit("%s" % ctype, 0)
-        emit("%s(%s)" % (pyfunc_name(name), argstr))
+        emit("%s(%s)" % (ast_func_name(name), argstr))
         emit("{")
         emit("%s p;" % ctype, 1)
         for argtype, argname, opt in args:
@@ -496,7 +487,7 @@ def complexSum(self, sum, name):
             for f in t.fields:
                 self.visitField(f, t.name, sum=sum, depth=2)
             args = [f.name for f in t.fields] + [a.name for a in sum.attributes]
-            self.emit("*out = %s(%s);" % (pyfunc_name(t.name), self.buildArgs(args)), 2)
+            self.emit("*out = %s(%s);" % (ast_func_name(t.name), self.buildArgs(args)), 2)
             self.emit("if (*out == NULL) goto failed;", 2)
             self.emit("return 0;", 2)
             self.emit("}", 1)
@@ -529,7 +520,7 @@ def visitProduct(self, prod, name):
             self.visitField(a, name, prod=prod, depth=1)
         args = [f.name for f in prod.fields]
         args.extend([a.name for a in prod.attributes])
-        self.emit("*out = %s(%s);" % (pyfunc_name(name), self.buildArgs(args)), 1)
+        self.emit("*out = %s(%s);" % (ast_func_name(name), self.buildArgs(args)), 1)
         self.emit("return 0;", 1)
         self.emit("failed:", 0)
         self.emit("Py_XDECREF(tmp);", 1)