UNPKG

apg-lite

Version:

lightweight JavaScript APG parser

45 lines (44 loc) 1.2 kB
<!DOCTYPE html> <html lang="en"> <head> <title>apg-exp</title> <meta charset="utf-8"> <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/start/jquery-ui.css" /> <style> body { margin: 10px; height: 100%; font-size: 100% } #parse { width: 100px; } #string { font-family: monospace; } .comment { font-size: 100%; font-style: italic; } </style> </head> <body> <p> Parse a North American Numbering Plan phone number using the SABNF grammar:<br> <pre id="grammar-bnf"></pre> </p> <p> <b>number to parse:</b><br> <textarea id="string" wrap="off" rows="1" cols="20"></textarea> </p> <p> <input type="button" id="parse" value="parse" /><span id="parse-msg" class="comment"> </p> <p id="result"><pre id="values"></pre></p> </body> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script> <script src="../lib/web-parser.js" charset="utf-8"></script> <script src="./web-grammar.js" charset="utf-8"></script> <script src="./web-app.js" charset="utf-8"></script> </html>