Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c64d04de
Commit
c64d04de
authored
Oct 20, 1991
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented 2-character operators.
parent
2df7bcca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
Parser/grammar.c
Parser/grammar.c
+20
-11
No files found.
Parser/grammar.c
View file @
c64d04de
...
...
@@ -212,8 +212,7 @@ translabel(g, lb)
if
(
p
)
*
p
=
'\0'
;
}
else
{
if
(
lb
->
lb_str
[
2
]
==
lb
->
lb_str
[
0
])
{
else
if
(
lb
->
lb_str
[
2
]
==
lb
->
lb_str
[
0
])
{
int
type
=
(
int
)
tok_1char
(
lb
->
lb_str
[
1
]);
if
(
type
!=
OP
)
{
lb
->
lb_type
=
type
;
...
...
@@ -223,10 +222,20 @@ translabel(g, lb)
printf
(
"Unknown OP label %s
\n
"
,
lb
->
lb_str
);
}
else
if
(
lb
->
lb_str
[
2
]
&&
lb
->
lb_str
[
3
]
==
lb
->
lb_str
[
0
])
{
int
type
=
(
int
)
tok_2char
(
lb
->
lb_str
[
1
],
lb
->
lb_str
[
2
]);
if
(
type
!=
OP
)
{
lb
->
lb_type
=
type
;
lb
->
lb_str
=
NULL
;
}
else
printf
(
"
Can't translate STRING
label %s
\n
"
,
printf
(
"
Unknown OP
label %s
\n
"
,
lb
->
lb_str
);
}
else
printf
(
"Can't translate STRING label %s
\n
"
,
lb
->
lb_str
);
}
else
printf
(
"Can't translate label '%s'
\n
"
,
labelrepr
(
lb
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment