Skip to content

Commit 635a9e2

Browse files
committed
Rename parser files
1 parent 1118380 commit 635a9e2

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

Makefile.pre.in

+5-5
Original file line numberDiff line numberDiff line change
@@ -301,15 +301,15 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
301301

302302
PEGEN_OBJS= \
303303
Parser/pegen.o \
304-
Parser/parse.o \
305-
Parser/parse_string.o \
304+
Parser/parser.o \
305+
Parser/string_parser.o \
306306
Parser/peg_api.o
307307

308308

309309
PEGEN_HEADERS= \
310310
$(srcdir)/Include/internal/pegen_interface.h \
311311
$(srcdir)/Parser/pegen.h \
312-
$(srcdir)/Parser/parse_string.h
312+
$(srcdir)/Parser/string_parser.h
313313

314314
POBJS= \
315315
Parser/token.o \
@@ -823,8 +823,8 @@ regen-pegen:
823823
PYTHONPATH=$(srcdir)/Tools/peg_generator $(PYTHON_FOR_REGEN) -m pegen -q c \
824824
$(srcdir)/Grammar/python.gram \
825825
$(srcdir)/Grammar/Tokens \
826-
-o $(srcdir)/Parser/parse.new.c
827-
$(UPDATE_FILE) $(srcdir)/Parser/parse.c $(srcdir)/Parser/parse.new.c
826+
-o $(srcdir)/Parser/parser.new.c
827+
$(UPDATE_FILE) $(srcdir)/Parser/parser.c $(srcdir)/Parser/parser.new.c
828828

829829
.PHONY=regen-ast
830830
regen-ast:

PCbuild/pythoncore.vcxproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@
280280
<ClInclude Include="..\Objects\stringlib\split.h" />
281281
<ClInclude Include="..\Objects\unicodetype_db.h" />
282282
<ClInclude Include="..\Parser\tokenizer.h" />
283-
<ClInclude Include="..\Parser\parse_string.h" />
283+
<ClInclude Include="..\Parser\string_parser.h" />
284284
<ClInclude Include="..\Parser\pegen.h" />
285285
<ClInclude Include="..\PC\errmap.h" />
286286
<ClInclude Include="..\PC\pyconfig.h" />
@@ -418,8 +418,8 @@
418418
<ClCompile Include="..\Parser\tokenizer.c" />
419419
<ClCompile Include="..\Parser\token.c" />
420420
<ClCompile Include="..\Parser\pegen.c" />
421-
<ClCompile Include="..\Parser\parse.c" />
422-
<ClCompile Include="..\Parser\parse_string.c" />
421+
<ClCompile Include="..\Parser\parser.c" />
422+
<ClCompile Include="..\Parser\string_parser.c" />
423423
<ClCompile Include="..\Parser\peg_api.c" />
424424
<ClCompile Include="..\PC\invalid_parameter_handler.c" />
425425
<ClCompile Include="..\PC\winreg.c" />

PCbuild/regen.vcxproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@
156156
<ImportGroup Label="ExtensionTargets">
157157
</ImportGroup>
158158
<Target Name="_RegenPegen" BeforeTargets="Build">
159-
<!-- Regenerate Parser/parse.c -->
159+
<!-- Regenerate Parser/parser.c -->
160160
<SetEnv Name="PYTHONPATH" Prefix="true" Value="$(PySourcePath)Tools\peg_generator\" />
161-
<Exec Command="&quot;$(PythonExe)&quot; -m pegen -q c &quot;$(PySourcePath)Grammar\python.gram&quot; &quot;$(PySourcePath)Grammar\Tokens&quot; -o &quot;$(IntDir)parse.c&quot;" />
162-
<Copy SourceFiles="$(IntDir)parse.c" DestinationFiles="$(PySourcePath)Parser\parse.c">
161+
<Exec Command="&quot;$(PythonExe)&quot; -m pegen -q c &quot;$(PySourcePath)Grammar\python.gram&quot; &quot;$(PySourcePath)Grammar\Tokens&quot; -o &quot;$(IntDir)parser.c&quot;" />
162+
<Copy SourceFiles="$(IntDir)parser.c" DestinationFiles="$(PySourcePath)Parser\parser.c">
163163
<Output TaskParameter="CopiedFiles" ItemName="_UpdatedParse" />
164164
</Copy>
165165
<Warning Text="Pegen updated. You will need to rebuild pythoncore to see the changes." Condition="'@(_UpdatedParse)' != ''" />
File renamed without changes.

Parser/pegen.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "tokenizer.h"
44

55
#include "pegen.h"
6-
#include "parse_string.h"
6+
#include "string_parser.h"
77

88
PyObject *
99
_PyPegen_new_type_comment(Parser *p, char *s)

Parser/parse_string.c renamed to Parser/string_parser.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "tokenizer.h"
44
#include "pegen.h"
5-
#include "parse_string.h"
5+
#include "string_parser.h"
66

77
//// STRING HANDLING FUNCTIONS ////
88

File renamed without changes.

Tools/peg_generator/pegen/build.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def compile_c_extension(
6767
str(MOD_DIR.parent.parent.parent / "Python" / "asdl.c"),
6868
str(MOD_DIR.parent.parent.parent / "Parser" / "tokenizer.c"),
6969
str(MOD_DIR.parent.parent.parent / "Parser" / "pegen.c"),
70-
str(MOD_DIR.parent.parent.parent / "Parser" / "parse_string.c"),
70+
str(MOD_DIR.parent.parent.parent / "Parser" / "string_parser.c"),
7171
str(MOD_DIR.parent / "peg_extension" / "peg_extension.c"),
7272
generated_source_path,
7373
],

0 commit comments

Comments
 (0)