Skip to content

Commit

Permalink
#12 , #11 - Add "-" to ID token. Add constants to Type Enum
Browse files Browse the repository at this point in the history
  • Loading branch information
satran004 committed Mar 18, 2021
1 parent 23ffefc commit c710177
Show file tree
Hide file tree
Showing 44 changed files with 2,106 additions and 2,015 deletions.
4,057 changes: 2,055 additions & 2,002 deletions src/main/gen/com/bloxbean/algodea/idea/language/_TEALLexer.java

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/main/java/com/bloxbean/algodea/idea/language/TEAL.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
NAMED_INTEGER_CONSTANT = 'regexp:(NoOp|OptIn|CloseOut|ClearState|UpdateApplication|DeleteApplication)'

//TypeEnum constants
TYPENUM_CONSTANT = 'regexp:(unknown|pay|keyreg|acfg|axfer|afrz|appl)'
TYPENUM_CONSTANT = 'regexp:(unknown|pay|keyreg|acfg|axfer|afrz|appl|Unknown|Payment|KeyRegistration|AssetConfig|AssetTransfer|AssetFreeze|ApplicationCall)'

//Global Fields
GLOBAL_FIELD = 'regexp:(MinTxnFee|MinBalance|MaxTxnLife|ZeroAddress|GroupSize|LogicSigVersion|Round|LatestTimestamp|CurrentApplicationID)'
Expand Down Expand Up @@ -173,7 +173,7 @@ LoadingOperation ::= intcblockOperation
| 'intc_1'
| 'intc_2'
| 'intc_3'

| bytecblockOperation
| bytecOperation
| 'bytec_0'
Expand Down Expand Up @@ -277,4 +277,4 @@ assetParamsGetOperation ::= assetParamsGetOp (unsignedInteger | ASSET_PARAMS_GE
assetHoldingGetOP ::= 'asset_holding_get'
assetParamsGetOp ::= 'asset_params_get'

unsignedInteger ::= l_integer {name="uint8"}
unsignedInteger ::= l_integer {name="uint8"}
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ FLOWCONTROL_OP=(err|return|pop|dup|dup2|bnz|bz|b)
STATEACCESS_OP=(balance|app_opted_in|app_local_get|app_local_get_ex|app_global_get|app_global_get_ex|app_local_put|app_global_put|app_local_del|app_global_del|asset_holding_get|asset_params_get)
TXN_LOADING_OP=(txn|gtxn|txna|gtxna)
NAMED_INTEGER_CONSTANT=(NoOp|OptIn|CloseOut|ClearState|UpdateApplication|DeleteApplication)
TYPENUM_CONSTANT=(unknown|pay|keyreg|acfg|axfer|afrz|appl)
TYPENUM_CONSTANT=(unknown|pay|keyreg|acfg|axfer|afrz|appl|Unknown|Payment|KeyRegistration|AssetConfig|AssetTransfer|AssetFreeze|ApplicationCall)
GLOBAL_FIELD=(MinTxnFee|MinBalance|MaxTxnLife|ZeroAddress|GroupSize|LogicSigVersion|Round|LatestTimestamp|CurrentApplicationID)
ASSET_HOLDING_GET_FIELD=(AssetBalance|AssetFrozen)
ASSET_PARAMS_GET_FIELD=(AssetTotal|AssetDecimals|AssetDefaultFrozen|AssetUnitName|AssetName|AssetURL|AssetMetadataHash|AssetManager|AssetReserve|AssetFreeze|AssetClawback)
OCTAL=(0)[0-9]+
HEX=(0x|0X)[a-fA-F0-9]*
VAR_TMPL=(VAR_TMPL_)([a-zA-Z0-9_$.#@~?]+)
ID=([a-zA-Z0-9_$.#@~?]+[a-zA-Z0-9_$.#@~?]*)
ID=([a-zA-Z0-9_$.#@~?]+[a-zA-Z0-9_$.#@~?-]*)
BASE32=([A-Z2-7]{8})*([A-Z2-7]{2}={6}|[A-Z2-7]{4}={4}|[A-Z2-7]{5}={3}|[A-Z2-7]{7}=)?
BASE64=[-A-Za-z0-9+=]{1,50}|=[^=]|={3}

Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/bloxbean/algodea/idea/language/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Generate Parser and Lexer

- Right click on TEAL.bnf > Generate Parser

- Right click on _TEALLexer.flex > Run JFlex Generator

0 comments on commit c710177

Please sign in to comment.