ingydotnet / swim-pm

15 stars 7 forks source link

Define syntax of explicit phrases #8

Open pdl opened 10 years ago

pdl commented 10 years ago

Explicit phrases like <name content> should have a clear syntax. I propose:

< NAME SPACE CONTENT >
< NAME COLON ARGS COLON CONTENT >

Notes:
- Name can contain word chars and hyphens only
- ARGS cannot contain unescaped colon
- NAME, ARGS and CONTENT may be empty. 
- ARGS contains a space-delimited list of WORD and WORD=VALUE or WORD="VALUE" (WORD may contain hyphens)
- No need to escape colon in content
- No other formats permitted.
pdl commented 10 years ago

I have written test cases at: https://github.com/pdl/kwim-pm/blob/html-func-initial-work/test/phrase-explicit.tml

ingydotnet commented 10 years ago

This looks great. I'll implement it and we can review.

ingydotnet commented 10 years ago

I got the first 10 tests passing almost as is. Where I deviated, I marked with XXX.

@pdl, we should probably discuss at this point.

ingydotnet commented 10 years ago

@pdl had to rename kwim to swim. Just FYI...

pdl commented 10 years ago

OK, thanks - are you planning to keep the repo here, though?

ingydotnet commented 10 years ago

@pdl, no I've made new repos, but kept the old history. I'll leave this one up but I guess I need to move the issues. Maybe I should just rename the old repos to keep the issues.

ingydotnet commented 10 years ago

@pdl, I renamed the kwim-pm github repo to swim-pm so the issues moved. Then I recreated a kwim-pm repo, to push the old deprecated code.

Hopefully this gets to you via the swim-pm repo. It still shows you as a collab on swim-pm, since renames preserve that too.