Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
49c6c6d6
Commit
49c6c6d6
authored
Aug 22, 2014
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add cdef function declarations to the grammar.
parent
af01f9aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
Cython/Parser/Grammar
Cython/Parser/Grammar
+6
-3
No files found.
Cython/Parser/Grammar
View file @
49c6c6d6
...
@@ -157,15 +157,18 @@ new_expr: 'new' type '(' [arglist] ')'
...
@@ -157,15 +157,18 @@ new_expr: 'new' type '(' [arglist] ')'
cdef_stmt: ('cdef' | 'cpdef') (cvar_def | cdef_type_decl | extern_block)
cdef_stmt: ('cdef' | 'cpdef') (cvar_def | cdef_type_decl | extern_block)
cdef_type_decl: ctype_decl | fused | cclass
cdef_type_decl: ctype_decl | fused | cclass
ctype_decl: struct | enum | cppclass
ctype_decl: struct | enum | cppclass
ctypedef_stmt: 'ctypedef' (cvar_decl | struct | enum)
# These two are similar but can't be used in an or clause
# These two are similar but can't be used in an or clause
# as it would cause ambiguity in the LL(1) parser.
# as it would cause ambiguity in the LL(1) parser.
# Requires a type
# Requires a type
cvar_decl: type NAME
NEWLINE
cvar_decl: type NAME
(NEWLINE | cfunc)
# Allows an assignment
# Allows an assignment
cvar_def: maybe_typed_name
NEWLINE
cvar_def: maybe_typed_name
(NEWLINE | cfunc)
ctypedef_stmt: 'ctypedef' (cvar_decl | struct | enum)
cfunc: [teplate_params] parameters [gil_spec] [exception_value] (':' suite | NEWLINE)
exception_value: 'except' (['?'] expr | '*' | '+' [NAME])
gil_spec: 'with' ('gil' | 'nogil') | 'nogil'
cclass: classdef
cclass: classdef
fused: 'fused' NAME ':' NEWLINE INDENT ( type NEWLINE)+ DEDENT
fused: 'fused' NAME ':' NEWLINE INDENT ( type NEWLINE)+ DEDENT
...
...
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