don’t filter N, test with first test file for now

This commit is contained in:
Guilhem Fauré 2023-04-26 11:47:05 +02:00
parent 68ccfcbf5d
commit 5f9b1054ed
3 changed files with 9 additions and 11 deletions

View File

@ -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")

View File

@ -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 "}}}"

View File

@ -1,4 +1,3 @@
{{{Chargé de Recherche}}}
{ {{E-mail:}} } aude.simon@irsamc.ups-tlse.fr