Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (64 sloc) 23 KB
<?xml version="1.0" encoding="UTF-8"?>
<bgf:grammar xmlns:bgf="http://planet-sl.org/bgf"><!--datetime, tuple[datetime date, datetime time], interval, tuple[int,int,int,int,int,int,int], Duration, int, list[datetime], str-->
<bgf:production><label>now</label><nonterminal>datetime</nonterminal><bgf:expression><epsilon /></bgf:expression>
</bgf:production><bgf:production><label>createDate</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>year</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>month</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>day</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>createTime</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>hour</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>minute</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>second</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>millisecond</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>createTime</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>hour</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>minute</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>second</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>millisecond</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>timezoneHourOffset</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>timezoneMinuteOffset</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>createDateTime</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>year</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>month</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>day</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>hour</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>minute</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>second</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>millisecond</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>createDateTime</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>year</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>month</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>day</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>hour</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>minute</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>second</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>millisecond</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>timezoneHourOffset</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>timezoneMinuteOffset</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>joinDateAndTime</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>date</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>time</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>splitDateTime</label><nonterminal>tuple[datetime date, datetime time]</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>incrementYears</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>n</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>incrementYears</label><nonterminal>datetime</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>incrementMonths</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>n</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>incrementMonths</label><nonterminal>datetime</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>incrementDays</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>n</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>incrementDays</label><nonterminal>datetime</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>incrementHours</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>n</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>incrementHours</label><nonterminal>datetime</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>incrementMinutes</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>n</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>incrementMinutes</label><nonterminal>datetime</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>incrementSeconds</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>n</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>incrementSeconds</label><nonterminal>datetime</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>incrementMilliseconds</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>n</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>incrementMilliseconds</label><nonterminal>datetime</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>decrementYears</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>n</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>decrementYears</label><nonterminal>datetime</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>decrementMonths</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>n</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>decrementMonths</label><nonterminal>datetime</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>decrementDays</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>n</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>decrementDays</label><nonterminal>datetime</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>decrementHours</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>n</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>decrementHours</label><nonterminal>datetime</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>decrementMinutes</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>n</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>decrementMinutes</label><nonterminal>datetime</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>decrementSeconds</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>n</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>decrementSeconds</label><nonterminal>datetime</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>decrementMilliseconds</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>n</mark><bgf:expression><value>int</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>decrementMilliseconds</label><nonterminal>datetime</nonterminal><bgf:expression><marked><mark>dt</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>createInterval</label><nonterminal>interval</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>begin</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>end</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>createDurationInternal</label><nonterminal>tuple[int,int,int,int,int,int,int]</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>begin</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>end</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>createDuration</label><nonterminal>Duration</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>begin</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>end</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>createDuration</label><nonterminal>Duration</nonterminal><bgf:expression><marked><mark>i</mark><bgf:expression><nonterminal>interval</nonterminal></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>daysInInterval</label><nonterminal>int</nonterminal><bgf:expression><marked><mark>i</mark><bgf:expression><nonterminal>interval</nonterminal></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>daysDiff</label><nonterminal>int</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>begin</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>end</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>dateRangeByDay</label><nonterminal>list[datetime]</nonterminal><bgf:expression><marked><mark>i</mark><bgf:expression><nonterminal>interval</nonterminal></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>parseDate</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputDate</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>formatString</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>parseDateInLocale</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputDate</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>formatString</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>locale</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>parseTime</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputTime</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>formatString</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>parseTimeInLocale</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputTime</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>formatString</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>locale</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>parseDateTime</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputDateTime</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>formatString</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>parseDateTimeInLocale</label><nonterminal>datetime</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputDateTime</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>formatString</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>locale</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>printDate</label><nonterminal>str</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputDate</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>formatString</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>printDate</label><nonterminal>str</nonterminal><bgf:expression><marked><mark>inputDate</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>printDateInLocale</label><nonterminal>str</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputDate</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>formatString</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>locale</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>printDateInLocale</label><nonterminal>str</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputDate</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>locale</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>printTime</label><nonterminal>str</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputTime</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>formatString</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>printTime</label><nonterminal>str</nonterminal><bgf:expression><marked><mark>inputTime</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>printTimeInLocale</label><nonterminal>str</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputTime</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>formatString</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>locale</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>printTimeInLocale</label><nonterminal>str</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputTime</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>locale</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>printDateTime</label><nonterminal>str</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputDateTime</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>formatString</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>printDateTime</label><nonterminal>str</nonterminal><bgf:expression><marked><mark>inputDateTime</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression>
</bgf:production><bgf:production><label>printDateTimeInLocale</label><nonterminal>str</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputDateTime</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>formatString</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>locale</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production><bgf:production><label>printDateTimeInLocale</label><nonterminal>str</nonterminal><bgf:expression><sequence><bgf:expression><marked><mark>inputDateTime</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression><bgf:expression><marked><mark>locale</mark><bgf:expression><value>string</value></bgf:expression></marked></bgf:expression></sequence></bgf:expression>
</bgf:production></bgf:grammar>