don’t filter N, test with first test file for now
This commit is contained in:
parent
68ccfcbf5d
commit
5f9b1054ed
@ -18,11 +18,10 @@ class content:
|
||||
def test(filename):
|
||||
print(f"--- Parsing of {filename}")
|
||||
parsed = spipParser.parse(open(path.dirname(__file__) + "/" + filename).read())
|
||||
print(parsed)
|
||||
print(parsed.pretty())
|
||||
print()
|
||||
print(parsed, "\n")
|
||||
print(parsed.pretty(), "\n")
|
||||
|
||||
|
||||
# Test
|
||||
test("../test/1.spip")
|
||||
test("../test/2.spip")
|
||||
# test("../test/2.spip")
|
||||
|
@ -2,21 +2,21 @@ start: unordered_list
|
||||
| ordered_list
|
||||
| table
|
||||
| SEPARATOR
|
||||
| _N+
|
||||
| N+
|
||||
| heading
|
||||
| paragraph
|
||||
|
||||
unordered_list: ( _N "-*" list_element )+
|
||||
ordered_list: ( _N "-#" list_element )+
|
||||
unordered_list: ( N "-*" list_element )+
|
||||
ordered_list: ( N "-#" list_element )+
|
||||
list_element: text
|
||||
|
||||
table: ( _N row )+
|
||||
table: ( N row )+
|
||||
row: ( "|" cell )+ "|"
|
||||
cell: text
|
||||
|
||||
SEPARATOR: _N /-{4,}/
|
||||
SEPARATOR: N /-{4,}/
|
||||
|
||||
_N: /\r/? /\n/
|
||||
N: /\r/? /\n/
|
||||
|
||||
heading: "{{{" text "}}}"
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
{{{Chargé de Recherche}}}
|
||||
|
||||
{ {{E-mail:}} } aude.simon@irsamc.ups-tlse.fr
|
||||
|
Loading…
Reference in New Issue
Block a user