Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
arpeggio-gm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
backend
arpeggio-gm
Commits
76320f11
Commit
76320f11
authored
Jan 25, 2014
by
Igor Dejanovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed newline rule in csv example
parent
2e888150
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
csv.py
examples/csv.py
+1
-2
No files found.
examples/csv.py
View file @
76320f11
...
@@ -9,13 +9,12 @@ from arpeggio import *
...
@@ -9,13 +9,12 @@ from arpeggio import *
from
arpeggio.export
import
PMDOTExport
,
PTDOTExport
from
arpeggio.export
import
PMDOTExport
,
PTDOTExport
from
arpeggio
import
RegExMatch
as
_
from
arpeggio
import
RegExMatch
as
_
def
newline
():
return
_
(
r'\n+'
)
def
record
():
return
field
,
ZeroOrMore
(
","
,
field
)
def
record
():
return
field
,
ZeroOrMore
(
","
,
field
)
def
field
():
return
[
quoted_field
,
field_content
]
def
field
():
return
[
quoted_field
,
field_content
]
def
quoted_field
():
return
'"'
,
field_content_quoted
,
'"'
def
quoted_field
():
return
'"'
,
field_content_quoted
,
'"'
def
field_content
():
return
_
(
r'([^,\n])+'
)
def
field_content
():
return
_
(
r'([^,\n])+'
)
def
field_content_quoted
():
return
_
(
r'(("")|([^"]))+'
)
def
field_content_quoted
():
return
_
(
r'(("")|([^"]))+'
)
def
csvfile
():
return
OneOrMore
([
record
,
newline
]),
EndOfFile
def
csvfile
():
return
OneOrMore
([
record
,
'
\n
'
]),
EndOfFile
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
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