From d0cc3b3344000805e28f868a5ab43adf8d75e50e Mon Sep 17 00:00:00 2001 From: yinxiuxiu Date: Tue, 29 Oct 2024 07:53:22 +0000 Subject: [PATCH] correct some spelling errors Signed-off-by: yinxiuxiu --- scripts/rpcgen/main.py | 2 +- scripts/rpcgen/rpcgen/parser.py | 4 ++-- scripts/rpcgen/tests/simple.x | 2 +- scripts/rpcgen/tests/test_lexer.py | 2 +- scripts/rpcgen/tests/test_parser.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/rpcgen/main.py b/scripts/rpcgen/main.py index a41be48929..390a9740df 100755 --- a/scripts/rpcgen/main.py +++ b/scripts/rpcgen/main.py @@ -47,7 +47,7 @@ def main(): # # We can delete this in a few years, once we # know users won't have a previously generated - # readonly copy lieing around. + # readonly copy lying around. try: os.unlink(args.output) except Exception: diff --git a/scripts/rpcgen/rpcgen/parser.py b/scripts/rpcgen/rpcgen/parser.py index c01ae56755..e18c44d178 100644 --- a/scripts/rpcgen/rpcgen/parser.py +++ b/scripts/rpcgen/rpcgen/parser.py @@ -268,7 +268,7 @@ class XDRParser: pointer = False if type(ident) is XDRTokenPunctuation: if ident.value != "*": - raise Exception("Expected '*' or identifer, but got %s" % ident) + raise Exception("Expected '*' or identifier, but got %s" % ident) if type(typ) is XDRTypeString or type(typ) is XDRTypeOpaque: raise Exception("Pointer invalid for 'string' and 'opaque' types") @@ -332,7 +332,7 @@ class XDRParser: return XDRTypeUnsignedHyper() else: # Bare 'unsigned' isn't allowed by 'type-specifier' - # grammer in RFC 1014, but rpcgen allows it + # grammar in RFC 1014, but rpcgen allows it return XDRTypeUnsignedInt() if typ.value == "void": diff --git a/scripts/rpcgen/tests/simple.x b/scripts/rpcgen/tests/simple.x index 91a1f2d234..766521bfd9 100644 --- a/scripts/rpcgen/tests/simple.x +++ b/scripts/rpcgen/tests/simple.x @@ -22,7 +22,7 @@ case TEXT: case DATA: string creator; /* data creator */ case EXEC: - string interpretor; /* program interpretor */ + string interpreter; /* program interpreter */ }; /* * A complete file: diff --git a/scripts/rpcgen/tests/test_lexer.py b/scripts/rpcgen/tests/test_lexer.py index 7cba98057f..d9fd2a2ada 100644 --- a/scripts/rpcgen/tests/test_lexer.py +++ b/scripts/rpcgen/tests/test_lexer.py @@ -80,7 +80,7 @@ def test_lexer(): XDRTokenIdentifier(line=24, column=5, value="EXEC"), XDRTokenPunctuation(line=24, column=9, value=":"), XDRTokenIdentifier(line=25, column=3, value="string"), - XDRTokenIdentifier(line=25, column=10, value="interpretor"), + XDRTokenIdentifier(line=25, column=10, value="interpreter"), XDRTokenPunctuation(line=25, column=21, value="<"), XDRTokenIdentifier(line=25, column=22, value="MAXNAMELEN"), XDRTokenPunctuation(line=25, column=32, value=">"), diff --git a/scripts/rpcgen/tests/test_parser.py b/scripts/rpcgen/tests/test_parser.py index 8527b8d6e2..cc6e40ab58 100644 --- a/scripts/rpcgen/tests/test_parser.py +++ b/scripts/rpcgen/tests/test_parser.py @@ -56,7 +56,7 @@ def test_parser(): XDRUnionCase( "EXEC", XDRDeclarationVariableArray( - XDRTypeString(), "interpretor", "MAXNAMELEN" + XDRTypeString(), "interpreter", "MAXNAMELEN" ), ), ], -- Gitee