cs2103jan2015-w09-4j / main

CS2103 project of team w09-4j
3 stars 0 forks source link

Explicit parameter parsing v0.1 #45

Closed rodsonchue closed 9 years ago

rodsonchue commented 9 years ago

Leave a comment here if there is anything needed to be edited or is incorrect

List of Affected Command keywords

add modify

Possible command example(s)

add {Shopping} @{NUS} ~{tml} -{tml} !{tml}%10+{Buy 4pkt of Tao Suan for everyone}#food #cerclovestaosuan modify Shopping +{Buy 5pkt of Tao Suan}

Task Parameters

Parameter Syntax Pattern Additional Info
Title Implicit Form: add <phrase><SYMBOL> Form A and B are used for MODIFY operations
Form A: =<word> E.g modify Book ={Book of Thrones}
Form B: ={<phrase>}
Location Form A: @<word> Typical use: Form A unless location is made up of more than one word.
Form B: @{<phrase>} E.g @{National University of Singapore}
Deadline Form A: -{<time>} For deadline tasks
Form B: -<word> Form B to support aliasing of words
Implicit: by <time> E.g -{tmr 3pm}
Time Frame (to and from) ~{<time>} -{<time>} For timed tasks which have a start and end time.
Implicit: from ~{} to -{} E.g ~{tmr 2pm} -{tmr 3pm}
Category (hashtag) Form A: #<word> Integrate ‘twitter mode’ into basic mode.
Form B: #{<word>} Typical use: Form A but to also support Form B for consistency with other syntax
E.g add ={Buy tao suan} -{tmr 3pm} #ts
Should support multiple categories
Description Form A: +<word> 2 forms to be consistent with all other syntax
Form B: +{<phrase>}
Reminders Form A: !<word> E.g add ={Buy tao suan} !{tmr 3pm}
Form B: !{<time>}
Priority Form A: %{<zeroToTen>} Priority levels: 0-10
Form B: %<zeroToTen> Where 0 is lowest (green) and
10 is highest (red for urgency)

BNF Definitions

<phrase>:= <word> | <word><space><phrase> | <phrase><space><word> <zeroToTen> := 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 <SYMBOL> to be further discussed

title, location, category, description: #71

eric-vader commented 9 years ago

We will implement the explicit form for all the parameters, which will always be in the form <SYMBOL>{<phrase>}

The default parameter symbols will be:

I think we can implement the explicit form for now. For the implicit forms, @rodsonchue can create 2 new issues(tasks) one for Explicit parameters(support for no {}) and another for Implicit parameters. The implicit will be available only for Title, Deadline and Timeframe. Also @rodsonchue clean up the description above to include only the descriptions for this task only.