platypus/PLATYPUS_Regex.md

46 lines
573 B
Markdown
Raw Normal View History

# Regular Expressions for PLATYPUS
## Comments
```
L(COMMENT) = !< [^CR]*CR
```
## Keywords
```
L(KEYWORD) = PLATYPUS | IF | THEN | ELSE | USING | REPEAT | INPUT | OUTPUT
```
## Variable Identifiers
```
2017-03-14 19:54:47 +00:00
L(L) = [a-zA-Z]
2017-03-14 19:54:47 +00:00
L(LoD) = [a-zA-Z0-9]
L(VID) = AVID | SVID
L(AVID) = [a-zA-Z]([a-zA-Z0-9])*
L(SVID) = AVID#
```
## Integer Literals
```
2017-03-14 19:54:47 +00:00
L(DIL) = 0 | [1-9]*
2017-03-14 19:54:47 +00:00
L(NzD) = [1-9]
2017-03-14 19:54:47 +00:00
L(D) = [0-9]
2017-03-14 19:54:47 +00:00
L(OD) = [0-7]
2017-03-14 19:54:47 +00:00
L(OIL) = 0([0-7])*
2017-03-14 19:54:47 +00:00
L(IL) = (DIL | OIL)
```
## Floating Point Literal
```
2017-03-14 19:54:47 +00:00
L(FLPL) = (0 | [1-9]*).[0-9]*
```
## String Literal
```
2017-03-14 19:54:47 +00:00
L(STRL) = "([a-ZA-Z_0-9])*"
```