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):
|
def test(filename):
|
||||||
print(f"--- Parsing of {filename}")
|
print(f"--- Parsing of {filename}")
|
||||||
parsed = spipParser.parse(open(path.dirname(__file__) + "/" + filename).read())
|
parsed = spipParser.parse(open(path.dirname(__file__) + "/" + filename).read())
|
||||||
print(parsed)
|
print(parsed, "\n")
|
||||||
print(parsed.pretty())
|
print(parsed.pretty(), "\n")
|
||||||
print()
|
|
||||||
|
|
||||||
|
|
||||||
# Test
|
# Test
|
||||||
test("../test/1.spip")
|
test("../test/1.spip")
|
||||||
test("../test/2.spip")
|
# test("../test/2.spip")
|
||||||
|
@ -2,21 +2,21 @@ start: unordered_list
|
|||||||
| ordered_list
|
| ordered_list
|
||||||
| table
|
| table
|
||||||
| SEPARATOR
|
| SEPARATOR
|
||||||
| _N+
|
| N+
|
||||||
| heading
|
| heading
|
||||||
| paragraph
|
| paragraph
|
||||||
|
|
||||||
unordered_list: ( _N "-*" list_element )+
|
unordered_list: ( N "-*" list_element )+
|
||||||
ordered_list: ( _N "-#" list_element )+
|
ordered_list: ( N "-#" list_element )+
|
||||||
list_element: text
|
list_element: text
|
||||||
|
|
||||||
table: ( _N row )+
|
table: ( N row )+
|
||||||
row: ( "|" cell )+ "|"
|
row: ( "|" cell )+ "|"
|
||||||
cell: text
|
cell: text
|
||||||
|
|
||||||
SEPARATOR: _N /-{4,}/
|
SEPARATOR: N /-{4,}/
|
||||||
|
|
||||||
_N: /\r/? /\n/
|
N: /\r/? /\n/
|
||||||
|
|
||||||
heading: "{{{" text "}}}"
|
heading: "{{{" text "}}}"
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
{{{Chargé de Recherche}}}
|
{{{Chargé de Recherche}}}
|
||||||
|
|
||||||
{ {{E-mail:}} } aude.simon@irsamc.ups-tlse.fr
|
{ {{E-mail:}} } aude.simon@irsamc.ups-tlse.fr
|
||||||
|
Loading…
Reference in New Issue
Block a user