summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorluzpaz <luzpaz@users.noreply.github.com>2021-05-14 11:32:47 -0400
committerGitHub <noreply@github.com>2021-05-14 10:32:47 -0500
commit5353ccdd7026a7eeaa77029102f8c0043553ebd3 (patch)
treeafabf8efc9e0036e1a6903479cac8d7faaf23724 /examples
parentd27fd7627f3ed60b3b7a9e9f5e790d0e49107359 (diff)
downloadpyparsing-git-5353ccdd7026a7eeaa77029102f8c0043553ebd3.tar.gz
Fix misc. documentation typos (#280)
Found via `codespell -q 3 -L ba,fourty,halp,inout,strng`
Diffstat (limited to 'examples')
-rw-r--r--examples/AcManForm.dfm2
-rw-r--r--examples/booleansearchparser.py10
-rw-r--r--examples/lucene_grammar.py2
-rw-r--r--examples/pymicko.py18
-rw-r--r--examples/pythonGrammarParser.py2
-rw-r--r--examples/searchparser.py2
-rw-r--r--examples/simpleArith.py2
-rw-r--r--examples/snmp_api.h6
8 files changed, 22 insertions, 22 deletions
diff --git a/examples/AcManForm.dfm b/examples/AcManForm.dfm
index db80f6a..087aea1 100644
--- a/examples/AcManForm.dfm
+++ b/examples/AcManForm.dfm
@@ -511,7 +511,7 @@ object Form1: TForm1
object SearchFindFirst1: TSearchFindFirst
Category = 'Search'
Caption = 'F&ind First'
- Hint = 'Find First|Finds the first occurance of specified text'
+ Hint = 'Find First|Finds the first occurrence of specified text'
end
object CustomizeActionBars1: TCustomizeActionBars
Category = 'Tools'
diff --git a/examples/booleansearchparser.py b/examples/booleansearchparser.py
index 7ac502c..d32ef39 100644
--- a/examples/booleansearchparser.py
+++ b/examples/booleansearchparser.py
@@ -11,7 +11,7 @@ It handles:
* parentheses;
* quoted strings;
* wildcards at the end of a search term (help*);
-* wildcards at the begining of a search term (*lp);
+* wildcards at the beginning of a search term (*lp);
* non-western languages
Requirements:
@@ -22,7 +22,7 @@ SAMPLE USAGE:
from booleansearchparser import BooleanSearchParser
from __future__ import print_function
bsp = BooleanSearchParser()
-text = u"wildcards at the begining of a search term "
+text = u"wildcards at the beginning of a search term "
exprs= [
u"*cards and term", #True
u"wild* and term", #True
@@ -139,7 +139,7 @@ class BooleanSearchParser:
Grammar:
- a query consists of alphanumeric words, with an optional '*'
- wildcard at the end or the begining of a word
+ wildcard at the end or the beginning of a word
- a sequence of words between quotes is a literal string
- words can be used together by using operators ('and' or 'or')
- words with operators can be grouped with parenthesis
@@ -151,7 +151,7 @@ class BooleanSearchParser:
alphabet = alphanums
- # suport for non-western alphabets
+ # support for non-western alphabets
for r in alphabet_ranges:
alphabet += "".join(chr(c) for c in range(*r) if not chr(c).isspace())
@@ -315,7 +315,7 @@ class BooleanSearchParser:
class ParserTest(BooleanSearchParser):
"""Tests the parser with some search queries
- tests containts a dictionary with tests and expected results.
+ tests contains a dictionary with tests and expected results.
"""
def Test(self):
diff --git a/examples/lucene_grammar.py b/examples/lucene_grammar.py
index 39b9eb8..48012ba 100644
--- a/examples/lucene_grammar.py
+++ b/examples/lucene_grammar.py
@@ -3,7 +3,7 @@
#
# Copyright 2011, Paul McGuire
#
-# implementation of Lucene grammar, as decribed
+# implementation of Lucene grammar, as described
# at http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/docs/queryparsersyntax.html
#
diff --git a/examples/pymicko.py b/examples/pymicko.py
index a5512ea..ddbf219 100644
--- a/examples/pymicko.py
+++ b/examples/pymicko.py
@@ -49,7 +49,7 @@ DEBUG = 0
# %14 is the stack frame pointer (x86's ebp) and %15 is the stack pointer (x86's esp). All data-handling instructions can be
# unsigned (suffix U), or signed (suffix S). These are ADD, SUB, MUL and DIV. These are three-address instructions,
# the first two operands are input, the third one is output. Whether these operands are registers, memory or constant
-# is not relevant, all combinations are possible (except that output cannot be a constant). Constants are writen with a $ prefix (10-base only).
+# is not relevant, all combinations are possible (except that output cannot be a constant). Constants are written with a $ prefix (10-base only).
# Conditional jumps are handled by JXXY instructions, where XX is LT, GT, LE, GE, EQ, NE (less than, greater than, less than or equal, etc.)
# and Y is U or S (unsigned or signed, except for JEQ i JNE). Unconditional jump is JMP. The move instruction is MOV.
# Function handling is done using CALL, RET, PUSH and POP (C style function calls). Static data is defined using the WORD directive
@@ -264,7 +264,7 @@ class ExceptionSharedData:
self.text = ""
def setpos(self, location, text):
- """Helper function for setting curently parsed text and position"""
+ """Helper function for setting currently parsed text and position"""
self.location = location
self.text = text
@@ -364,7 +364,7 @@ class SymbolTable:
def error(self, text=""):
"""Symbol table error exception. It should happen only if index is out of range while accessing symbol table.
- This exeption is not handled by the compiler, so as to allow traceback printing
+ This exception is not handled by the compiler, so as to allow traceback printing
"""
if text == "":
raise Exception("Symbol table index out of range")
@@ -440,7 +440,7 @@ class SymbolTable:
return self.table_len - 1
def clear_symbols(self, index):
- """Clears all symbols begining with the index to the end of table"""
+ """Clears all symbols beginning with the index to the end of table"""
try:
del self.table[index:]
except Exception:
@@ -453,10 +453,10 @@ class SymbolTable:
skind=list(SharedData.KINDS.keys()),
stype=list(SharedData.TYPES.keys()),
):
- """Searches for symbol, from the end to the begining.
+ """Searches for symbol, from the end to the beginning.
Returns symbol index or None
sname - symbol name
- skind - symbol kind (one kind, list of kinds, or None) deafult: any kind
+ skind - symbol kind (one kind, list of kinds, or None) default: any kind
stype - symbol type (or None) default: any type
"""
skind = skind if isinstance(skind, list) else [skind]
@@ -471,7 +471,7 @@ class SymbolTable:
def insert_id(self, sname, skind, skinds, stype):
"""Inserts a new identifier at the end of the symbol table, if possible.
- Returns symbol index, or raises an exception if the symbol alredy exists
+ Returns symbol index, or raises an exception if the symbol already exists
sname - symbol name
skind - symbol kind
skinds - symbol kinds to check for
@@ -681,7 +681,7 @@ class CodeGenerator:
def error(self, text):
"""Compiler error exception. It should happen only if something is wrong with compiler.
- This exeption is not handled by the compiler, so as to allow traceback printing
+ This exception is not handled by the compiler, so as to allow traceback printing
"""
raise Exception("Compiler error: %s" % text)
@@ -1132,7 +1132,7 @@ class MicroC:
self.function_arguments = []
# stack for arguments of the nested function calls
self.function_arguments_stack = []
- # number of arguments for the curent function call
+ # number of arguments for the current function call
self.function_arguments_number = -1
# stack for the number of arguments for the nested function calls
self.function_arguments_number_stack = []
diff --git a/examples/pythonGrammarParser.py b/examples/pythonGrammarParser.py
index e9d7d94..ff098a0 100644
--- a/examples/pythonGrammarParser.py
+++ b/examples/pythonGrammarParser.py
@@ -15,7 +15,7 @@ grammar = r"""
# Note: Changing the grammar specified in this file will most likely
# require corresponding changes in the parser module
# (../Modules/parsermodule.c). If you can't make the changes to
-# that module yourself, please co-ordinate the required changes
+# that module yourself, please coordinate the required changes
# with someone who can; ask around on python-dev for help. Fred
# Drake <fdrake@acm.org> will probably be listening there.
diff --git a/examples/searchparser.py b/examples/searchparser.py
index 4284cc3..db00e44 100644
--- a/examples/searchparser.py
+++ b/examples/searchparser.py
@@ -206,7 +206,7 @@ class SearchQueryParser:
class ParserTest(SearchQueryParser):
"""Tests the parser with some search queries
- tests containts a dictionary with tests and expected results.
+ tests contains a dictionary with tests and expected results.
"""
tests = {
diff --git a/examples/simpleArith.py b/examples/simpleArith.py
index 476cb8b..99b7ce1 100644
--- a/examples/simpleArith.py
+++ b/examples/simpleArith.py
@@ -30,7 +30,7 @@ factop = Literal("!")
# and integer or a variable. This will be the first argument
# to the infixNotation method.
# 2. Define a list of tuples for each level of operator
-# precendence. Each tuple is of the form
+# precedence. Each tuple is of the form
# (opExpr, numTerms, rightLeftAssoc, parseAction), where
# - opExpr is the pyparsing expression for the operator;
# may also be a string, which will be converted to a Literal
diff --git a/examples/snmp_api.h b/examples/snmp_api.h
index fc802d1..ef9ae4b 100644
--- a/examples/snmp_api.h
+++ b/examples/snmp_api.h
@@ -458,7 +458,7 @@ int snmp_close_sessions (void);
* of outstanding requests on this session, then send the pdu.
* Returns the request id of the generated packet if applicable, otherwise 1.
* On any error, 0 is returned.
- * The pdu is freed by snmp_send() unless a failure occured.
+ * The pdu is freed by snmp_send() unless a failure occurred.
*/
int snmp_send (struct snmp_session *, struct snmp_pdu *);
@@ -476,7 +476,7 @@ int snmp_send (struct snmp_session *, struct snmp_pdu *);
* then send the pdu.
* Returns the request id of the generated packet if applicable, otherwise 1.
* On any error, 0 is returned.
- * The pdu is freed by snmp_send() unless a failure occured.
+ * The pdu is freed by snmp_send() unless a failure occurred.
*/
int snmp_async_send (struct snmp_session *, struct snmp_pdu *,
snmp_callback, void *);
@@ -646,7 +646,7 @@ struct snmp_session *snmp_open_ex (struct snmp_session *,
int (*fcheck) (u_char *, size_t)
);
-/* provided for backwards compatability. Don't use these functions.
+/* provided for backwards compatibility. Don't use these functions.
See snmp_debug.h and snmp_debug.c instead.
*/
#if HAVE_STDARG_H